VR-Forces 4.10 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 const DtOutputChannelManager& channelManager() const;
107  virtual DtOutputChannelManager& channelManager();
108 
109 protected:
112  virtual void addDefaultPrinters();
113 
114  static void logToFileCallback(const DtVrfObjectMessage* msg, void* usr);
115  virtual void processLogToFile(const DtVrfObjectMessage* msg);
116 
117  static void stopLoggingToFileCallback(const DtVrfObjectMessage* msg, void* usr);
118  virtual void processStopLoggingToFile(const DtVrfObjectMessage* msg);
119 
120  static void setNotifyLevelCallback(DtSimMessage* msg, void* usr);
121  virtual void processSetNotifyLevel(DtSimMessage* msg);
122 
123 protected:
124 
130  DtFilePrinter* myFilePrinter;
131 
133 };
int myObjectConsoleThreshold
The current notification level for this object.
Definition: objectConsole.h:127
DtVrfObject is used to represent any type of simulated object (entities, aggregate, control objects) in a VR-Forces application.
Definition: vrfObject.h:215
DtOutputChannelManager myChannelManager
Definition: objectConsole.h:132
DT_DLL_VRVCORE DtTaitBryan level(const DtCoordinateSystem &cs, const DtVector &localOrigin, double topoHeading)
Returns a level orientation with the topographic heading.
DtVrfObject * myVrfObject
Definition: objectConsole.h:125
The DtOutputChannelManager class manages default streams and channel-specific streams by notify level...
Definition: outputChannelManager.h:21
This class represents the console for an individual object.
Definition: objectConsole.h:41
DtFilePrinter * myFilePrinter
If file logging has been turned on, this holds the pointer to the current file printer.
Definition: objectConsole.h:130
#define DT_DLL_vrfobjcore
This file is used to determine how to build.
Definition: vrfobjcoreDefines.h:24
File: simMsg.h.
Definition: simMessage.h:35
The base class for all messages to/from a specific DtVrfObject.
Definition: vrfObjectMessage.h:30
DtTranslatableStream.
DT_DLL_DEBUGDRAWRENDERER void init(makVrv::DtDe &de)
Work function for the plugin initialization.
DT_DLL_vrfobjcore std::string moduleFromFilename(const std::string &file)

Document ID: Generated on Tue Sep 21 17:42:52 EDT 2021 from SVN revision 234861
Copyright © 2005-2021 MAK Technologies. All Rights Reserved (www.mak.com)