PUMA Library Reference Manual
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
Puma::VerboseMgr Class Reference

#include <Puma/VerboseMgr.h>

+ Inheritance diagram for Puma::VerboseMgr:

Description

Indented output stream with a adjustable verbosity level.

If the level reaches the verbosity level, all messages printed on the stream are ignored. Use the stream manipulator Puma::endvm to finish a message on the stream.

Public Member Functions

 VerboseMgr (std::ostream &out)
 Constructor. More...
 
 VerboseMgr (std::ostream &out, int verbose)
 Construct a new verbosity manager. More...
 
void verbose (int verbose)
 Set the verbosity level. More...
 
int verbose ()
 Get the verbosity level. More...
 
void operator++ (int)
 Increase the current level starting at 0. More...
 
void operator-- (int)
 Decrease the current level starting at 0. More...
 
void endl ()
 Finish the message and write it on the destination output stream if the verbosity level is not yet reached. More...
 

Constructor & Destructor Documentation

Puma::VerboseMgr::VerboseMgr ( std::ostream &  out)
inline

Constructor.

Default verbosity level is 10.

Parameters
outThe destination output stream.
Puma::VerboseMgr::VerboseMgr ( std::ostream &  out,
int  verbose 
)
inline

Construct a new verbosity manager.

Parameters
outThe destination output stream.
verboseThe default verbosity level.

Member Function Documentation

void Puma::VerboseMgr::endl ( )

Finish the message and write it on the destination output stream if the verbosity level is not yet reached.

void Puma::VerboseMgr::operator++ ( int  )
inline

Increase the current level starting at 0.

void Puma::VerboseMgr::operator-- ( int  )
inline

Decrease the current level starting at 0.

void Puma::VerboseMgr::verbose ( int  verbose)
inline

Set the verbosity level.

Parameters
verboseThe verbosity level.
int Puma::VerboseMgr::verbose ( )
inline

Get the verbosity level.

Returns
The verbosity level.