Loading...
Searching...
No Matches
Dune::DebugStream< thislevel, dlevel, alevel, activator > Class Template Reference
Common » Debug output

Generic class to implement debug output streams. More...

`#include <dune/common/debugstream.hh>`

Inheritance diagram for Dune::DebugStream< thislevel, dlevel, alevel, activator >:

## Public Member Functions

| DebugStream (std::ostream &out=std::cerr)
| Create a DebugStream and set initial output stream.
| DebugStream (DebugStreamState &master, std::ostream &fallback=std::cerr)
| Create a DebugStream and directly tie to another DebugStream.
| ~DebugStream ()
| Destroy stream.
template<class T>
DebugStream & | operator<< (const T data)
| Generic types are passed on to current output stream.
DebugStream & | operator<< (const int data)
| explicit specialization so that enums can be printed
DebugStream & | operator<< (std::ostream &(*f)(std::ostream &))
| pass on manipulators to underlying output stream
DebugStream & | flush ()
| pass on flush to underlying output stream
void | push (bool b)
| set activation flag and store old value
void | pop ()
| restore previously set activation flag
bool | active () const
| reports if this stream will produce output
void | attach (std::ostream &stream)
| set output to a different stream.
void | detach ()
| detach current output stream and restore to previous stream
void | tie (DebugStreamState &to)
| Tie a stream to this one.
void | untie ()
| Untie stream.

## Public Attributes

StreamWrap * | current
| current output stream and link to possibly pushed old output streams
bool | _active
| flag to switch output during runtime
bool | _tied
| are we tied to another DebugStream?
unsigned int | _tied_streams
| how many streams are tied to this state

## Detailed Description

template<DebugLevel thislevel = 1, DebugLevel dlevel = 1, DebugLevel alevel = 1, template< DebugLevel, DebugLevel > class activator = greater_or_equal>
class Dune::DebugStream< thislevel, dlevel, alevel, activator >

Generic class to implement debug output streams.

The main function of a DebugStream is to provide output in a standard ostream fashion that is fully deactivated if the level of the stream does not meet the current requirements. More information in Debug output

Parameters

  thislevel | this level
  dlevel | level needed for any output to happen
  alevel | level needed to switch activation flag on
  activator | template describing the activation policy

Todo
  Fix visibility of internal data

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

- debugstream.hh