![]() |
VR-Forces 4.5 Class Documentation
|
This class represents the console for an individual object. More...
Public Member Functions | |
| DtObjectConsole (DtVrfObject *vrfObj) | |
| virtual | ~DtObjectConsole () |
| virtual bool | init () |
| Initialized the console. | |
| virtual void | registerMessageCallbacks () |
| Registers message callbacks with the VrfObject's communication interface. | |
| virtual void | setNotifyLevel (DtNotifyLevelType level) |
| Sets the notify level for all streams managed by this console manager. | |
| virtual void | setNotifyLevel (const DtString &channel, DtNotifyLevelType level) |
| virtual DtNotifyLevelType | notifyLevel () const |
| virtual void | printToFile (const DtFilename &filename) |
| Starts printing the output of this object console to the specified file. | |
| virtual void | stopPrintingToFile () |
| Stops printing to a file, if file printing is active. | |
| virtual void | addConsolePrinter (DtPrinter *printer) |
| Adds the specified printer to all the streams associated with this console. | |
| virtual void | addAndManageConsolePrinter (DtPrinter *printer) |
| Adds the specified printer, using addConsolePrinter(), but also takes ownership of the printer and deletes it when this console is deleted. | |
| virtual void | removeConsolePrinter (DtPrinter *printer) |
| Removed the specified printer from all the streams associated with this console. | |
| virtual DtOutputChannelManager & | channelManager () |
| virtual DtOutputStream & | debugStream (const DtString &channel="") |
| virtual DtOutputStream & | verboseStream (const DtString &channel="") |
| virtual DtOutputStream & | infoStream (const DtString &channel="") |
| virtual DtOutputStream & | warnStream (const DtString &channel="") |
| virtual DtOutputStream & | errorStream (const DtString &channel="") |
Protected Member Functions | |
| virtual void | addDefaultPrinters () |
| Adds a DtObjectConsoleNetworkPrinter and a DtObjectConsoleVrlinkPrinter to the console. | |
| virtual void | processLogToFile (const DtVrfObjectMessage *msg) |
| virtual void | processStopLoggingToFile (const DtVrfObjectMessage *msg) |
| virtual void | processSetNotifyLevel (DtSimMessage *msg) |
Static Protected Member Functions | |
| static void | logToFileCallback (const DtVrfObjectMessage *msg, void *usr) |
| static void | stopLoggingToFileCallback (const DtVrfObjectMessage *msg, void *usr) |
| static void | setNotifyLevelCallback (DtSimMessage *msg, void *usr) |
Protected Attributes | |
| DtVrfObject * | myVrfObject |
| int | myObjectConsoleThreshold |
| The current notification level for this object. | |
| DtFilePrinter * | myFilePrinter |
| If file logging has been turned on, this holds the pointer to the current file printer. | |
| DtOutputChannelManager | myChannelManager |
Private Member Functions | |
| DtObjectConsole () | |
| Not Implemented. | |
| DtObjectConsole (const DtObjectConsole &orig) | |
| DtObjectConsole & | operator= (const DtObjectConsole &orig) |
This class represents the console for an individual object.
It owns a set of streams for various notification levels (mirroring VR-Links DtWarn/DtInfo/etc. streams). Printers can be attached to send the console to various locations, including a file and DIS/RPR messages to the GUI.
|
private |
Not Implemented.
|
private |
| DtObjectConsole::DtObjectConsole | ( | DtVrfObject * | vrfObj | ) |
|
virtual |
|
private |
|
virtual |
Initialized the console.
Calls addDefaultPrinters() to add some default printers.
|
virtual |
Registers message callbacks with the VrfObject's communication interface.
This is pulled out into a separate method because normally the object console is set up very early in the objects init() method, before the communication interface it set up. The communication interface must be initialized before this call is made.
|
virtual |
Sets the notify level for all streams managed by this console manager.
|
virtual |
|
virtual |
|
virtual |
Starts printing the output of this object console to the specified file.
Only one file will be printed to at a time. If a file is already being printed to, it will be stopped and printing will start to the new file.
|
virtual |
Stops printing to a file, if file printing is active.
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
|
virtual |
Adds the specified printer to all the streams associated with this console.
The console does not take any ownership of this printer.
|
virtual |
Adds the specified printer, using addConsolePrinter(), but also takes ownership of the printer and deletes it when this console is deleted.
|
virtual |
Removed the specified printer from all the streams associated with this console.
|
virtual |
|
protectedvirtual |
Adds a DtObjectConsoleNetworkPrinter and a DtObjectConsoleVrlinkPrinter to the console.
|
staticprotected |
|
protectedvirtual |
|
staticprotected |
|
protectedvirtual |
|
staticprotected |
|
protectedvirtual |
|
protected |
|
protected |
The current notification level for this object.
|
protected |
If file logging has been turned on, this holds the pointer to the current file printer.
|
protected |