Duplicate all data passed by the stream operator to two output streams.
More...
#include <debug/copystream.h>
|
int | base |
| Number system used for printing integral numbers (one of 2, 8, 10, or 16)
|
|
| Stringbuffer () |
| Constructor; Marks the buffer as empty.
|
|
void | put (char c) |
| Inserts a character into the buffer.
|
|
char | buffer [80] |
| buffer containing characters that will be printed upon flush()
|
|
long unsigned | pos |
| current position in the buffer
|
|
Duplicate all data passed by the stream operator to two output streams.
Can be used as replacement for any OutputStream – for example, forwarding the DBG output simultaneously to screen (TextStream) and serial console (SerialStream).
By using template programming, two generic methods are sufficient (which simply forward the input to both).
◆ CopyStream()
Constructor.
- Parameters
-
first | First recipient for output passed to this object |
second | Second recipient for output passed to this object |
◆ operator<<() [1/2]
Generic stream operator for any data type.
Forwards all input to both recipients.
Uses template meta programming for a generic & short solution
- Template Parameters
-
T | Type of data to be forwarded |
- Parameters
-
value | data to be forwarded |
- Returns
- Reference to the CopyStream object allowing concatenation of operators
◆ operator<<() [2/2]
template<typename T >
CopyStream & CopyStream::operator<< |
( |
T &(*)(T &) |
f | ) |
|
|
inline |
Deal with [OutputStream] manipulator functions.
- Template Parameters
-
- Parameters
-
f | pointer to manipulator function |
- Returns
- Reference to the CopyStream object allowing concatenation of operators
◆ first
◆ second
The documentation for this class was generated from the following file: