Dune Core Modules (unstable)

Dune::DebugStream< thislevel, dlevel, alevel, activator > Class Template Reference

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

#include <dune/common/debugstream.hh>

Public Member Functions

 DebugStream (std::ostream &out=std::cerr)
 Create a DebugStream and set initial output stream. More...
 
 DebugStream (DebugStreamState &master, std::ostream &fallback=std::cerr)
 Create a DebugStream and directly tie to another DebugStream. More...
 
 ~DebugStream ()
 Destroy stream. More...
 
template<class T >
DebugStreamoperator<< (const T data)
 Generic types are passed on to current output stream.
 
DebugStreamoperator<< (const int data)
 explicit specialization so that enums can be printed More...
 
DebugStreamoperator<< (std::ostream &(*f)(std::ostream &))
 pass on manipulators to underlying output stream
 
DebugStreamflush ()
 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 More...
 
bool active () const
 reports if this stream will produce output More...
 
void attach (std::ostream &stream)
 set output to a different stream. More...
 
void detach ()
 detach current output stream and restore to previous stream More...
 
void tie (DebugStreamState &to)
 Tie a stream to this one. More...
 
void untie ()
 Untie stream. More...
 

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
thislevelthis level
dlevellevel needed for any output to happen
alevellevel needed to switch activation flag on
activatortemplate describing the activation policy
Todo:
Fix visibility of internal data

The documentation for this class was generated from the following file:
Creative Commons License   |  Legal Statements / Impressum  |  Hosted by TU Dresden  |  generated with Hugo v0.111.3 (Dec 21, 23:30, 2024)