Types for dynamic control of output messages.
This includes debugging information, error reporting, state logging etc. This file declares class cmnLODOutputMultiplexer. A cmnLODOutputMultiplexer inherits the public interface of a generic ostream, and attaches each output message with a Level Of Detail (LOD) descriptor. The LOD descriptor is forwarded through a cmnMultiplexerStreambufProxy to a cmnLODMultiplexerStreambuf that performs the actual multiplexing.
Create a collection of ostream objects, and attach them to a cmnLODMultiplexerStreambuf. Create a cmnLODOutputMultiplexer and assign it with the LOD value and the cmnLODMultiplexerStreambuf address. Use the standard ostream syntax (operator <<) to stream objects to the multiplexer.
Example (assume that the object lodMultiplexerStreambuf is a cmnLODMultiplexerStreambuf):
ofstream log("logfile.txt");
windowoutputstream display;
multiplexerStreambuf << "Hello, world" << endl;
#define CMN_LOG_ALLOW_DEFAULT
Definition cmnLogLoD.h:76
#define CMN_LOG_ALLOW_ALL
Definition cmnLogLoD.h:75
- See also
- cmnLODMultiplexerStreambuf.h, cmnMultiplexerStreambufProxy.h, C++ documentation of basic_streambuf and iostream