VR-Forces 4.5 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
List of all members | Classes | Public Types | Public Member Functions | Protected Types | Protected Member Functions | Protected Attributes
DtOutputChannelManager Class Reference

The DtOutputChannelManager class manages default streams and channel-specific streams by notify level. More...

Classes

struct  ChannelSettings
struct  DefaultStreamInfo

Public Types

typedef
DtChannelSpecificOutputStream *(* 
DtOutputChannelStreamCreatorFcn )(DtOutputStreamBuffer *, int &, int, DtPrinter *, const std::string &)
typedef DtOutputStreamBuffer *(* DtOutputStreamBufferCreatorFcn )()

Public Member Functions

 DtOutputChannelManager (int &globalNotifyReference)
virtual ~DtOutputChannelManager ()
virtual void addPrinter (DtPrinter *printer)
 Adds a printer that will NOT be deleted when removed.
virtual void addAndManagePrinter (DtPrinter *printer)
 Adds a printer that will be deleted when removed.
virtual void removePrinter (DtPrinter *printer)
 Removes a printer.
virtual DtOutputStream & printError (const DtString &channel="")
 Stream access.
virtual DtOutputStream & printWarn (const DtString &channel="")
virtual DtOutputStream & printInfo (const DtString &channel="")
virtual DtOutputStream & printVerbose (const DtString &channel="")
virtual DtOutputStream & printDebug (const DtString &channel="")
virtual void setChannelSettings (const DtRwChannelDescriptorList &settings)
virtual int channelNotifyLevel (const DtString &channel)
virtual void setChannelNotifyLevel (const DtString &channel, int level)
virtual DtString channelPrefix (const DtString &channel)
virtual void setChannelPrefix (const DtString &channel, const DtString &prefix)
virtual bool channelEnabled (const DtString &channel)
virtual void setChannelEnabled (const DtString &channel, bool enabled)
virtual void addDefaultStream (int notifyLevel, DtOutputStream &stream)
virtual DtOutputStream & defaultStream (int notifyLevel)
virtual void printStatus (const DtString &channel="")
 Prints channel status. If channel is empty, prints all channels.
virtual DtString channelStatus (const DtString &channel)
virtual void setStreamCreatorFcn (DtOutputChannelStreamCreatorFcn fcn)
virtual void setStreamBufferCreatorFcn (DtOutputStreamBufferCreatorFcn fcn)
virtual DtOutputStreamBuffer * createStreamBuffer ()
virtual void setManageDefaultStreams (bool manage)
virtual std::vector< DtStringallChannels ()

Protected Types

typedef std::map< DtString,
ChannelSettings * > 
ChannelSettingsMap
typedef std::vector
< DtChannelSpecificOutputStream * > 
StreamVector
typedef std::map< DtString,
StreamVector
ChannelMap

Protected Member Functions

virtual DtOutputStream & streamForChannel (const DtString &channel, int notifyLevel)
virtual
DtChannelSpecificOutputStream
createStream (int &globalThresholdRef, int threshold=1, DtPrinter *dflt_printer=0, const std::string &prefix="")
virtual void attachToAllStreams (DtPrinter *printer)
virtual void detachFromAllStreams (DtPrinter *printer)
virtual ChannelSettingschannelSettings (const DtString &channel)
virtual void addAllPrinters (DtOutputStream *stream)

Protected Attributes

std::vector< DtPrinter * > myPrinters
std::vector< DtPrinter * > myManagedPrinters
ChannelSettingsMap myChannelSettingsMap
intmyGlobalNotifyReference
ChannelMap myChannelMap
std::vector< DefaultStreamInfomyDefaultStreams
DtOutputStreamBuffer myNullStreamBuffer
std::auto_ptr< DtOutputStream > myNullStream
DtOutputChannelStreamCreatorFcn myStreamCreatorFcn
DtOutputStreamBufferCreatorFcn myStreamBufferCreatorFcn
bool myManageDefaultStreams
tbb::spin_mutex myMutex

Detailed Description

The DtOutputChannelManager class manages default streams and channel-specific streams by notify level.

Default streams are used when no channel name is passed in.

Member Typedef Documentation

typedef DtChannelSpecificOutputStream*(* DtOutputChannelManager::DtOutputChannelStreamCreatorFcn)(DtOutputStreamBuffer *, int &, int, DtPrinter *, const std::string &)
typedef DtOutputStreamBuffer*(* DtOutputChannelManager::DtOutputStreamBufferCreatorFcn)()

Constructor & Destructor Documentation

DtOutputChannelManager::DtOutputChannelManager ( int globalNotifyReference)
virtual DtOutputChannelManager::~DtOutputChannelManager ( )
virtual

Member Function Documentation

virtual void DtOutputChannelManager::addPrinter ( DtPrinter printer)
virtual

Adds a printer that will NOT be deleted when removed.

