Friedrich-Alexander-Universität Erlangen-Nürnberg  /   Technische Fakultät  /   Department Informatik

Ignore all data passed by the stream operatorCan be used instead of the OutputStream if (for debugging reasons) all output should be ignored, e.g. for DBG_VERBOSE. More...

#include <debug/nullstream.h>

Public Member Functions

 NullStream ()
 Empty default constructor.
 
template<typename T >
NullStreamoperator<< (T value)
 Generic stream operator for any data type. More...
 
template<typename T >
NullStreamoperator<< (T &(*f)(T &))
 Deal with [OutputStream] manipulator functions. More...
 

Detailed Description

Ignore all data passed by the stream operator

Can be used instead of the OutputStream if (for debugging reasons) all output should be ignored, e.g. for DBG_VERBOSE.

By using template programming, two generic methods are sufficient (which simply discard everything).

Member Function Documentation

◆ operator<<() [1/2]

template<typename T >
NullStream& NullStream::operator<< ( value)
inline

Generic stream operator for any data type.

Uses template meta programming for a generic & short solution

Template Parameters
TType of data to ignore
Parameters
valuedata to be ignore
Returns
Reference to the NullStream object allowing concatenation of operators

◆ operator<<() [2/2]

template<typename T >
NullStream& NullStream::operator<< ( T &(*)(T &)  f)
inline

Deal with [OutputStream] manipulator functions.

Uses template meta programming for a generic & short solution

Template Parameters
Tignored stream
Parameters
fpointer to manipulator function
Returns
Reference to the NullStream object allowing concatenation of operators

The documentation for this class was generated from the following file: