VR-Forces 4.6.1 Class Documentation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
objectConsole.h
Go to the documentation of this file.
1 /*******************************************************************************
2 ** Copyright (c) 2014 MAK Technologies, Inc.
3 ** All rights reserved.
4 *******************************************************************************/
5 
8 
10 #pragma once
11 
12 #include <list>
13 #include <vlutil/vlPrint.h>
15 #include <vlutil/vlFilename.h>
18 #include "vrfutil/vrfPrint.h"
19 
20 class DtVrfObject;
21 class DtOutputStream;
22 class DtOutputStreamBuffer;
23 class DtPrinter;
24 class DtVrfObjectMessage;
25 class DtSimMessage;
26 
27 DT_DLL_vrfobjcore std::string moduleFromFilename(const std::string& file);
28 
30 
31 #ifndef trUtf8
32 #define trUtf8(_message, _module) DtTranslatableStream(_message, _module)
33 #else
34 #error "trutf8 already defined!"
35 #endif
36 
42 {
43 private:
47  DtObjectConsole(const DtObjectConsole& orig);
48  DtObjectConsole& operator=(const DtObjectConsole& orig);
50 
51 public:
53  virtual ~DtObjectConsole();
54 
57  virtual bool init();
58 
65  virtual void registerMessageCallbacks();
66 
68  virtual void setNotifyLevel(DtNotifyLevelType level);
69  virtual void setNotifyLevel(const DtString& channel, DtNotifyLevelType level);
71  virtual DtNotifyLevelType notifyLevel() const;
72 
77  virtual void printToFile(const DtFilename& filename);
79  virtual void stopPrintingToFile();
80 
83  virtual DtOutputStream& debugStream(const DtString& channel = "");
84  virtual DtOutputStream& verboseStream(const DtString& channel = "");
85  virtual DtOutputStream& infoStream(const DtString& channel = "");
86  virtual DtOutputStream& warnStream(const DtString& channel = "");
87  virtual DtOutputStream& errorStream(const DtString& channel = "");
89 
92  virtual void addConsolePrinter(DtPrinter* printer);
93 
100  virtual void addAndManageConsolePrinter(DtPrinter* printer);
101 
104  virtual void removeConsolePrinter(DtPrinter* printer);
105 
106  virtual DtOutputChannelManager& channelManager();
107 
108 protected:
111  virtual void addDefaultPrinters();
112 
113  static void logToFileCallback(const DtVrfObjectMessage* msg, void* usr);
114  virtual void processLogToFile(const DtVrfObjectMessage* msg);
115 
116  static void stopLoggingToFileCallback(const DtVrfObjectMessage* msg, void* usr);
117  virtual void processStopLoggingToFile(const DtVrfObjectMessage* msg);
118 
119  static void setNotifyLevelCallback(DtSimMessage* msg, void* usr);
120  virtual void processSetNotifyLevel(DtSimMessage* msg);
121 
122 protected:
123 
129  DtFilePrinter* myFilePrinter;
130 
132 };

Document ID: Generated on Wed Jul 25 16:57:45 EDT 2018 from SVN revision 190790
Copyright © 2005-2018 VT MÄK. All Rights Reserved (www.mak.com)