class PTrace |
Class to encapsulate tracing functions.
![]() | Initialise ( unsigned level, const char* filename = NULL, unsigned options = Timestamp | Thread | Blocks ) Set the most common trace options. |
![]() | SetOptions (unsigned options ) Set the trace options. |
![]() | ClearOptions (unsigned options ) Clear the trace options. |
![]() | GetOptions () Get the current trace options. |
![]() | SetLevel (unsigned level ) Set the trace level. |
![]() | GetLevel () Get the trace level. |
![]() | CanTrace (unsigned level) Determine if the level may cause trace output. |
![]() | SetStream (ostream* out ) Set the stream to be used for trace output. |
![]() | Begin ( unsigned level, const char* fileName, int lineNum ) Begin a trace output. |
![]() | End (ostream & strm) End a trace output. |
![]() | Options Options for trace output |
Class to encapsulate tracing functions. This class does not require any instances and is only being used as a method of grouping functions together in a name space.
A trace output of the program name version and OS is written as well.
Note this function OR's the bits included in the options parameter.
Note this function AND's the complement of the bits included in the options parameter.
So a typical usage would be:
ostream & s = PTrace::Begin(3, __FILE__, __LINE__); s << "hello"; if (want_there) s << " there"; s << '!' << PTrace::End();
So a typical usage would be:
ostream & s = PTrace::Begin(); s << "hello"; if (want_there) s << " there"; s << '!' << PTrace::End();
Alphabetic index HTML hierarchy of classes or Java