PUMA Library Reference Manual
Loading...
Searching...
No Matches
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.
 
 VerboseMgr (std::ostream &out, int verbose)
 Construct a new verbosity manager.
 
void verbose (int verbose)
 Set the verbosity level.
 
int verbose ()
 Get the verbosity level.
 
void operator++ (int)
 Increase the current level starting at 0.
 
void operator-- (int)
 Decrease the current level starting at 0.
 
void endl ()
 Finish the message and write it on the destination output stream if the verbosity level is not yet reached.
 

Constructor & Destructor Documentation

◆ VerboseMgr() [1/2]

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

Constructor.

Default verbosity level is 10.

Parameters
outThe destination output stream.

◆ VerboseMgr() [2/2]

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

◆ endl()

void Puma::VerboseMgr::endl ( )

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

◆ operator++()

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

Increase the current level starting at 0.

◆ operator--()

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

Decrease the current level starting at 0.

◆ verbose() [1/2]

int Puma::VerboseMgr::verbose ( )
inline

Get the verbosity level.

Returns
The verbosity level.

◆ verbose() [2/2]

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

Set the verbosity level.

Parameters
verboseThe verbosity level.