In file /home/eternity/Source/Common/Debugable/H/debugable.h:

class Debugable

Debugging class

Inheritance:

Debugable


Public Methods

string* Debugable::CreateString (char *firstStr, int firstInt, int secondInt)
Creates a string for numbering certificates
Debugable::Debugable (LogFile * debugLogFile)
Debugable constructor
int Debugable::SetDebugOptions (int newLogOptions)
Change debug options of the debugable object
void Debugable::SetLogFile (LogFile *aLogFile)
Changes the log file
void Debugable::WriteString (LogLevel debugLevel, char * format, ...)
Writes a message to LogFile
Debugable::~Debugable ()
Debugable destructor

Public

attributes
int debugOptions
What messages should be logged
LogFile* logFile
Log file for debug messages
methods
virtual int SetDebugOptions (int newLogOptions)
Change what is debugged
virtual void WriteString (LogLevel debugLevel, char * format, ...)
Write message to log file
void SetLogFile (LogFile *aLogFile)
Change log file
Debugable (LogFile * debugLogFile = NULL)
constructor
virtual ~Debugable ()
destructor
string* CreateString (char *firstStr, int firstInt, int secondInt)
Helper method

Documentation

Debugging class. Has the ability to write its progress into log file - it has one and can write into it using its method WriteString.
attributes

int debugOptions
What messages should be logged

LogFile* logFile
Log file for debug messages

methods

virtual int SetDebugOptions(int newLogOptions)
Change what is debugged

virtual void WriteString(LogLevel debugLevel, char * format, ...)
Write message to log file

void SetLogFile(LogFile *aLogFile)
Change log file

Debugable(LogFile * debugLogFile = NULL)
constructor

virtual ~Debugable()
destructor

string* CreateString(char *firstStr, int firstInt, int secondInt)
Helper method

string* Debugable::CreateString(char *firstStr, int firstInt, int secondInt)
Creates a string for numbering certificates.
Returns:
Allocated string containing:
``firstStr''-``firstInt''-``secondInt'', if secondInt is
equal to -1, only ``firstStr''-``firstInt'' is created.
Parameters:
firstStr - String to take as base for building result
firstInt - First number to add
secondInt - Second number to add
Author:
Pechy
See Also:
Translator, MessageCreator

Debugable::Debugable(LogFile * debugLogFile)
Debugable constructor. Stores pointer to the log file and initializes debug options.
Parameters:
debugLogFile - Pointer to log file that should be used for debugging.
Author:
Venca
See Also:
WriteString, LogFile

int Debugable::SetDebugOptions(int newLogOptions)
Change debug options of the debugable object. Sets new value in debug options that are used to decide whether the message will be written into log file and returns the old value so that the caller can restore these settings.
Returns:
Old value of debug options
Parameters:
newLogOptions -
Author:
Venca
See Also:
WriteString()

void Debugable::SetLogFile(LogFile *aLogFile)
Changes the log file. Remembers pointer to the LogFile and inits debugOptions. Allows for log file switching - may be used to debug a certain method into a different file.
Returns:
void
Parameters:
aLogFile -
Author:
Pavel
See Also:
WriteString()

void Debugable::WriteString(LogLevel debugLevel, char * format, ...)
Writes a message to LogFile. Checks if the current debug options allow this log level to be written to log file and if so then it asks log file to write it there. This allows for different debug level for different objects.
Returns:
co
Parameters:
debugLevel - log level of the message (warning, error ...)
format - Format string with the same semantics and syntax as the printf format string.
... - Additional parameters that should be incorporated into into format.
Author:
Venca
See Also:
printf(), LogFile, LogLevel

Debugable::~Debugable()
Debugable destructor. Empty - no need to do anything.
Author:
Venca
See Also:
Debugable()


Direct child classes:
TransactionManager
TimeSynchronizer
Table
TCBWrapper
Six
Runable
RandomGenerator
PayManager
MessageIDRepository
MessageCreator
KeyManager
KeyManager
GMessage
Finder
File
FieldQueue
Field
Cipherer
CertificateRepository
Banker
Banker
Allocator
AddressManager
AddressManager
ACManager
MessageQueue
Killer
Author:
Venca
See Also:
Runable LogFile

alphabetic index hierarchy of classes


generated by doc++