#include <cmnOutputMultiplexer.h>
Inheritance diagram for cmnOutputMultiplexer:


Types for dynamic control of output messages. This includes debugging information, error reporting, state logging etc. This file declares *class cmnOutputMultiplexer*. a cmnOutputMultiplexer inherits the public interface of a generic ostream, and channels the output to multiple sinks.
Usage: Include the module in your application with: #include "cmnOutputMultiplexer.h"
Create a collection of ostream objects, and attach them to a cmnOutputMultiplexer. Use the standrard ostream syntax (operator <<) to stream objects to the multiplexer.
ofstream log("logfile.txt"); windowoutputstream display; // hypothetical class cmnOutputMultiplexer multiplexer; multiplexer.AddChannel(&log); multiplexer.AddChannel(&windowoutputstream); multiplexer << "Hello, world" << endl; // channel the message ot all streams.
Notes:
Definition at line 81 of file cmnOutputMultiplexer.h.
| typedef std::list<ChannelType *> cmnOutputMultiplexer::ChannelContainerType |
Type of internal data structure storing the channels.
Definition at line 88 of file cmnOutputMultiplexer.h.
| cmnOutputMultiplexer::cmnOutputMultiplexer | ( | ) | [inline] |
Default constructor - initialize base class.
Definition at line 91 of file cmnOutputMultiplexer.h.
| ChannelType& cmnOutputMultiplexer::AddChannel | ( | ChannelType * | channel | ) |
Add an output channel. See notes above.
| channel | A pointer to the output channel to be added. |
| ChannelType& cmnOutputMultiplexer::RemoveChannel | ( | ChannelType * | channel | ) |
Remove an output channel.
| channel | A pointer to the output channel to be removed. No change occurs if the pointer is not on the list of channels for this multiplexer. |
| const ChannelContainerType& cmnOutputMultiplexer::GetChannels | ( | ) | const [inline] |
Enable access to the channel storage, without addition or removal of channels. Elements of the container can be accessed using the standard const_iterator interfaces. Note that the channels themselves are non-const, so individual manipulation of each is enabled.
Definition at line 111 of file cmnOutputMultiplexer.h.