VR-Forces 4.1 Class Documentation
17.8 - Object Console Messages

Each DtVrfObject has a console that is displayed as part of the information dialog box for that object.

When you extend the simulation engine, you can send messages to the object console window for a particular object. These messages are also printed to the vrfSim console and to the vrfSim log file, with the name of the object added as a prefix.

To write messages to the object console, use one of the objectConsole*() stream methods on the DtVrfObject class or the DtSimComponent class. Each object console has five notification levels, and each level has a stream method. You should choose a level appropriate to the nature of the message you are printing to the console. The console will only display messages with a notification level equal to or higher than the notification level chosen by the user. The table shows the notification levels and describes the types of messages that you should use for each level.

Notification Message Types
Level Function Type of Message
Error (1) objectConsoleError() Always displayed to the user. Use for important errors that indicate failure of some type.
Warn (2) objectConsoleWarn() Displayed to the user by default. Use for situations that may lead to unexpected behavior.
Info (3) objectConsoleInfo() Use for important events of an object that are part of normal operation.
Verbose (4) objectConsoleVerbose() Use for general events or conditions for an object that are part of normal operation, but less important than Info level events.
Debug (5) objectConsoleDebug() Use for debugging level messages that only users attempting to debug operation of an object would be interested in.

When you call an object console method on the DtVrfObject class, the message is sent to that object’s console. When you call an object console method on the DtSimComponent class, the message is sent to the console of the object to which that component is attached. The following example is sent from a class derived from DtSimComponent:

objectConsoleInfo() << "Firing missile on target" << std::endl;

[<< The Entity Editor and OPD Editor Plug-in API] [Home] [Top of Page] [The Boost Serialization Library >>]


Document ID: Generated on Tue Jan 29 18:21:16 EST 2013 from SVN revision 123193
Copyright © 2005-2013 VT MÄK Inc. All Rights Reserved (www.mak.com)