SourcePro® 2021.1 |
SourcePro® API Reference Guide |
Product Documentation: SourcePro Documentation Home |
A body class for trace event client implementations. More...
#include <rw/trace/RWTraceEventClientImp.h>
Public Member Functions | |
virtual | ~RWTraceEventClientImp (void) |
void | addReference (void) |
void | connect (RWTraceEventFilter &filter) |
void | connectToManager (void) |
void | disconnect (void) |
unsigned | removeReference (void) |
void | trace (const RWTraceEvent &ev) |
Protected Member Functions | |
RWTraceEventClientImp (void) | |
virtual void | doTrace (const RWTraceEvent &ev)=0 |
RWMutex & | getMutex (void) |
RWTraceEventClientImp is a body class that provides an interface for trace event clients. Derived clients are required to implement this interface.
|
virtual |
Destructor.
|
protected |
Default constructor.
|
inline |
Increments the reference count.
void RWTraceEventClientImp::connect | ( | RWTraceEventFilter & | filter | ) |
Connects the client with the filter.
If the client is already connected, throws the exception RWTraceClientAlreadyConnected.
void RWTraceEventClientImp::connectToManager | ( | void | ) |
Connects the client with the global singleton trace event manager. The manager allows a single client connection at a time.
If the client is already connected, throws the exception RWTraceClientAlreadyConnected. If the manager already has a client connected, throws the exception RWTraceClientAlreadyAdded.
void RWTraceEventClientImp::disconnect | ( | void | ) |
Disconnects the client from the filter it is currently attached to.
If the client is not connected, throws the exception RWTraceClientNotConnected.
|
protectedpure virtual |
Processes a trace event. This method must be overridden by derived clients to provide a way to handle the trace event, perhaps by printing it to standard output or storing it in a file. See the discussion on the TraceEventClient in the Threads Module User's Guide.
Implemented in RWTraceSingleClientFilterImp, RWTraceLevelFilterImp, RWTraceMultiClientFilterImp, and RWTraceOstreamClientImp.
|
inlineprotected |
Returns the mutex used for thread safety. The mutex can be used by derived clients.
|
inline |
Decrements the reference count.
void RWTraceEventClientImp::trace | ( | const RWTraceEvent & | ev | ) |
Forwards trace information to the doTrace() member.
Copyright © 2021 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |