Main Page | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Class Members | File Members

Reporter Class Reference

#include <Reporter.h>

Inheritance diagram for Reporter:

Inheritance graph
[legend]
List of all 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.

Author:
Author
darkeye
Version:
Revision
1.9

Definition at line 83 of file Reporter.h.

Public Member Functions

virtual ~Reporter (void) throw ( Exception )
 Destructor.

Static Public Member Functions

static void setReportVerbosity (unsigned int verbosity) throw ()
 Set the verbosity level.
static unsigned int getReportVerbosity (void) throw ()
 Get the verbosity level.
static void setReportOutputStream (std::ostream &os) throw ()
 Set the output stream to report to.
static std::ostream & getReportOutputStream (void) throw ()
 Get the output stream to report to.
template<class T>
static void reportEvent (unsigned int verbosity, const T t) throw ()
 Report an event with a given verbosity.
template<class T, class U>
static void reportEvent (unsigned int verbosity, const T t, const U u) throw ()
 Report an event with a given verbosity.
template<class T, class U, class V>
static void reportEvent (unsigned int verbosity, const T t, const U u, const V v) throw ()
 Report an event with a given verbosity.
template<class T, class U, class V, class W>
static void reportEvent (unsigned int verbosity, const T t, const U u, const V v, const W w) throw ()
 Report an event with a given verbosity.


Constructor & Destructor Documentation

virtual Reporter::~Reporter void   )  throw ( Exception ) [inline, virtual]
 

Destructor.

Exceptions:
Exception 

Definition at line 132 of file Reporter.h.


Member Function Documentation

static std::ostream& Reporter::getReportOutputStream void   )  throw () [inline, static]
 

Get the output stream to report to.

Returns:
the output stream

Definition at line 178 of file Reporter.h.

static unsigned int Reporter::getReportVerbosity void   )  throw () [inline, static]
 

Get the verbosity level.

Returns:
the current verbosity level.

Definition at line 155 of file Reporter.h.

template<class T, class U, class V, class W>
static void Reporter::reportEvent unsigned int  verbosity,
const T  t,
const U  u,
const V  v,
const W  w
throw () [inline, static]
 

Report an event with a given verbosity.

Parameters:
verbosity the importance of the event, with 0 being the most important.
t the object 1 to report. Must have an ostream & operator<<( ostream&, const T) operator overload.
u the object 2 to report. Must have an ostream & operator<<( ostream&, const U) operator overload.
v the object 3 to report. Must have an ostream & operator<<( ostream&, const V) operator overload.
w the object 4 to report. Must have an ostream & operator<<( ostream&, const W) operator overload.

Definition at line 278 of file Reporter.h.

template<class T, class U, class V>
static void Reporter::reportEvent unsigned int  verbosity,
const T  t,
const U  u,
const V  v
throw () [inline, static]
 

Report an event with a given verbosity.

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

Definition at line 245 of file Reporter.h.

template<class T, class U>
static void Reporter::reportEvent unsigned int  verbosity,
const T  t,
const U  u
throw () [inline, static]
 

Report an event with a given verbosity.

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

Definition at line 217 of file Reporter.h.

template<class T>
static void Reporter::reportEvent unsigned int  verbosity,
const T  t
throw () [inline, static]
 

Report an event with a given verbosity.

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

Definition at line 194 of file Reporter.h.

Referenced by FileSink::create(), AudioSource::createDspSource(), MultiThreadedConnector::open(), CastSink::open(), DarkIce::run(), and MultiThreadedConnector::sinkThread().

static void Reporter::setReportOutputStream std::ostream &  os  )  throw () [inline, static]
 

Set the output stream to report to.

This setting effects all Reporter objects.

Parameters:
os the output stream

Definition at line 167 of file Reporter.h.

Referenced by main().

static void Reporter::setReportVerbosity unsigned int  verbosity  )  throw () [inline, static]
 

Set the verbosity level.

This sets the verbosity for all Reporter objects.

Parameters:
verbosity the new verbosity level.

Definition at line 144 of file Reporter.h.

Referenced by main().


The documentation for this class was generated from the following files:
Generated on Sat Oct 22 13:17:07 2005 for DarkIce by  doxygen 1.4.4