![]() |
VR-Forces 4.0.4 Class Documentation
|
00001 /********************************************************************* 00002 ** Copyright (c) 2004 MAK Technologies, Inc. 00003 ** All rights reserved. 00004 *********************************************************************/ 00005 /********************************************************************* 00006 ** $RCSfile: outputLogger.h,v $ $Revision: 1.5 $ $State: Exp $ 00007 *********************************************************************/ 00008 00011 00012 #include <vlutil/vlPrint.h> 00013 #include <string> 00014 #include <vlutil/vlString.h> 00015 00028 00029 #include "vrfutil/vrfutilDefines.h" 00030 class DT_DLL_vrfutil DtOutputLogger 00031 { 00032 public: 00033 00035 DtOutputLogger(const std::string& filename, 00036 int &globalThreshold, 00037 int threshold = 0); 00038 00040 ~DtOutputLogger(); 00041 00043 void operator()(const char *s, ...); 00044 void operator()(const std::string& s, ...); 00045 void operator()(const DtString& s, ...); 00046 00048 bool resetLog(); 00049 00051 const std::string& filename() const; 00052 00056 bool setFilename(const std::string& newFilename); 00057 00058 int threshold() const; 00059 void setThreshold(int threshold); 00060 00061 const int& globalThreshold() const; 00062 00063 bool testInvariant() const; 00064 00065 protected: 00066 00067 private: 00069 DtOutputLogger(const DtOutputLogger& orig); 00070 const DtOutputLogger& operator=(const DtOutputLogger& orig); 00071 00073 DtFilePrinter* myFilePrinter; 00074 00076 DtOutputStreamBuffer* myBuffer; 00077 00079 DtOutputStream* myLogger; 00080 00083 int& myGlobalThreshold; 00084 00087 int myThreshold; 00088 00090 std::string myFilename; 00091 }; 00092