iaux::iaConsole Class Reference

#include <iaConsole.h>

Public Member Functions

void lock ()
 
void unlock ()
 
void setLogLevel (iaLogLevel logLevel)
 
iaLogLevel getLogLevel () const
 
void printCallStack (uint32 maxDepth=1000)
 
void printHeader (iaLogLevel logLevel)
 
void activateLogfile (bool activate)
 
void printStats ()
 
void printTombstone ()
 
void exit ()
 
void printCake ()
 
void resetStats ()
 
uint32 getErrors ()
 
uint32 getWarnings ()
 
void openLogfile ()
 
void closeLogfile ()
 
template<typename T >
iaConsoleoperator<< (const T &v)
 
iaConsoleoperator<< (const superspecialfuncptrtype v)
 
iaConsoleoperator<< (const iaForegroundColor color)
 
void setUseColors (bool useColors=true)
 
bool isUsingColors () const
 

Static Public Member Functions

static iaConsolegetInstance ()
 

Friends

void * threadFunc (void *data)
 
iaConsoleendl (iaConsole &console)
 
iaConsoleendlTab (iaConsole &console)
 
iaConsoleflush (iaConsole &console)
 
iaConsoleincerr (iaConsole &console)
 
iaConsoleincwarn (iaConsole &console)
 
iaConsoleLOCK (iaConsole &console)
 
iaConsoleUNLOCK (iaConsole &console)
 
iaConsoleprintIgorThreadID (iaConsole &console)
 
iaConsoleapplicationTime (iaConsole &console)
 

Detailed Description

console and logging interface

Member Function Documentation

◆ activateLogfile()

void iaux::iaConsole::activateLogfile ( bool  activate)

activates or deactivates log file output

Parameters
activatetrue: activates log file output; false: console output only

◆ closeLogfile()

void iaux::iaConsole::closeLogfile ( )

closes logging to log file

◆ exit()

void iaux::iaConsole::exit ( )

exits application or calls debug break

◆ getErrors()

uint32 iaux::iaConsole::getErrors ( )
Returns
error counter

◆ getInstance()

iaConsole & iaux::iaConsole::getInstance ( )
static

returns single instance of the console

◆ getLogLevel()

iaLogLevel iaux::iaConsole::getLogLevel ( ) const
Returns
the current log level

◆ getWarnings()

uint32 iaux::iaConsole::getWarnings ( )
Returns
warning counter

◆ isUsingColors()

bool iaux::iaConsole::isUsingColors ( ) const
Returns
true if using colors for console output

◆ lock()

void iaux::iaConsole::lock ( )

lock console for exclusive access

◆ openLogfile()

void iaux::iaConsole::openLogfile ( )

manually initializing the log file

Note: can't use classes iaDirectory or iaFile here because of possible deadlock in logging

◆ operator<<() [1/3]

iaConsole & iaux::iaConsole::operator<< ( const iaForegroundColor  color)
inline

changes foreground color for output in console

Parameters
colorforeground color

◆ operator<<() [2/3]

iaConsole & iaux::iaConsole::operator<< ( const superspecialfuncptrtype  v)
inline

◆ operator<<() [3/3]

template<typename T >
iaConsole & iaux::iaConsole::operator<< ( const T &  v)
inline

pipes anything in to console and log

◆ printCake()

void iaux::iaConsole::printCake ( )

prints a birthday cake in the log

◆ printCallStack()

void iaux::iaConsole::printCallStack ( uint32  maxDepth = 1000)

prints call stack

Parameters
depthmax number of call stack depth to print

◆ printHeader()

void iaux::iaConsole::printHeader ( iaLogLevel  logLevel)

prints logging head

Parameters
logLevelrepresents the tag used in the head

◆ printStats()

void iaux::iaConsole::printStats ( )

prints warning and error counter

◆ printTombstone()

void iaux::iaConsole::printTombstone ( )

prints a tombstone in the log

◆ resetStats()

void iaux::iaConsole::resetStats ( )

reset error and warning counter

◆ setLogLevel()

void iaux::iaConsole::setLogLevel ( iaLogLevel  logLevel)

sets the log level

Parameters
logLevelthe log level

◆ setUseColors()

void iaux::iaConsole::setUseColors ( bool  useColors = true)

sets wether or not to use colors for console output

Parameters
useColorsif true using colors for console output

◆ unlock()

void iaux::iaConsole::unlock ( )

unlock console

Friends And Related Function Documentation

◆ applicationTime

iaConsole & applicationTime ( iaConsole console)
friend

prints application time in the console

Parameters
consoleconsole instance to use
Returns
the console instance

◆ endl

iaConsole & endl ( iaConsole console)
friend

prints an endline to the console

Parameters
consoleconsole instance to use
Returns
the console instance

◆ endlTab

iaConsole & endlTab ( iaConsole console)
friend

prints an endline and a logging tab to the console

Parameters
consoleconsole instance to use
Returns
the console instance

◆ flush

iaConsole & flush ( iaConsole console)
friend

sends an flush to the console

Parameters
consoleconsole instance to use
Returns
the console instance

◆ incerr

iaConsole & incerr ( iaConsole console)
friend

increments the error counter

Parameters
consoleconsole instance to use
Returns
the console instance

◆ incwarn

iaConsole & incwarn ( iaConsole console)
friend

increments the warning counter

Parameters
consoleconsole instance to use
Returns
the console instance

◆ LOCK

iaConsole & LOCK ( iaConsole console)
friend

locks mutex

Parameters
consoleconsole instance to use
Returns
the console instance

◆ printIgorThreadID

iaConsole & printIgorThreadID ( iaConsole console)
friend

prints the igor thread id in the console

Parameters
consoleconsole instance to use
Returns
the console instance

◆ threadFunc

void * threadFunc ( void *  data)
friend

◆ UNLOCK

iaConsole & UNLOCK ( iaConsole console)
friend

unlocks mutex

Parameters
consoleconsole instance to use
Returns
the console instance

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