| cisst-saw
    | 
Types for dynamic control of output messages. More...
#include <cmnLODOutputMultiplexer.h>
 
  
 | Public Types | |
| typedef char | char_type | 
| typedef cmnLODMultiplexerStreambuf < char_type > | SinkType | 
| typedef std::ostream | BaseType | 
| Public Member Functions | |
| cmnLODOutputMultiplexer (SinkType *multiplexer, cmnLogLevel level) | |
| cmnLODOutputMultiplexer & | Ref (void) | 
| cmnLogLevel | GetLOD (void) const | 
| void | SetLOD (cmnLogLevel lod) | 
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):
| typedef std::ostream cmnLODOutputMultiplexer::BaseType | 
| typedef char cmnLODOutputMultiplexer::char_type | 
| 
 | inline | 
Constructor that initializes base class and stores LOD.
| 
 | inline | 
Returns the Level of Detail.
| 
 | inline | 
This method simply returns a reference to this object. It is used when a cmnLODOutputMultiplexer is created and immediately operated on, to ensure that the object operated on is an l-value rather than r-value. This solves compiler ambiguities and errors that lead to incorrect printout. Use it where the old CMN_LOG_HACK would be used. Normally, one doesn't need to call this method in other cases.
| 
 | inline | 
Sets the Level of Detail.
 1.8.6
 1.8.6