SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWTraceManager Class Reference

The handle to a singleton trace event manager implementation. More...

#include <rw/trace/RWTraceManager.h>

Inheritance diagram for RWTraceManager:
RWTraceLevelFilter RWTraceSingleClientFilter RWTraceEventFilter RWTraceEventClient

Public Member Functions

 RWTraceManager (const RWTraceManager &second)
 
 RWTraceManager (RWStaticCtor)
 
 RWTraceManager (void)
 
 ~RWTraceManager (void)
 
RWTraceEventSeverity getTraceLevel () const
 
void setTraceLevel (RWTraceEventSeverity level)
 
- Public Member Functions inherited from RWTraceLevelFilter
 RWTraceLevelFilter ()
 
 RWTraceLevelFilter (const RWTraceLevelFilter &second)
 
 RWTraceLevelFilter (RWStaticCtor)
 
 RWTraceLevelFilter (RWTraceEventSeverity level)
 
 RWTraceLevelFilter (RWTraceLevelFilterImp *bodyP)
 
 ~RWTraceLevelFilter (void)
 
RWTraceEventSeverity getLevel () const
 
void setLevel (RWTraceEventSeverity level)
 
- Public Member Functions inherited from RWTraceSingleClientFilter
 RWTraceSingleClientFilter (const RWTraceSingleClientFilter &second)
 
 RWTraceSingleClientFilter (RWStaticCtor)
 
 RWTraceSingleClientFilter (RWTraceSingleClientFilterImp *bodyP)
 
 RWTraceSingleClientFilter (void)
 
 ~RWTraceSingleClientFilter (void)
 
void disconnectClient (void)
 
RWTraceSingleClientFilteroperator= (const RWTraceSingleClientFilter &second)
 
- Public Member Functions inherited from RWTraceEventFilter
 RWTraceEventFilter ()
 
 RWTraceEventFilter (const RWTraceEventFilter &second)
 
 RWTraceEventFilter (RWStaticCtor)
 
 RWTraceEventFilter (RWTraceEventFilterImp *bodyP)
 
 ~RWTraceEventFilter (void)
 
RWTraceEventFilteroperator= (const RWTraceEventFilter &second)
 
- Public Member Functions inherited from RWTraceEventClient
 RWTraceEventClient ()
 
 RWTraceEventClient (const RWTraceEventClient &second)
 
 RWTraceEventClient (RWStaticCtor)
 
 RWTraceEventClient (RWTraceEventClientImp *bodyP)
 
virtual ~RWTraceEventClient (void)
 
void connect (RWTraceEventFilter &filter)
 
void connectToManager (void)
 
void disconnect (void)
 
bool isValid (void) const
 
bool operator!= (const RWTraceEventClient &second) const
 
RWTraceEventClientoperator= (const RWTraceEventClient &second)
 
RWTraceEventClientoperator= (RWTraceEventClientImp *ptr)
 
bool operator== (const RWTraceEventClient &second) const
 
void orphan (void)
 
void trace (const RWTraceEvent &ev)
 
void validate (void) const
 

Static Public Member Functions

static void disconnectClient (void)
 
static RWTraceManager instance (void)
 

Additional Inherited Members

- Protected Member Functions inherited from RWTraceEventClient
RWTraceEventClientImpgetBody (void) const
 
void transfer (RWTraceEventClientImp *bodyP=0)
 

Detailed Description

RWTraceManager is the handle for the singleton trace event manager implementation, which accepts and forwards trace information to the connected client.

Attempts to add a client when there is one present already throw an exception.

If no client is connected, the manager buffers events. The maximum number of buffered events defaults to 100. If the maximum number of buffered events is reached, the oldest event is removed from the buffer to make room for the newest one.

To specify the buffer's size, use the environment variable RW_TRACE_BUFFER_SIZE. Once a client is connected, the manager immediately forwards all buffered trace events, and buffering ceases. Buffering resumes when the client is disconnected.

To specify the minimum severity level for event generation, use the environment variable RW_TRACE_LEVEL. The default severity level is INFO. The environment variable can be set to one of the following: FATAL, ERROR, WARNING, INFO, TEST, DEBUG, ENTRY, or NONE.

The singleton trace event manager implementation is reference-counted to ensure that it will not be destroyed while a client is still connected to it.

Constructor & Destructor Documentation

◆ RWTraceManager() [1/3]

RWTraceManager::RWTraceManager ( void )

Default constructor. Always returns a handle whose body is the singleton trace event manager implementation.

◆ RWTraceManager() [2/3]

RWTraceManager::RWTraceManager ( RWStaticCtor )

Constructs a global static handle instance (that may be used before being constructed).

◆ RWTraceManager() [3/3]

RWTraceManager::RWTraceManager ( const RWTraceManager & second)

Attaches to and increments the reference count on the body of second.

◆ ~RWTraceManager()

RWTraceManager::~RWTraceManager ( void )

Destructor.

Member Function Documentation

◆ disconnectClient()

static void RWTraceManager::disconnectClient ( void )
static

Disconnects the client from the trace manager singleton.

◆ getTraceLevel()

RWTraceEventSeverity RWTraceManager::getTraceLevel ( ) const
inline
Deprecated
As of SourcePro 11.1, use getLevel() instead.

Returns the trace manager's runtime severity level.

◆ instance()

static RWTraceManager RWTraceManager::instance ( void )
static

Static method that returns a handle to the manager. Initialization is performed, if not already completed. This includes setting the maximum buffer size if the environment variable RW_TRACE_BUFFER_SIZE has a positive numeric value.

◆ setTraceLevel()

void RWTraceManager::setTraceLevel ( RWTraceEventSeverity level)
inline
Deprecated
As of SourcePro 11.1, use setLevel() instead.

Sets the trace manager's runtime severity level.

Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved.