16 #include "tbb/spin_mutex.h"
45 DtOutputStreamBuffer*,
int&,
int,
DtPrinter*,
const std::string& );
47 typedef DtOutputStreamBuffer* (*DtOutputStreamBufferCreatorFcn)();
56 virtual void addPrinter(
DtPrinter* printer );
59 virtual void addAndManagePrinter(
DtPrinter* printer );
63 virtual void removePrinter(
DtPrinter* printer );
68 virtual DtOutputStream& printError(
const DtString& channel =
"" );
69 virtual DtOutputStream& printWarn(
const DtString& channel =
"" );
70 virtual DtOutputStream& printInfo(
const DtString& channel =
"" );
71 virtual DtOutputStream& printVerbose(
const DtString& channel =
"" );
72 virtual DtOutputStream& printDebug(
const DtString& channel =
"" );
76 virtual int channelNotifyLevel(
const DtString& channel );
77 virtual void setChannelNotifyLevel(
const DtString& channel,
int level );
80 virtual void setChannelPrefix(
const DtString& channel,
83 virtual bool channelEnabled(
const DtString& channel );
84 virtual void setChannelEnabled(
const DtString& channel,
87 virtual void addDefaultStream(
int notifyLevel, DtOutputStream&
stream );
89 virtual DtOutputStream& defaultStream(
int notifyLevel );
92 virtual void printStatus(
const DtString& channel =
"" );
96 virtual void setStreamCreatorFcn( DtOutputChannelStreamCreatorFcn fcn );
98 virtual void setStreamBufferCreatorFcn( DtOutputStreamBufferCreatorFcn fcn );
100 virtual DtOutputStreamBuffer* createStreamBuffer();
102 virtual void setManageDefaultStreams(
bool manage );
104 virtual std::vector<DtString> allChannels()
const;
108 virtual DtOutputStream& streamForChannel(
const DtString& channel,
int notifyLevel );
111 DtPrinter* default_printer = 0,
const std::string& prefix =
"" );
113 virtual void attachToAllStreams(
DtPrinter* printer );
114 virtual void detachFromAllStreams(
DtPrinter* printer );
118 virtual void addAllPrinters( DtOutputStream*
stream );
162 #ifdef DtObjectDebugger_Enable
169 DtPrinter* default_printer = 0,
const std::string& prefix =
"" )
170 : DtOutputStream( b, globalThresholdRef, threshold, default_printer )
179 virtual void write(
const std::string &str )
183 DtOutputStream::write( std::string(
"[") +
myPrefix +
"]: " + str );
187 DtOutputStream::write( str );
200 myStreamBufMutex.lock();
201 myStreamBuf->pubsync();
202 myStreamBufMutex.unlock();
212 vsprintf(str, s, args);
214 std::string temp(str);
218 DtOutputStream::write(std::string(
"[") +
myPrefix +
"]: " + temp);
222 DtOutputStream::write(temp);
239 DtPrinter* default_printer = 0,
const std::string& prefix =
"" )
bool enabled
Definition: outputChannelManager.h:40
DtOutputStreamBuffer * getBuffer()
Definition: outputChannelManager.h:233
ChannelSettings(int nl=DtNlInfo, const DtString &p="", bool enabled=false)
Definition: outputChannelManager.h:31
DT_DLL_VRVCORE DtTaitBryan level(const DtCoordinateSystem &cs, const DtVector &localOrigin, double topoHeading)
Returns a level orientation with the topographic heading.
DtOutputStreamBuffer myNullStreamBuffer
Definition: outputChannelManager.h:146
virtual void operator()(const char *s,...) override
This is a copy of DtOutputStream::operator() until the write().
Definition: outputChannelManager.h:192
std::vector< DefaultStreamInfo > myDefaultStreams
Definition: outputChannelManager.h:144
int notifyLevel
Definition: outputChannelManager.h:38
ChannelSettingsMap myChannelSettingsMap
Definition: outputChannelManager.h:136
virtual ~DtChannelSpecificOutputStream() override
Definition: outputChannelManager.h:176
#define DT_DEFINE_OBJECT_DEBUGGER_NAME(type)
Definition: objectCounter.h:31
typedef int(ZCALLBACK *close_file_func) OF((voidpf opaque
Default on in debug, off in release.
Definition: objectCounter.h:27
std::map< DtString, ChannelSettings * > ChannelSettingsMap
Definition: outputChannelManager.h:135
std::vector< DtPrinter * > myPrinters
Definition: outputChannelManager.h:132
Definition: outputChannelManager.h:161
tbb::spin_mutex myMutex
Definition: outputChannelManager.h:156
virtual void setPrefix(const DtString &str)
Definition: outputChannelManager.h:228
The DtOutputChannelManager class manages default streams and channel-specific streams by notify level...
Definition: outputChannelManager.h:25
std::string myPrefix
Definition: outputChannelManager.h:246
std::vector< DtChannelSpecificOutputStream * > StreamVector
Definition: outputChannelManager.h:140
Definition: outputChannelManager.h:122
DtOutputStreamBufferCreatorFcn myStreamBufferCreatorFcn
Definition: outputChannelManager.h:150
virtual void write(const std::string &str)
Definition: outputChannelManager.h:179
DtString prefix
Definition: outputChannelManager.h:39
bool myManageDefaultStreams
Definition: outputChannelManager.h:152
DtOutputChannelStreamCreatorFcn myStreamCreatorFcn
Definition: outputChannelManager.h:149
int & myGlobalNotifyReference
Definition: outputChannelManager.h:138
voidpf stream
Definition: ioapi.h:39
DtOutputStreamBuffer * myBuffer
Definition: outputChannelManager.h:247
Definition: outputChannelManager.h:29
Definition: rwTemplatedList.h:34
#define DT_DLL_vrfutil
This file is used to determine how to build Disable inconsistent dll linkage warning Visual Studio 6...
Definition: vrfutilDefines.h:34
DtOutputStreamBuffer * buffer
Definition: outputChannelManager.h:127
std::map< DtString, StreamVector > ChannelMap
Definition: outputChannelManager.h:141
DtOutputStream * stream
Definition: outputChannelManager.h:126
std::vector< DtPrinter * > myManagedPrinters
Definition: outputChannelManager.h:133
ChannelMap myChannelMap
Definition: outputChannelManager.h:142
DtChannelSpecificOutputStream(DtOutputStreamBuffer *b, int &globalThresholdRef, int threshold=1, DtPrinter *default_printer=0, const std::string &prefix="")
Definition: outputChannelManager.h:168
static DtChannelSpecificOutputStream * creator(DtOutputStreamBuffer *b, int &globalThresholdRef, int threshold=1, DtPrinter *default_printer=0, const std::string &prefix="")
Definition: outputChannelManager.h:238
std::unique_ptr< DtOutputStream > myNullStream
Definition: outputChannelManager.h:147