ACE
6.1.8
|
A C++ trace facility that keeps track of which methods are entered and exited. More...
#include <Trace.h>
Public Member Functions | |
ACE_Trace (const ACE_TCHAR *n, int line=0, const ACE_TCHAR *file=ACE_TEXT("")) | |
~ACE_Trace (void) | |
void | dump (void) const |
Dump the state of an object. More... | |
Static Public Member Functions | |
static bool | is_tracing (void) |
Determine if tracing is enabled or not. More... | |
static void | start_tracing (void) |
Enable the tracing facility. More... | |
static void | stop_tracing (void) |
Disable the tracing facility. More... | |
static void | set_nesting_indent (int indent) |
Change the nesting indentation level. More... | |
static int | get_nesting_indent (void) |
Get the nesting indentation level. More... | |
Private Types | |
enum | { DEFAULT_INDENT = 3, DEFAULT_TRACING = 1 } |
Default values. More... | |
Private Attributes | |
const ACE_TCHAR * | name_ |
Name of the method we are in. More... | |
Static Private Attributes | |
static int | nesting_indent_ = ACE_Trace::DEFAULT_INDENT |
Keeps track of how far to indent per trace call. More... | |
static bool | enable_tracing_ = ACE_Trace::DEFAULT_TRACING |
Is tracing enabled? More... | |
A C++ trace facility that keeps track of which methods are entered and exited.
This class uses C++ constructors and destructors to automate the ACE_Trace nesting. In addition, thread-specific storage is used to enable multiple threads to work correctly.
Perform the first part of the trace, which prints out the string N, the LINE, and the ACE_FILE as the function is entered.
ACE_Trace::~ACE_Trace | ( | void | ) |
Perform the second part of the trace, which prints out the NAME as the function is exited.
void ACE_Trace::dump | ( | void | ) | const |
Dump the state of an object.
|
static |
Get the nesting indentation level.
|
static |
Determine if tracing is enabled or not.
|
static |
Change the nesting indentation level.
|
static |
Enable the tracing facility.
|
static |
Disable the tracing facility.
|
staticprivate |
Is tracing enabled?
|
private |
Name of the method we are in.
|
staticprivate |
Keeps track of how far to indent per trace call.