#include <mytrace.h>
Public Methods | |
MyTrace (const string &newTraceMessage) | |
Constructor. More... | |
virtual | ~MyTrace () |
Destructor. More... | |
Static Public Methods | |
void | setTraceStream (const char *newStreamName) |
Set the file stream to which text is sent. More... | |
ostream & | getTraceStream () |
Get the stream to which text is being sent. More... | |
Private Attributes | |
string | traceMessage |
User text for sending to stream. More... | |
Static Private Attributes | |
ostream * | traceStream = &cerr |
Stream currently being used. More... |
Definition at line 50 of file mytrace.h.
|
Constructor. If code is compiled with _DOENTRYTRACE_ defined user text is sent to stream during construction, if compiled with _DOEXITTRACE_ defined user text is prepended with 'Scoped: '.
Definition at line 51 of file mytrace.cpp. |
|
Destructor. If code compiled with _DOEXITTRACE_ defined user text is sent to stream during destruction, prepended with 'Descoped: '. Definition at line 66 of file mytrace.cpp. References traceMessage, and traceStream. |
|
Get the stream to which text is being sent.
Definition at line 91 of file mytrace.cpp. References traceStream. |
|
Set the file stream to which text is sent. Creates a new fstream instance using passed name, opens stream for output. Never deletes the stream as this method is expected to be used only once at process start, also only in 'test' builds and so not worried memory leaks.
Definition at line 83 of file mytrace.cpp. |
|
User text for sending to stream.
Definition at line 96 of file mytrace.h. Referenced by ~MyTrace. |
|
Stream currently being used.
Definition at line 47 of file mytrace.cpp. Referenced by getTraceStream, and ~MyTrace. |