VR-Forces 5.0.2 Developer's Guide
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
outputLogger.h
Go to the documentation of this file.
1 /*********************************************************************
2 ** Copyright (c) 2004 MAK Technologies, Inc.
3 ** All rights reserved.
4 *********************************************************************/
5 /*********************************************************************
6 ** $RCSfile: outputLogger.h,v $ $Revision: 1.5 $ $State: Exp $
7 *********************************************************************/
8 
11 
12 #include <vlutil/vlPrint.h>
13 #include <string>
14 #include <vlutil/vlString.h>
15 
28 
29 #include "vrfutil/vrfutilDefines.h"
31 {
32 public:
33 
35  DtOutputLogger(const std::string& filename,
36  int &globalThreshold,
37  int threshold = 0);
38 
40  ~DtOutputLogger();
41 
43  void operator()(const char *s, ...);
44  void operator()(const std::string& s, ...);
45  void operator()(const DtString& s, ...);
46 
48  bool resetLog();
49 
51  const std::string& filename() const;
52 
56  bool setFilename(const std::string& newFilename);
57 
58  int threshold() const;
59  void setThreshold(int threshold);
60 
61  const int& globalThreshold() const;
62 
63  bool testInvariant() const;
64 
65 protected:
66 
67 private:
69  DtOutputLogger(const DtOutputLogger& orig);
70  const DtOutputLogger& operator=(const DtOutputLogger& orig);
71 
73  DtFilePrinter* myFilePrinter;
74 
76  DtOutputStreamBuffer* myBuffer;
77 
79  DtOutputStream* myLogger;
80 
84 
88 
90  std::string myFilename;
91 };
92 
int myThreshold
The current logging threshold for the logger. If the logger&#39;s threshold is &gt; the global threshold...
Definition: outputLogger.h:87
int & myGlobalThreshold
The threshold to measure against. If this is less than the threshold, then do not log anything...
Definition: outputLogger.h:83
DtOutputStream * myLogger
The output stream that does all the work.
Definition: outputLogger.h:79
const char * filename
Definition: ioapi.h:38
This is a simple class for logging information to a file. To be used, the caller must specify a loggi...
Definition: outputLogger.h:30
std::string myFilename
the original filename to log to
Definition: outputLogger.h:90
DtOutputStreamBuffer * myBuffer
The buffer used by the output stream.
Definition: outputLogger.h:76
#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
DtFilePrinter * myFilePrinter
The file printer to log to.
Definition: outputLogger.h:73

Document ID: Generated on Sun Dec 4 20:22:03 EST 2022 from SVN revision 249613
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)