Module: Threads Package: Execution Tracing
Base Class
connect() connectToManager() disconnect() getBody() |
isValid() operator operator! orphan() |
RWTraceEventClient() trace() transfer() validate() |
~RWTraceEventClient() |
#include <rw/trace/RWTraceEventClient.h>
RWTraceEventClient is the handle for trace event client implementations. A client must be connected to a filter (or the global trace manager) to receive trace messages. The filter calls the trace() method each time a trace event is generated. Derived clients should redefine this method to process the event.
RWTraceEventClient(RWStaticCtor);
Constructs a global static handle instance (may be used before being constructed).
RWTraceEventClient(RWTraceEventClientImp* bodyP = 0);
Attaches to and increments the reference count on a body.
RWTraceEventClient(const RWTraceEventClient& second);
Attaches to and increments the reference count on second 's body.
virtual ~RWTraceEventClient();
Destructor.
bool operator!=(const RWTraceEventClient& second);
Tests to see if this instance points to a different body than the second instance points to.
bool operator==(const RWTraceEventClient& second);
Tests to see if this instance points to the same body as the second instance.
RWTraceEventClient& operator=(RWTraceEventClientImp* ptr);
Detaches from the current body (if any), decrements its reference count, deletes it if there are no other references, and then attaches to the pointer body and increments its reference count.
RWTraceEventClient& operator=(const RWTraceEventClient& second);
Detaches from the current body (if any), decrements its reference count, deletes it if there are no other references, and then attaches to second 's body and increments its reference count.
void connect(RWTraceEventFilter& filter);
Connects the client with the filter passed as an argument. If the client is already connected, throws the exception RWTraceClientAlreadyConnected.
void connectToManager();
Connects the client with the global singleton trace event manager. If the client is already connected, throws the exception RWTraceClientAlreadyConnected. If the manager already has a client connected (there can be only one), throws the exception RWTraceClientAlreadyAdded.
void disconnect();
Disconnects the client from the filter it is currently attached to. If the client is not connected, throws the exception RWTraceClientNotConnected.
bool isValid() const;
Returns true if this handle is connected to a body, and otherwise returns false.
void orphan();
Detaches from the current body (if any), decrements its reference count, and deletes it if there are no other references.
void trace(const RWTraceEvent& ev);
Accepts a trace event. This method must be overridden by derived clients in order to handle the trace event, perhaps printing it to the standard output or storing it in a file. See the discussion about the TraceEventClient in Section 6.7.2 in the Threads Module User's Guide.
void validate() const;
Throws exception RWTraceInvalidPointer if this handle is not connected to a valid body.
void transfer(RWTraceEventClientImp* bodyP=0);
Associates this handle with the body pointed to by bodyP. If this handle currently has a body, its reference count is decremented, and it is deleted if this is the best handle.
RWTraceEventClientImp* getBody() const;
Returns a pointer to the associated body. Throws an RWTraceInvalidPointer.
RWTraceEventFilter, RWTraceEventClientImp
© Copyright Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave and SourcePro are registered trademarks of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.
Contact Rogue Wave about documentation or support issues.