KittyMemoryEx 1.0.0
Dedicated library for runtime code patching, memory scanning, tracing, injection and some more useful memory utilities. works for both Android and Linux
Loading...
Searching...
No Matches
KittyMemoryEx::ProcStatus Class Reference

Class to retrieve process status information. More...

#include <KittyMemoryEx.hpp>

Public Member Functions

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 Public Member Functions

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.

Detailed Description

Class to retrieve process status information.

Member Function Documentation

◆ contains()

bool KittyMemoryEx::ProcStatus::contains ( const std::string & key) const
inline

Checks if the process status data contains a specific key.

Parameters
keyThe key to check.
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
keyThe key to retrieve.
Returns
True if the key's value is 1, false otherwise.
Here is the call graph for this function:

◆ getInt()

long long KittyMemoryEx::ProcStatus::getInt ( const std::string & key) const
inline

Retrieves the integer value associated with a key.

Parameters
keyThe key to retrieve.
Returns
The integer value associated with the key, or 0 if the key is not found.
Here is the caller graph for this function:

◆ getString()

std::string KittyMemoryEx::ProcStatus::getString ( const std::string & key) const
inline

Retrieves the string value associated with a key.

Parameters
keyThe key to retrieve.
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
pidThe PID of the process.
tidThe thread ID of the process.
outA 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
pidThe PID of the process to parse.
outA 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: