26 #ifdef DtUSE_UTILITIES_NAMESPACE
27 namespace DtUSE_UTILITIES_NAMESPACE
73 virtual void write(
const std::string& str,
int notify_level,
bool newLine ) = 0;
99 virtual void setPrintTimestamps(
bool doit );
104 virtual void setLogRollingInterval(
unsigned int intervalInSeconds );
108 virtual void resetFile(
const char* filename );
111 virtual bool isOpen();
115 virtual void write(
const std::string& st,
int notify_level,
bool newLine );
120 virtual void cacheFilename(
const std::string& filename );
167 virtual void write(
const std::string& st,
int notify_level,
bool newLine );
190 virtual void write(
const std::string& st,
int notify_level,
bool newLine );
209 DtWindowsConsolePrinter(
bool disableClose =
false );
212 virtual ~DtWindowsConsolePrinter();
215 virtual void write(
const std::string& st,
int notify_level,
bool newLine );
219 HANDLE myConsoleHandle;
248 virtual int_type overflow( int_type c );
293 int threshold = 1,
DtPrinter* dflt_printer = 0 );
299 virtual void attachPrinter(
DtPrinter* sink );
303 virtual bool detachPrinter(
DtPrinter* sink );
307 virtual void detachAllPrinters();
312 virtual void write(
const std::string& str,
bool newLine =
false );
316 virtual void setThreshold(
int level );
320 virtual int threshold()
const;
325 virtual bool okToPrint()
const;
328 virtual void operator () (
const char* s, ... );
446 DT_DLL_VLUTIL void setFileOutput(
const char* filename,
int con = 0,
int son = 0 );
469 DT_DLL_VLUTIL int vsnprintf(
char*,
size_t,
const char*, va_list );
515 #ifdef DtUSE_UTILITIES_NAMESPACE
class DtStderrPrinter is a subclass of DtPrinter which copies all input received from DtOutputStream ...
Definition: vlPrint.h:179
void DtSetVrLinkPrinter(DtPrinter *newPrinter)
DtSetVrLinkPrinter is provided for backwards compatibility.
This file contains the declaration of DtMutex.
DtOutputStream DtFatal
These DtOutputStream instances are used for all print messaging in VR-Link.
DtPrinter()
Default CTOR.
Definition: vlPrint.h:486
DtStdoutPrinter()
Default CTOR.
Definition: vlPrint.h:498
unsigned int myLogRollingInterval
Definition: vlPrint.h:138
void DtSetAbortFunc(DtAbortFunc func)
bool myTimestampFlag
Definition: vlPrint.h:134
DtPrinter is an abstract base class which provides an interface for output.
Definition: vlPrint.h:57
Contains the DtString class declaration.
DtFilePrinter is a subclass of DtPrinter which opens a file and dumps all information received from D...
Definition: vlPrint.h:82
DtMutex myFileLock
Definition: vlPrint.h:132
std::string myFilename
Definition: vlPrint.h:140
DtStderrPrinter DtStandardErrorConsole
This class is a basic DtPrinter instance which can be used with DtOutputStream instances.
virtual ~DtPrinter()
Virtual DTOR.
Definition: vlPrint.h:494
void DtWarnPerror(const char *str,...)
These functions print messages using DtOutputStreams depending on the notify level.
DtMutex myPrintersMutex
Definition: vlPrint.h:346
DtStdoutPrinter is a subclass of DtPrinter which copies all input received from DtOutputStream to the...
Definition: vlPrint.h:156
virtual ~DtStdoutPrinter()
Virtual DTOR.
Definition: vlPrint.h:502
DtOutputStreamBuffer is the internal buffer for DtOutputStream.
Definition: vlPrint.h:233
DtOutputStream * myOutputStream
Definition: vlPrint.h:262
std::string myFileBase
Definition: vlPrint.h:141
virtual ~DtStderrPrinter()
Virtual DTOR.
Definition: vlPrint.h:510
DtOutputStreamBuffer * myStreamBuf
Definition: vlPrint.h:343
void(* DtAbortFunc)()
Definition: vlPrint.h:460
DtStdoutPrinter DtStandardOutConsole
This class is a basic DtPrinter instance which can be used with DtOutputStream instances.
int & myGlobalThresholdReference
This is the global value we compare myThreshold to.
Definition: vlPrint.h:350
int DtNotifyLevel
DtNotifyLevel is used to control the level of diagnostics output by VR-Link.
int myThreshold
Definition: vlPrint.h:347
DtMutex myLock
Definition: vlPrint.h:171
PrinterPtrVec myPrinters
Definition: vlPrint.h:345
instances of DtMutex are used to provide a platform independent mutual exclusion mechanism ...
Definition: vlMutex.h:31
DtOutputStream DtVerbose
These DtOutputStream instances are used for all print messaging in VR-Link.
DtOutputStream is used for all toolkit output.
Definition: vlPrint.h:284
void DtFatalNetPerror(const char *str,...)
These functions print messages using DtOutputStreams depending on the notify level.
DtOutputStream DtWarn
These DtOutputStream instances are used for all print messaging in VR-Link.
void DtFatalPerror(const char *str,...)
These functions print messages using DtOutputStreams depending on the notify level.
void DtAbort()
DtAbort() exits the program.
std::vector< DtPrinter * > PrinterPtrVec
Definition: vlPrint.h:341
void DtPrintEnvironmentVariables(DtOutputStream &os=DtInfo)
Print the environment variables If notifyLevel isn't specified, function will use DtNlInfo as appropr...
DtString DtFormatPrintString(const DtOutputStream &os, const char *fmt,...)
Formats a printf-style string into a DtString.
DtOutputStream DtInfo
DtInfo is an global instance of a DtOutputStream.
virtual void setThreshold(int level)
Sets the threshold required for sending string output to all attached printer.
Definition: vlPrint.h:476
DtAbortFunc DtGetAbortFunc()
std::string myFileExt
Definition: vlPrint.h:142
DtStderrPrinter()
Default CTOR.
Definition: vlPrint.h:506
time_t myLogFileOpenTime
Definition: vlPrint.h:136
DtNotifyLevelType
Default is DtNlInfo.
Definition: vlPrint.h:41
Instances of DtString are used to represent strings.
Definition: vlString.h:38
std::string myBuffer
Definition: vlPrint.h:260
void DtFatalError(const char *str,...)
These functions print messages using DtOutputStreams depending on the notify level.
DtMutex myStreamBufMutex
Definition: vlPrint.h:344
unsigned int myLogRollingIndex
Definition: vlPrint.h:137
virtual int threshold() const
Returns the current threshold required to send string output to all attached printers.
Definition: vlPrint.h:481
DtMutex myBufferMutex
Definition: vlPrint.h:261
void DtWarnNetPerror(const char *str,...)
These functions print messages using DtOutputStreams depending on the notify level.
DtMutex myLock
Definition: vlPrint.h:194
This file contains typedefs for machine dependant types.
std::ofstream myFile
Definition: vlPrint.h:145
#define DT_DLL_VLUTIL
Definition: vlMachineTypes.h:121
DtOutputStream DtDebug
These DtOutputStream instances are used for all print messaging in VR-Link.