Loading...
Searching...
No Matches
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.
ConsoleStreamColorMsg (const std::string &lbl, const std::string &file, unsigned int line, int color)
 Use this to output a colored message to the terminal.
ConsoleStreamLog (const std::string &lbl, const std::string &file, unsigned int line)
 Use this to output a message to a log file.
void SetQuiet (bool _q)
 Set quiet output.

Static Public Member Functions

static void Clear ()
 Clear out the current console to make room for a new one.
static ConsolePtr Instance ()
 Return an instance to this class.

Detailed Description

Message, error, warning, and logging functionality.

Constructor & Destructor Documentation

◆ ~Console()

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

Destructor.

Member Function Documentation

◆ Clear()

void sdf::Console::Clear ( )
static

Clear out the current console to make room for a new one.

◆ ColorMsg()

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

◆ Instance()

ConsolePtr sdf::Console::Instance ( )
static

Return an instance to this class.

Referenced by sdf::Console::ConsoleStream::operator<<().

◆ Log()

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

◆ SetQuiet()

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: