Class to retrieve process status information.
More...
#include <KittyMemoryEx.hpp>
|
| bool | refresh () |
| | Refreshes the process status.
|
| bool | contains (const std::string &key) const |
| | Checks if the process status data contains a specific key.
|
| std::string | getString (const std::string &key) const |
| | Retrieves the string value associated with a key.
|
| long long | getInt (const std::string &key) const |
| | Retrieves the integer value associated with a key.
|
| bool | getBool (const std::string &key) const |
| | Retrieves the boolean value associated with a key.
|
|
| static bool | parse (pid_t pid, ProcStatus *out) |
| | Parses the status of a process given its PID.
|
| static bool | parse (pid_t pid, pid_t tid, ProcStatus *out) |
| | Parses the status of a process given its PID and thread ID.
|
Class to retrieve process status information.
◆ contains()
| bool KittyMemoryEx::ProcStatus::contains |
( |
const std::string & | key | ) |
const |
|
inline |
Checks if the process status data contains a specific key.
- Parameters
-
- Returns
- True if the key exists, false otherwise.
◆ getBool()
| bool KittyMemoryEx::ProcStatus::getBool |
( |
const std::string & | key | ) |
const |
|
inline |
Retrieves the boolean value associated with a key.
- Parameters
-
- Returns
- True if the key's value is 1, false otherwise.
◆ getInt()
| long long KittyMemoryEx::ProcStatus::getInt |
( |
const std::string & | key | ) |
const |
|
inline |
Retrieves the integer value associated with a key.
- Parameters
-
- Returns
- The integer value associated with the key, or 0 if the key is not found.
◆ getString()
| std::string KittyMemoryEx::ProcStatus::getString |
( |
const std::string & | key | ) |
const |
|
inline |
Retrieves the string value associated with a key.
- Parameters
-
- Returns
- The string value associated with the key, or an empty string if the key is not found.
◆ parse() [1/2]
| bool KittyMemoryEx::ProcStatus::parse |
( |
pid_t | pid, |
|
|
pid_t | tid, |
|
|
ProcStatus * | out ) |
|
inlinestatic |
Parses the status of a process given its PID and thread ID.
- Parameters
-
| pid | The PID of the process. |
| tid | The thread ID of the process. |
| out | A pointer to the ProcStatus object where the parsed data will be stored. |
- Returns
- True if parsing was successful, false otherwise.
◆ parse() [2/2]
| bool KittyMemoryEx::ProcStatus::parse |
( |
pid_t | pid, |
|
|
ProcStatus * | out ) |
|
inlinestatic |
Parses the status of a process given its PID.
- Parameters
-
| pid | The PID of the process to parse. |
| out | A pointer to the ProcStatus object where the parsed data will be stored. |
- Returns
- True if parsing was successful, false otherwise.
◆ refresh()
| bool KittyMemoryEx::ProcStatus::refresh |
( |
| ) |
|
|
inline |
Refreshes the process status.
If the tid is less than or equal to 0, it calls the parse function with the pid. If the tid is greater than 0, it calls the parse function with the pid and tid.
- Returns
- True if refreshing was successful, false otherwise.
The documentation for this class was generated from the following file: