Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   Related Pages  

sglOStream Class Reference

#include <sglOStream.hpp>

List of all members.

Public Types

typedef void (* callback )(void)
enum  PrintLevelEnum {
  eALWAYS,
  eWARNING,
  eINFO,
  eDEBUG
}

Public Methods

 sglOStream (PrintLevelEnum level=eALWAYS)
virtual ~sglOStream ()
ostream& getOStream ()

Static Public Methods

void setStream (ostream *stream)
ostream* getStream ()
void setThreshold (PrintLevelEnum threshold)
PrintLevelEnum getThreshold ()
void setPreFunc (callback func)
callback getPreFunc ()
void setPostFunc (callback func)
callback getPostFunc ()


Detailed Description

Output stream class with various levels of verbosity.

Definition at line 38 of file sglOStream.hpp.


Member Typedef Documentation

typedef void(* sglOStream::callback)(void)
 

Callback function prototype.


Member Enumeration Documentation

enum sglOStream::PrintLevelEnum
 

Verbosity levels for printing.

Definition at line 42 of file sglOStream.hpp.


Constructor & Destructor Documentation

sglOStream::sglOStream ( PrintLevelEnum level = eALWAYS ) [inline]
 

Constructor. The new stream will print at the given verbosity level.

Definition at line 108 of file sglOStream.hpp.

sglOStream::~sglOStream ( ) [inline, virtual]
 

Destructor.

Definition at line 115 of file sglOStream.hpp.


Member Function Documentation

void sglOStream::setStream ( ostream * stream ) [static]
 

Set the c++ ostream to use for printing.

Parameters:
stream   the output stream to use for all sglPrint()s.

ostream* sglOStream::getStream ( ) [static]
 

Get the c++ ostream to use for printing.

Returns:
stream the output stream to use for all sglPrint()s.

void sglOStream::setThreshold ( PrintLevelEnum threshold ) [static]
 

Set the print threshold. Messages with a greater verbosity level than the given threshold will not print.

Parameters:
threshold   the most verbose level of messages to allow; Default: WARNING_LEVEL.

PrintLevelEnum sglOStream::getThreshold ( ) [static]
 

Get the print threshold.

Returns:
the most verbose level of messages allowed

void sglOStream::setPreFunc ( callback func ) [static]
 

Set the callback function to call before each print stream. This can be used to implement stream locking.

Parameters:
func   the function that should be called

callback sglOStream::getPreFunc ( ) [static]
 

Get the callback function to call before each print stream.

Returns:
func the function that should be called

void sglOStream::setPostFunc ( callback func ) [static]
 

Set the callback function to call after each print stream. This can be used to implement stream (un)locking.

Parameters:
func   the function that should be called

callback sglOStream::getPostFunc ( ) [static]
 

Get the callback function to call after each print stream.

Returns:
func the function that should be called

ostream & sglOStream::getOStream ( ) [inline]
 

Returns an ostream that can be used this print level.

Definition at line 121 of file sglOStream.hpp.


The documentation for this class was generated from the following file:
Generated at Mon Jul 1 18:00:09 2002 for SGL by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001