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

Message, error, warning, and logging functionality. More...

#include <Console.hh>

Classes

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

Public Member Functions

virtual ~Console ()
 Destructor. More...
 
ConsoleStreamColorMsg (const std::string &lbl, const std::string &file, unsigned int line, int color)
 Use this to output a colored message to the terminal. More...
 
ConsoleStreamLog (const std::string &lbl, const std::string &file, unsigned int line)
 Use this to output a message to a log file. More...
 
void SetQuiet (bool _q)
 Set quiet output. More...
 

Static Public Member Functions

static ConsoleInstance ()
 Return an instance to this class. More...
 

Detailed Description

Message, error, warning, and logging functionality.

Constructor & Destructor Documentation

virtual sdf::Console::~Console ( )
virtual

Destructor.

Member Function Documentation

ConsoleStream& sdf::Console::ColorMsg ( const std::string &  lbl,
const std::string &  file,
unsigned int  line,
int  color 
)

Use this to output a colored message to the terminal.

Parameters
[in]_lblText label
[in]_fileFile containing the error
[in]_lineLine containing the error
[in]_colorColor to make the label
Returns
Reference to an output stream
static Console* sdf::Console::Instance ( )
static

Return an instance to this class.

Referenced by sdf::Console::ConsoleStream::operator<<(), and sdf::Console::ConsoleStream::Prefix().

ConsoleStream& sdf::Console::Log ( const std::string &  lbl,
const std::string &  file,
unsigned int  line 
)

Use this to output a message to a log file.

Returns
Reference to output stream
void sdf::Console::SetQuiet ( bool  _q)

Set quiet output.

Parameters
[in]qTrue to prevent warning

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