Cross-Platform C++

ot::auxil
class TraceHelper

#include "ot/auxil/TraceHelper.h"

ot::Tracer ot::ManagedObject




Constructor/Destructor Summary
TraceHelper(const String& name, const String& command)
        
~TraceHelper()
        

Method Summary
protected  virtual void doActivate(short nSection, short nLevel)
         Virtual function called in response to Activate().
protected  virtual void doTrace(short nSection, short nLevel, const CharType* message, size_t len)
         Virtual function called in response to Trace().
protected  virtual void doTraceBytes(short nSection, short nLevel, const String& message, const Byte* bytes, size_t len)
         Virtual function called in response to Trace().
protected  void formatOutput(short nSection, short nLevel)
        

Methods inherited from class ot::ManagedObject
addRef, getRefCount, onFinalRelease, operator=, release

Methods inherited from class ot::Tracer
Activate, Enable, GetSectionName, GetSectionNumber, getUserSectionName, getUserSectionNumber, IsEnabled, SetTracer, Trace, Trace, TraceBytes

Constructor/Destructor Detail

TraceHelper

 TraceHelper(const String& name,
             const String& command)


~TraceHelper

 ~TraceHelper()


Method Detail

doActivate

protected virtual void doActivate(short nSection,
                                  short nLevel)
Virtual function called in response to Activate(). Concrete implementations are expected to maintain a table representing the sections of code which have had tracing enabled, and the level of tracing to be performed for each section.

Parameters:
nSection - the identifier of the section of code that raises events. OpenTop trace events use a member from the Tracer::Sections enumeration, user trace events can use an assigned number starting with Tracer::User.
nLevel - a short integer indicating the level to which trace events should be processed for the specified section.
See also:
Activate()
Multi-threaded considerations:
Can safely be called from multiple concurrent threads.

doTrace

protected virtual void doTrace(short nSection,
                               short nLevel,
                               const CharType* message,
                               size_t len)
Virtual function called in response to Trace().

Parameters:
nSection - the identifier of the section of code that's raising the event. OpenTop trace events use a member from the Tracer::Sections enumeration, user trace events can use an assigned number starting with Tracer::User.
nLevel - a short integer indicating the relative importance of the trace event. The value should be between Tracer::Highest and Tracer::Min. The Tracer implementation can use this value when deciding how to process an event. In general, a lower number indicates a more severe condition which is more likely to be processed.
message - a string describing the trace event.
len - the length of the message.
Multi-threaded considerations:
Can safely be called from multiple concurrent threads.

doTraceBytes

protected virtual void doTraceBytes(short nSection,
                                    short nLevel,
                                    const String& message,
                                    const Byte* bytes,
                                    size_t len)
Virtual function called in response to Trace().

Parameters:
nSection - the identifier of the section of code that's raising the event. OpenTop trace events use a member from the Tracer::Sections enumeration, user trace events can use an assigned number starting with Tracer::User.
nLevel - a short integer indicating the relative importance of the trace event. The value should be between Tracer::Highest and Tracer::Min. The Tracer implementation can use this value when deciding how to process an event. In general, a lower number indicates a more severe condition which is more likely to be processed.
message - a string describing the trace event.
bytes - a pointer to an array of bytes representing the detail of the event
len - the length of the byte array
Multi-threaded considerations:
Can safely be called from multiple concurrent threads.

formatOutput

protected void formatOutput(short nSection,
                            short nLevel)



Cross-Platform C++

Found a bug or missing feature? Please email us at support@elcel.com

Copyright © 2000-2003 ElCel Technology   Trademark Acknowledgements