rwlogo
SourcePro 11.1

SourcePro® C++ API Reference Guide



   SourcePro C++
Documentation Home

RWTraceEventClient Class Reference
[Execution Tracing]

A handle class for trace event client implementations. More...

#include <rw/trace/RWTraceEventClient.h>

Inheritance diagram for RWTraceEventClient:
RWTraceEventFilter RWTraceOstreamClient RWTraceMultiClientFilter RWTraceSingleClientFilter RWTraceLevelFilter RWTraceManager

List of all members.

Public Member Functions

 RWTraceEventClient (RWTraceEventClientImp *bodyP=0)
 RWTraceEventClient (RWStaticCtor)
 RWTraceEventClient (const RWTraceEventClient &second)
virtual ~RWTraceEventClient (void)
RWTraceEventClientoperator= (const RWTraceEventClient &second)
RWTraceEventClientoperator= (RWTraceEventClientImp *ptr)
void validate (void) const
bool isValid (void) const
bool operator== (const RWTraceEventClient &second) const
bool operator!= (const RWTraceEventClient &second) const
void orphan (void)
void connectToManager (void)
void connect (RWTraceEventFilter &filter)
void disconnect (void)
void trace (const RWTraceEvent &ev)

Protected Member Functions

void transfer (RWTraceEventClientImp *bodyP=0)
RWTraceEventClientImpgetBody (void) const

Detailed Description

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.

See also:
RWTraceEventFilter, RWTraceEventClientImp

Constructor & Destructor Documentation

RWTraceEventClient::RWTraceEventClient ( RWTraceEventClientImp bodyP = 0  ) 

Attaches to and increments the reference count on bodyP .

RWTraceEventClient::RWTraceEventClient ( RWStaticCtor   ) 

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

RWTraceEventClient::RWTraceEventClient ( const RWTraceEventClient second  ) 

Attaches to and increments the reference count on second 's body.

virtual RWTraceEventClient::~RWTraceEventClient ( void   )  [virtual]

Destructor.


Member Function Documentation

void RWTraceEventClient::connect ( RWTraceEventFilter filter  ) 

Connects the client with the filter passed as an argument. If the client is already connected, throws the exception RWTraceClientAlreadyConnected.

void RWTraceEventClient::connectToManager ( void   ) 

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 RWTraceEventClient::disconnect ( void   ) 

Disconnects the client from the filter it is currently attached to. If the client is not connected, throws the exception RWTraceClientNotConnected.

RWTraceEventClientImp* RWTraceEventClient::getBody ( void   )  const [protected]

Returns a pointer to the associated body. Throws an RWTraceInvalidPointer.

bool RWTraceEventClient::isValid ( void   )  const

Returns true if this handle is connected to a body, and otherwise returns false.

bool RWTraceEventClient::operator!= ( const RWTraceEventClient second  )  const

Tests to see if this instance points to a different body than the second instance points to.

RWTraceEventClient& 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& 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.

bool RWTraceEventClient::operator== ( const RWTraceEventClient second  )  const

Tests to see if this instance points to the same body as the second instance.

void RWTraceEventClient::orphan ( void   ) 

Detaches from the current body (if any), decrements its reference count, and deletes it if there are no other references.

void RWTraceEventClient::trace ( const RWTraceEvent &  ev  ) 

Accepts a trace event.

void RWTraceEventClient::transfer ( RWTraceEventClientImp bodyP = 0  )  [protected]

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.

void RWTraceEventClient::validate ( void   )  const
Exceptions:
RWTraceInvalidPointer Thrown if this handle is not connected to a valid body.

© 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.