GestureRecognitionToolkit  Version: 0.2.5
The Gesture Recognition Toolkit (GRT) is a cross-platform, open-source, c++ machine learning library for real-time gesture recognition.
ErrorLog Class Reference
Inheritance diagram for ErrorLog:
Log

Public Member Functions

 ErrorLog (const std::string &key="")
 
 ErrorLog (const ErrorLog &rhs)
 
ErrorLogoperator= (const ErrorLog &rhs)
 
 GRT_DEPRECATED_MSG ("enableLogging is deprecated, use setLoggingEnabled instead", static bool enableLogging(bool loggingEnabled))
 
- Public Member Functions inherited from Log
 Log (const std::string &key="")
 defines the log default constructor More...
 
 Log (const Log &rhs)
 defines the log copy constructor More...
 
Logoperator= (const Log &rhs)
 defines the log equals operator More...
 
template<class T >
const Logoperator<< (const T &val) const
 defines an operator<< to write a value to std::endl, this updates the message
 
const Logoperator<< (const StandardEndLine manip) const
 defines an operator<< to take in std::endl, this ends a message and triggers the mesaage callback
 
virtual bool getInstanceLoggingEnabled () const
 returns true if logging is enabled for this specific instance More...
 
virtual std::string getKey () const
 returns the key that gets written at the start of each message More...
 
virtual std::string getLastMessage () const
 returns the last message written by the log More...
 
virtual bool setKey (const std::string &key)
 sets the key that gets written at the start of each message, this will be written in the format 'key message'. The key can be empty. More...
 
virtual bool getInstanceLoggingEnabled ()
 returns if logging is enabled for this specific instance More...
 
virtual bool setInstanceLoggingEnabled (const bool loggingEnabled)
 sets if logging is enabled for this specific instance More...
 
 GRT_DEPRECATED_MSG ("setProceedingText is deprecated, use setKey instead", void setProceedingText(std::string proceedingText))
 
 GRT_DEPRECATED_MSG ("getProceedingText is deprecated, use getKey instead", std::string getProceedingText() const )
 
 GRT_DEPRECATED_MSG ("setEnableInstanceLogging is deprecated, use setInstanceLoggingEnabled instead", bool setEnableInstanceLogging(const bool loggingEnabled))
 

Static Public Member Functions

static bool getLoggingEnabled ()
 returns true if logging is enabled for this class, this supersedes the specific instance logging More...
 
static bool setLoggingEnabled (const bool enabled)
 sets if logging is enabled for this class, this supersedes the specific instance logging More...
 
static bool registerObserver (Observer< ErrorLogMessage > &observer)
 
static bool removeObserver (Observer< ErrorLogMessage > &observer)
 
- Static Public Member Functions inherited from Log
static bool getLoggingEnabled ()
 returns true if logging is enabled for this class, this supersedes the specific instance logging More...
 
static bool setLoggingEnabled (const bool enabled)
 sets if logging is enabled for this class, this supersedes the specific instance logging More...
 

Protected Member Functions

virtual void triggerCallback (const std::string &message) const
 This callback can be used to propagate messages to other interfaces (e.g., a GUI built on top of the GRT). It gets triggered anytime a message is ended (with std::endl), the message will contain the full message + the log key. To use this, inherit from the log base class and overwrite the contents of this virtual function. More...
 

Static Protected Attributes

static ObserverManager< ErrorLogMessageobserverManager
 
static bool errorLoggingEnabled = true
 
- Static Protected Attributes inherited from Log
static bool baseLoggingEnabled = true
 This controls logging across all Log instances, as opposed to a single instance. More...
 

Additional Inherited Members

- Public Types inherited from Log
typedef std::basic_ostream< char, std::char_traits< char > > CoutType
 this is the type of std::cout
 
typedef CoutType &(* StandardEndLine) (CoutType &)
 this is the function signature of std::endl
 
- Protected Attributes inherited from Log
std::string key
 The key that will be written at the start of each log.
 
std::string lastMessage
 The last message written.
 
bool writeKey
 If true, then the key will be written at the start of each log message.
 
bool instanceLoggingEnabled
 If true, then this instance should log messages.
 
bool * loggingEnabledPtr
 This is a hack that enables variables to be updated inside const methods.
 
bool * writeKeyPtr
 This is a hack that enables variables to be updated inside const methods.
 
std::string * lastMessagePtr
 This is a hack that enables variables to be updated inside const methods.
 

Detailed Description

Definition at line 51 of file ErrorLog.h.

Member Function Documentation

static bool ErrorLog::getLoggingEnabled ( )
inlinestatic

returns true if logging is enabled for this class, this supersedes the specific instance logging

Returns
returns true if logging is enabled for this class, false otherwise

Definition at line 82 of file ErrorLog.h.

static bool ErrorLog::setLoggingEnabled ( const bool  enabled)
inlinestatic

sets if logging is enabled for this class, this supersedes the specific instance logging

Returns
returns true if the parameter was updated successfully, false otherwise

Definition at line 90 of file ErrorLog.h.

virtual void ErrorLog::triggerCallback ( const std::string &  message) const
inlineprotectedvirtual

This callback can be used to propagate messages to other interfaces (e.g., a GUI built on top of the GRT). It gets triggered anytime a message is ended (with std::endl), the message will contain the full message + the log key. To use this, inherit from the log base class and overwrite the contents of this virtual function.

Parameters
messagethe message from the latest log

Reimplemented from Log.

Definition at line 102 of file ErrorLog.h.


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