ACE 8.0.1
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | Public Attributes | Private Types | Private Attributes | Static Private Attributes | List of all members
ACE_Trace Class Reference

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 dump () const
 Dump the state of an object.
 

Static Public Member Functions

static bool is_tracing ()
 Determine if tracing is enabled or not.
 
static void start_tracing ()
 Enable the tracing facility.
 
static void stop_tracing ()
 Disable the tracing facility.
 
static void set_nesting_indent (int indent)
 Change the nesting indentation level.
 
static int get_nesting_indent ()
 Get the nesting indentation level.
 

Public Attributes

 ACE_ALLOC_HOOK_DECLARE
 Declare the dynamic allocation hooks.
 

Private Types

enum  { DEFAULT_INDENT = 3 , DEFAULT_TRACING = 1 }
 Default values. More...
 

Private Attributes

const ACE_TCHARname_
 Name of the method we are in.
 

Static Private Attributes

static int nesting_indent_ = ACE_Trace::DEFAULT_INDENT
 Keeps track of how far to indent per trace call.
 
static bool enable_tracing_ = ACE_Trace::DEFAULT_TRACING
 Is tracing enabled?
 

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

anonymous enum
private

Default values.

Enumerator
DEFAULT_INDENT 
DEFAULT_TRACING 

Constructor & Destructor Documentation

◆ ACE_Trace()

ACE_Trace::ACE_Trace ( const ACE_TCHAR * n,
int line = 0,
const ACE_TCHAR * file = ACE_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::~ACE_Trace ( )

Perform the second part of the trace, which prints out the NAME as the function is exited.

Member Function Documentation

◆ dump()

void ACE_Trace::dump ( ) const

Dump the state of an object.

◆ get_nesting_indent()

int ACE_Trace::get_nesting_indent ( )
static

Get the nesting indentation level.

◆ is_tracing()

bool ACE_Trace::is_tracing ( )
static

Determine if tracing is enabled or not.

◆ set_nesting_indent()

void ACE_Trace::set_nesting_indent ( int indent)
static

Change the nesting indentation level.

◆ start_tracing()

void ACE_Trace::start_tracing ( )
static

Enable the tracing facility.

◆ stop_tracing()

void ACE_Trace::stop_tracing ( )
static

Disable the tracing facility.

Member Data Documentation

◆ ACE_ALLOC_HOOK_DECLARE

ACE_Trace::ACE_ALLOC_HOOK_DECLARE

Declare the dynamic allocation hooks.

◆ enable_tracing_

bool ACE_Trace::enable_tracing_ = ACE_Trace::DEFAULT_TRACING
staticprivate

Is tracing enabled?

◆ name_

const ACE_TCHAR* ACE_Trace::name_
private

Name of the method we are in.

◆ nesting_indent_

int ACE_Trace::nesting_indent_ = ACE_Trace::DEFAULT_INDENT
staticprivate

Keeps track of how far to indent per trace call.


The documentation for this class was generated from the following files: