Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members   Related Pages  

ACE_Trace Class Reference

A C++ trace facility that keeps track of which methods are entered and exited. More...

#include <Trace.h>

List of all members.

Public Methods

 ACE_Trace (const ACE_TCHAR *n, int line=0, const ACE_TCHAR *file=ACE_LIB_TEXT(""))
 Perform the first part of the trace, which prints out the string N, the LINE, and the ACE_FILE as the function is entered. More...

 ~ACE_Trace (void)
 Perform the second part of the trace, which prints out the NAME as the function is exited. More...

void dump (void) const
 Dump the state of an object. More...


Static Public Methods

int is_tracing (void)
 Determine if tracing is enabled (return == 1) or not (== 0). More...

void start_tracing (void)
 Enable the tracing facility. More...

void stop_tracing (void)
 Disable the tracing facility. More...

void set_nesting_indent (int indent)
 Change the nesting indentation level. More...

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_TCHARname_
 Name of the method we are in. More...


Static Private Attributes

int nesting_indent_ = ACE_Trace::DEFAULT_INDENT
 Keeps track of how far to indent per trace call. More...

int enable_tracing_ = ACE_Trace::DEFAULT_TRACING
 Is tracing enabled? More...


Detailed Description

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.


Member Enumeration Documentation

anonymous enum [private]
 

Default values.

Enumeration values:
DEFAULT_INDENT 
DEFAULT_TRACING 


Constructor & Destructor Documentation

ACE_Trace::ACE_Trace const ACE_TCHAR   n,
int    line = 0,
const ACE_TCHAR   file = ACE_LIB_TEXT ("")
 

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.


Member Function Documentation

void ACE_Trace::dump void    const
 

Dump the state of an object.

int ACE_Trace::get_nesting_indent void    [static]
 

Get the nesting indentation level.

int ACE_Trace::is_tracing void    [static]
 

Determine if tracing is enabled (return == 1) or not (== 0).

void ACE_Trace::set_nesting_indent int    indent [static]
 

Change the nesting indentation level.

void ACE_Trace::start_tracing void    [static]
 

Enable the tracing facility.

void ACE_Trace::stop_tracing void    [static]
 

Disable the tracing facility.


Member Data Documentation

int ACE_Trace::enable_tracing_ = ACE_Trace::DEFAULT_TRACING [static, private]
 

Is tracing enabled?

const ACE_TCHAR* ACE_Trace::name_ [private]
 

Name of the method we are in.

int ACE_Trace::nesting_indent_ = ACE_Trace::DEFAULT_INDENT [static, private]
 

Keeps track of how far to indent per trace call.


The documentation for this class was generated from the following files:
Generated on Wed Jan 15 19:15:38 2003 for ACE by doxygen1.2.13.1 written by Dimitri van Heesch, © 1997-2001