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.
DebugLog Class Reference
Inheritance diagram for DebugLog:
Log

Public Member Functions

 DebugLog (const std::string &key="")
 
 DebugLog (const DebugLog &rhs)
 
DebugLogoperator= (const DebugLog &rhs)
 
 GRT_DEPRECATED_MSG ("enableLogging is deprecated, use setLoggingEnabled instead", static bool enableLogging(bool loggingEnabled))
 
 GRT_DEPRECATED_MSG ("loggingEnabled is deprecated, use getLoggingEnabled instead", bool loggingEnabled() const )
 
- 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< DebugLogMessage > &observer)
 
static bool removeObserver (Observer< DebugLogMessage > &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< DebugLogMessageobserverManager
 
static bool debugLoggingEnabled = true
 Enables/disables logging across all DebugLog instances.
 
- 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 DebugLog.h.

Member Function Documentation

static bool DebugLog::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 DebugLog.h.

static bool DebugLog::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 DebugLog.h.

virtual void DebugLog::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 103 of file DebugLog.h.


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