|
|
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:
verbosity | the 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:
os | the output stream |
inline std::ostream &
getReportOutputStream ( void )
throw () | getReportOutputStream |
[static]
Get the output stream to report to.
Returns: the output stream
template throw () | reportEvent |
[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.
|
template throw () | reportEvent |
[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.
|
template throw () | reportEvent |
[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.
|
template throw () | reportEvent |
[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.
|