class Reporter

Class for reporting events. More...

Definition#include <Reporter.h>
Inherited byAlsaDspSource, AlsaDspSource, AudioSource, BufferedSink, CastSink, Connector, DarkIce, FileCast, FileSink, IceCast, IceCast2, LameLibEncoder, MultiThreadedConnector, OssDspSource, OssDspSource, ShoutCast, SolarisDspSource, SolarisDspSource, VorbisLibEncoder
List of all Methods
Annotated List
Files
Globals
Hierarchy
Index

Public Methods

Public Static Methods

Private Static Methods

Private Members


Detailed Description

Class for reporting events. All objects of this class share the same verbosity level. Typical usage is to inherit this class and use the report() function to report events. Only reports which are of suffucient importance are really reported.

The default verbosity is 1, and the default ostream is cout.

Known problems: this class is not thread-safe.

static unsigned int verbosity

verbosity

[private]

static std::ostream * os

os

[private]

static const unsigned int prefixVerbosity

prefixVerbosity

[private]

void  printPrefix ( void )
throw ()

printPrefix

[private static]

Print a prefix to each report.

inline  ~Reporter ( void )
throw ( Exception )

~Reporter

[virtual]

Destructor.

Throws: Exception

inline void  setReportVerbosity ( unsigned int verbosity )
throw ()

setReportVerbosity

[static]

Set the verbosity level. This sets the verbosity for all Reporter objects.

Parameters:
verbositythe new verbosity level.

inline unsigned int  getReportVerbosity ( void )
throw ()

getReportVerbosity

[static]

Get the verbosity level.

Returns: the current verbosity level.

inline void  setReportOutputStream ( std::ostream & os )
throw ()

setReportOutputStream

[static]

Set the output stream to report to. This setting effects all Reporter objects.

Parameters:
osthe output stream

inline std::ostream &  getReportOutputStream ( void )
throw ()

getReportOutputStream

[static]

Get the output stream to report to.

Returns: the output stream

template inline void  reportEvent ( unsigned int verbosity, const T t )
throw ()

reportEvent

[static]

Report an event with a given verbosity.

Parameters:
verbositythe importance of the event, with 0 being the most important.
tthe object to report. Must have an ostream & operator<<( ostream&, const T) operator overload.

template inline void  reportEvent ( unsigned int verbosity, const T t, const U u )
throw ()

reportEvent

[static]

Report an event with a given verbosity.

Parameters:
verbositythe importance of the event, with 0 being the most important.
tthe object 1 to report. Must have an ostream & operator<<( ostream&, const T) operator overload.
uthe object 2 to report. Must have an ostream & operator<<( ostream&, const U) operator overload.

template inline void  reportEvent ( unsigned int verbosity, const T t, const U u, const V v )
throw ()

reportEvent

[static]

Report an event with a given verbosity.

Parameters:
verbositythe importance of the event, with 0 being the most important.
tthe object 1 to report. Must have an ostream & operator<<( ostream&, const T) operator overload.
uthe object 2 to report. Must have an ostream & operator<<( ostream&, const U) operator overload.
vthe object 3 to report. Must have an ostream & operator<<( ostream&, const V) operator overload.

template inline void  reportEvent ( unsigned int verbosity, const T t, const U u, const V v, const W w )
throw ()

reportEvent

[static]

Report an event with a given verbosity.

Parameters:
verbositythe importance of the event, with 0 being the most important.
tthe object 1 to report. Must have an ostream & operator<<( ostream&, const T) operator overload.
uthe object 2 to report. Must have an ostream & operator<<( ostream&, const U) operator overload.
vthe object 3 to report. Must have an ostream & operator<<( ostream&, const V) operator overload.
wthe object 4 to report. Must have an ostream & operator<<( ostream&, const W) operator overload.