virtual void DtOutputChannelManager::addAndManagePrinter ( DtPrinter printer)
virtual

Adds a printer that will be deleted when removed.

virtual void DtOutputChannelManager::removePrinter ( DtPrinter printer)
virtual

Removes a printer.

Removing a managed printer will NOT delete it. It will then be up to the user to delete the printer.

virtual DtOutputStream& DtOutputChannelManager::printError ( const DtString channel = "")
virtual

Stream access.

Will return the default stream when no channel is passed in. Creates the required stream if it does not exist already.

virtual DtOutputStream& DtOutputChannelManager::printWarn ( const DtString channel = "")
virtual
virtual DtOutputStream& DtOutputChannelManager::printInfo ( const DtString channel = "")
virtual
virtual DtOutputStream& DtOutputChannelManager::printVerbose ( const DtString channel = "")
virtual
virtual DtOutputStream& DtOutputChannelManager::printDebug ( const DtString channel = "")
virtual
virtual void DtOutputChannelManager::setChannelSettings ( const DtRwChannelDescriptorList settings)
virtual
virtual int DtOutputChannelManager::channelNotifyLevel ( const DtString channel)
virtual
virtual void DtOutputChannelManager::setChannelNotifyLevel ( const DtString channel,
int  level 
)
virtual
virtual DtString DtOutputChannelManager::channelPrefix ( const DtString channel)
virtual
virtual void DtOutputChannelManager::setChannelPrefix ( const DtString channel,
const DtString prefix 
)
virtual
virtual bool DtOutputChannelManager::channelEnabled ( const DtString channel)
virtual
virtual void DtOutputChannelManager::setChannelEnabled ( const DtString channel,
bool  enabled 
)
virtual
virtual void DtOutputChannelManager::addDefaultStream ( int  notifyLevel,
DtOutputStream &  stream 
)
virtual
virtual DtOutputStream& DtOutputChannelManager::defaultStream ( int  notifyLevel)
virtual
virtual void DtOutputChannelManager::printStatus ( const DtString channel = "")
virtual

Prints channel status. If channel is empty, prints all channels.

virtual DtString DtOutputChannelManager::channelStatus ( const DtString channel)
virtual
virtual void DtOutputChannelManager::setStreamCreatorFcn ( DtOutputChannelStreamCreatorFcn  fcn)
virtual
virtual void DtOutputChannelManager::setStreamBufferCreatorFcn ( DtOutputStreamBufferCreatorFcn  fcn)
virtual
virtual DtOutputStreamBuffer* DtOutputChannelManager::createStreamBuffer ( )
virtual
virtual void DtOutputChannelManager::setManageDefaultStreams ( bool  manage)
virtual
virtual std::vector<DtString> DtOutputChannelManager::allChannels ( )
virtual
virtual DtOutputStream& DtOutputChannelManager::streamForChannel ( const DtString channel,
int  notifyLevel 
)
protectedvirtual
virtual DtChannelSpecificOutputStream* DtOutputChannelManager::createStream ( int globalThresholdRef,
int  threshold = 1,
DtPrinter dflt_printer = 0,
const std::string &  prefix = "" 
)
protectedvirtual
virtual void DtOutputChannelManager::attachToAllStreams ( DtPrinter printer)
protectedvirtual
virtual void DtOutputChannelManager::detachFromAllStreams ( DtPrinter printer)
protectedvirtual
virtual ChannelSettings* DtOutputChannelManager::channelSettings ( const DtString channel)
protectedvirtual
virtual void DtOutputChannelManager::addAllPrinters ( DtOutputStream *  stream)
protectedvirtual

Member Data Documentation

std::vector<DtPrinter*> DtOutputChannelManager::myPrinters
protected
std::vector<DtPrinter*> DtOutputChannelManager::myManagedPrinters
protected
ChannelSettingsMap DtOutputChannelManager::myChannelSettingsMap
protected
int& DtOutputChannelManager::myGlobalNotifyReference
protected
ChannelMap DtOutputChannelManager::myChannelMap
protected
std::vector<DefaultStreamInfo> DtOutputChannelManager::myDefaultStreams
protected
DtOutputStreamBuffer DtOutputChannelManager::myNullStreamBuffer
protected
std::auto_ptr<DtOutputStream> DtOutputChannelManager::myNullStream
protected
DtOutputChannelStreamCreatorFcn DtOutputChannelManager::myStreamCreatorFcn
protected
DtOutputStreamBufferCreatorFcn DtOutputChannelManager::myStreamBufferCreatorFcn
protected
bool DtOutputChannelManager::myManageDefaultStreams
protected
tbb::spin_mutex DtOutputChannelManager::myMutex
protected

The documentation for this class was generated from the following file:

Document ID: Generated on Thu Mar 23 18:54:12 EDT 2017 from SVN revision 174804
Copyright © 2005-2017 VT MÄK. All Rights Reserved (www.mak.com)