All Classes Namespaces Files Functions Variables Typedefs Friends Macros Groups Pages
Public Member Functions | List of all members
sdf::Console::ConsoleStream Class Reference

An ostream-like class that we'll use for logging. More...

#include <Console.hh>

Public Member Functions

 ConsoleStream (std::ostream *_stream)
 Constructor. More...
 
template<class T >
ConsoleStreamoperator<< (const T &_rhs)
 Redirect whatever is passed in to both our ostream (if non-NULL) and the log file (if open). More...
 
void Prefix (const std::string &_lbl, const std::string &_file, unsigned int _line, int _color)
 Print a prefix to both terminal and log file. More...
 

Detailed Description

An ostream-like class that we'll use for logging.

Constructor & Destructor Documentation

sdf::Console::ConsoleStream::ConsoleStream ( std::ostream *  _stream)
inline

Constructor.

Parameters
[in]_streamPointer to an output stream operator. Can bee NULL.

Member Function Documentation

template<class T >
ConsoleStream& sdf::Console::ConsoleStream::operator<< ( const T &  _rhs)
inline

Redirect whatever is passed in to both our ostream (if non-NULL) and the log file (if open).

Parameters
[in]_rhsContent to be logged.
Returns
Reference to myself.

References sdf::Console::Instance().

void sdf::Console::ConsoleStream::Prefix ( const std::string &  _lbl,
const std::string &  _file,
unsigned int  _line,
int  _color 
)
inline

Print a prefix to both terminal and log file.

Parameters
[in]_lblText label
[in]_fileFile containing the error
[in]_lineLine containing the error
[in]_colorColor to make the label. Used only on terminal.

References sdf::Console::Instance().


The documentation for this class was generated from the following file: