SourcePro® API Reference Guide

 
Loading...
Searching...
No Matches
RWTraceEventClient Class Reference

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

#include <rw/trace/RWTraceEventClient.h>

Inheritance diagram for RWTraceEventClient:
RWTraceEventFilter RWTraceOstreamClient RWTraceMultiClientFilter RWTraceSingleClientFilter RWTraceLevelFilter RWTraceManager

Public Member Functions

 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
 
RWTraceEventClientoperator= (const RWTraceEventClient &second)
 
RWTraceEventClientoperator= (RWTraceEventClientImp *ptr)
 
void orphan (void)
 
void trace (const RWTraceEvent &ev)
 
void validate (void) const
 

Protected Member Functions

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

Friends

bool operator== (const RWTraceEventClient &lhs, const RWTraceEventClient &rhs)
 

Related Symbols

(Note that these are not member symbols.)

bool operator!= (const RWTraceEventClient &lhs, const RWTraceEventClient &rhs)
 

Detailed Description

RWTraceEventClient is the handle for trace event client implementations, forwarding messages to its body for processing. 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.

See also
RWTraceEventFilter, RWTraceEventClientImp

Constructor & Destructor Documentation

◆ RWTraceEventClient() [1/4]

RWTraceEventClient::RWTraceEventClient ( )

Creates an unattached handle.

◆ RWTraceEventClient() [2/4]

RWTraceEventClient::RWTraceEventClient ( RWTraceEventClientImp * bodyP)
explicit

Attaches to and increments the reference count on bodyP.

◆ RWTraceEventClient() [3/4]

RWTraceEventClient::RWTraceEventClient ( RWStaticCtor )

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

◆ RWTraceEventClient() [4/4]

RWTraceEventClient::RWTraceEventClient ( const RWTraceEventClient & second)

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

◆ ~RWTraceEventClient()

virtual RWTraceEventClient::~RWTraceEventClient ( void )
virtual

Destructor.

Member Function Documentation

◆ connect()

void RWTraceEventClient::connect ( RWTraceEventFilter & filter)

Connects the client with the filter.

If the client is already connected, throws the exception RWTraceClientAlreadyConnected.

◆ connectToManager()

void RWTraceEventClient::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.

◆ disconnect()

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.

◆ getBody()

RWTraceEventClientImp * RWTraceEventClient::getBody ( void ) const
protected

Returns a pointer to the associated body.

If the pointer is not associated with a body, throws RWTraceInvalidPointer.

◆ isValid()

bool RWTraceEventClient::isValid ( void ) const

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

◆ operator=() [1/2]

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 the body of second and increments its reference count.

◆ operator=() [2/2]

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 body ptr and increments its reference count.

◆ orphan()

void RWTraceEventClient::orphan ( void )

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

◆ trace()

void RWTraceEventClient::trace ( const RWTraceEvent & ev)

Accepts a trace event.

◆ transfer()

void RWTraceEventClient::transfer ( RWTraceEventClientImp * bodyP = 0)
protected

Associates this handle with the body pointed to by bodyP and increments its reference count.

If this handle is already associated with a body, detaches from that body, decrements its reference count, and deletes it if there are no other references.

◆ validate()

void RWTraceEventClient::validate ( void ) const

Tests that this handle is associated with a body. If not, throws RWTraceInvalidPointer.

Friends And Related Symbol Documentation

◆ operator!=()

bool operator!= ( const RWTraceEventClient & lhs,
const RWTraceEventClient & rhs )
related

◆ operator==

bool operator== ( const RWTraceEventClient & lhs,
const RWTraceEventClient & rhs )
friend

Returns true if the lhs instance points to the same body as the rhs instance.

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