![]() |
VR-Forces 4.10 Class Documentation
|
Go to the source code of this file.
| DT_DLL_vrfutil DtOutputStream& DtChannelError | ( | const DtString & | channel = "" | ) |
The following functions add the ability to send sim console to separate channels, with their own notify levels.
Output to a channel will be prepended with "[channel-prefix]: " to make it easier to search for in a log file. Channels also have a concept of being enabled or disabled - if the channel is disabled, all of it goes to an empty output stream, regardless of its notify level.
Output streams are created as needed, and new channels can be created on-the-fly, by passing a new channel name into a print function. Newly created channels will use the Info notify level, and the prefix will be the same as the channel name.
Channels are configured in appdata/settings/vrfsim/channelSettings.mtl
Channels can be also enabled on the command line, for example: vrfSimDis –enableChannel "terrain"
Usage:
C++ sim console
#include "vrfutil/vrfPrint.h"
//prints "Hello, World!" to the sim console, at the Warn level DtWarn << "Hello, World!" << std::endl; DtWarn("Hello, World!\n");
//same as DtWarn DtChannelWarn() << "Hello, World!" << std::endl; DtChannelWarn()("Hello, World!\n");
//! prints "Hello, World!" using the "terrain" channel, at warn level DtChannelWarn("terrain") << "Hello, World!" << std::endl; DtChannelWarn("terrain")("Hello, World!\n");
C++ object console
#include "vrfobjcore/vrfObject.h"
//standard way to print to entity console entity()->objectConsoleWarn() << "Hello, World!" << std::endl;
//prints to channel "terrain" entity()->objectConsoleWarn("terrain") << "Hello, World!" << std::endl;
LUA
require "vrfutil"
–standard way to print to object console printWarn("Hello, World!")
–print to channel "terrain" channelWarn("terrain", "Hello, World!")
| DT_DLL_vrfutil DtOutputStream& DtChannelWarn | ( | const DtString & | channel = "" | ) |
| DT_DLL_vrfutil DtOutputStream& DtChannelInfo | ( | const DtString & | channel = "" | ) |
| DT_DLL_vrfutil DtOutputStream& DtChannelVerbose | ( | const DtString & | channel = "" | ) |
| DT_DLL_vrfutil DtOutputStream& DtChannelDebug | ( | const DtString & | channel = "" | ) |
| DT_DLL_vrfutil void AddVrfPrinter | ( | DtPrinter * | printer | ) |
| DT_DLL_vrfutil void AddAndManagePrinter | ( | DtPrinter * | printer | ) |
| DT_DLL_vrfutil void RemovePrinter | ( | DtPrinter * | printer | ) |
| DT_DLL_vrfutil void InitializePrinters | ( | ) |
| DT_DLL_vrfutil int ChannelNotifyLevel | ( | const DtString & | channel | ) |
| DT_DLL_vrfutil DtString ChannelPrefix | ( | const DtString & | channel | ) |
| DT_DLL_vrfutil bool ChannelIsEnabled | ( | const DtString & | channel | ) |
| DT_DLL_vrfutil void SetChannelSettings | ( | const DtString & | channel, |
| int | notifyLevel, | ||
| const DtString & | prefix, | ||
| bool | enabled | ||
| ) |
| DT_DLL_vrfutil void SetChannelSettings | ( | const DtRwChannelDescriptorList & | settings | ) |
| DT_DLL_vrfutil void SetChannelEnabled | ( | const DtString & | channel, |
| bool | enabled | ||
| ) |
| DT_DLL_vrfutil void SetChannelLevel | ( | const DtString & | channel, |
| int | notifyLevel | ||
| ) |
| DT_DLL_vrfutil void PrintStatus | ( | const DtString & | channel = "" | ) |
Diagnostics.
| DT_DLL_vrfutil int NumberOfNotifyLevels | ( | ) |
| DT_DLL_vrfutil DtOutputStreamBuffer* CreateStreamBuffer | ( | ) |
| DT_DLL_vrfutil void DestroyGlobalChannelManager | ( | ) |
Destroy global singleton manager.
Not needed for normal operation, main purpose is for memory leak debugging.
| DT_DLL_vrfutil void SetOcChannelPrototypeSettings | ( | const DtRwChannelDescriptorList & | settings | ) |
These settings will be used when a new object console is created (usually when a new DtVrfObject* is created).
Note that calling this function will not change any settings on existing object consoles.
| DT_DLL_vrfutil DtRwChannelDescriptorList OcChannelPrototypeSettings | ( | ) |
| DT_DLL_vrfutil void SetOcChannelPrototypeEnabled | ( | const DtString & | channel, |
| bool | enabled | ||
| ) |