Planeshift
|
Keep track of remote debugging. More...
#include <remotedebug.h>
Classes | |
struct | DebugClient |
Hold client information for remote debugging clients. | |
Public Member Functions | |
void | AddDebugClient (uint clientNum, int debugLevel) |
Add a client to receive debug information. | |
int | GetDebugging () const |
Get the local debugging level. | |
csString | GetRemoteDebugClientsString () const |
Utility function to retrive a string with all remote debugging clients for debug outputs. | |
bool | IsDebugging (int debugLevel) |
Check if this NPC is debugging at the given level. | |
bool | IsDebugging () |
Check if debugging is enabled. | |
void | Printf (int debugLevel, const char *msg,...) |
Function to generate a debug print. | |
RemoteDebug () | |
Constructor. | |
void | RemoveDebugClient (uint clientNum) |
Remove client from list of debug receivers. | |
void | SetDebugging (int debugLevel) |
Set a new debug level. | |
bool | SwitchDebugging () |
Switch the local debuging state. | |
virtual | ~RemoteDebug () |
Destructor. | |
Protected Member Functions | |
virtual void | LocalDebugReport (const csString &debugString)=0 |
Callback function to report local debug. | |
virtual void | RemoteDebugReport (uint32_t clientNum, const csString &debugString)=0 |
Callback function to report remote debug. | |
Protected Attributes | |
csArray< csString > | debugLog |
Local debug log of last n print statments. | |
int | nextDebugLogEntry |
The next entry to use. |
Keep track of remote debugging.
Track debugging clients and debug levels.
Definition at line 58 of file remotedebug.h.
RemoteDebug::RemoteDebug | ( | ) |
Constructor.
virtual RemoteDebug::~RemoteDebug | ( | ) | [virtual] |
Destructor.
void RemoteDebug::AddDebugClient | ( | uint | clientNum, |
int | debugLevel | ||
) |
Add a client to receive debug information.
clientNum | The client to add. |
debugLevel | The debug level for this client. |
int RemoteDebug::GetDebugging | ( | ) | const |
Get the local debugging level.
csString RemoteDebug::GetRemoteDebugClientsString | ( | ) | const |
Utility function to retrive a string with all remote debugging clients for debug outputs.
bool RemoteDebug::IsDebugging | ( | ) | [inline] |
Check if debugging is enabled.
Definition at line 74 of file remotedebug.h.
bool RemoteDebug::IsDebugging | ( | int | debugLevel | ) | [inline] |
Check if this NPC is debugging at the given level.
debugLevel | The debug level. |
Definition at line 84 of file remotedebug.h.
virtual void RemoteDebug::LocalDebugReport | ( | const csString & | debugString | ) | [protected, pure virtual] |
Callback function to report local debug.
void RemoteDebug::Printf | ( | int | debugLevel, |
const char * | msg, | ||
... | |||
) |
Function to generate a debug print.
The text will be distributed to all clients currently debugging at the debug level given.
virtual void RemoteDebug::RemoteDebugReport | ( | uint32_t | clientNum, |
const csString & | debugString | ||
) | [protected, pure virtual] |
Callback function to report remote debug.
void RemoteDebug::RemoveDebugClient | ( | uint | clientNum | ) |
Remove client from list of debug receivers.
clientNum | The client to remove. |
void RemoteDebug::SetDebugging | ( | int | debugLevel | ) |
Set a new debug level.
debug | New debug level, 0 is no debugging |
bool RemoteDebug::SwitchDebugging | ( | ) |
Switch the local debuging state.
csArray<csString> RemoteDebug::debugLog [protected] |
Local debug log of last n print statments.
Definition at line 183 of file remotedebug.h.
int RemoteDebug::nextDebugLogEntry [protected] |
The next entry to use.
Definition at line 184 of file remotedebug.h.