Rogue Wave banner
Previous fileTop of DocumentContentsIndexNext file

RWTraceLevelFilter


RWTraceLevelFilter RWTraceSingleClientfilter RWTraceEventFilter... ... RWTraceEventClient

Data Type and Member Function Indexes
(exclusive of constructors and destructors)

Member Functions

Package

Execution Tracing

Header File

#include <rw/trace/RWTraceLevelFilter.h>

Description

RWTraceLevelFilter is a single-client filter that lets only events of the supplied severity level or higher pass through.

Example

The following is a description of each program line:

//1Compile in all trace macros by setting the user trace level macro to 8. This line sets the maximum trace level to compile into the code. To compile in all the trace macros, the level is set to the maximum 8 (Entry/Exit). You could also define the trace level on the command line for your compiler, using the flag -DRW_USER_TRACE_LEVEL=8.
//2Create a normal ostream client to display the trace information.
//3Instantiate an RWTraceLevelFilter. The constructor takes the maximum level of trace messages to pass through. You can pass an integer level number (see Section 6.1.3 of the Threads.h++ User's Guide) or use one of the symbolic constants, as in this line. Pass 0 to filter out all trace messages.
//4Connect the client to the level filter.
//5Then connect the filter to the trace manager.
//6Declare the function as traceable, so you can use trace event generation macros in this function.
//7Change the cutoff level on the level filter, using the setLevel() function.

The symbolic constants referred to in line //3 are defined in the file
rw/trace/RWTraceEventSeverity.h. They cannot be used when setting the RW_USER_TRACE_LEVEL macro, because this macro needs to be set before including any trace header files. They include:

Public Constructors

RWTraceLevelFilter(RWStaticCtor);
RWTraceLevelFilter(RWTraceEventSeverity level = RW_TRACE_LEVEL_NONE);
RWTraceLevelFilter(RWTraceLevelFilterImp* bodyP);
RWTraceLevelFilter(const RWTraceLevelFilter& second);

Public Member Functions

RWTraceEventSeverity 
getLevel() const;
void 
setLevel(const RWTraceEventSeverity level);


Previous fileTop of DocumentContentsIndexNext file

©Copyright 2000, Rogue Wave Software, Inc.
Contact Rogue Wave about documentation or support issues.