Main Page | Modules | Namespace List | Class Hierarchy | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

Teem::Logger Class Reference

#include <Logger.h>

Inheritance diagram for Teem::Logger:

Teem::OctaveLogger List of all members.

Detailed Description

Abstract class for a generic logger.

Public Member Functions

 Logger (const char *fileName)
virtual ~Logger ()
template<typename T>
void addVariable (const std::string &label, const T &ref)
 Add a reference to the logger.
template<typename T>
void addIshtarVariable (const std::string &label, const char *id)
 Add an Ishtar variable to the logger.
template<typename ForwardIterator>
void addVariables (const std::string &label, ForwardIterator from, ForwardIterator to)
 Add a collection of variables using iterators.
void step ()
 Add a new snapshot to the log file.

Protected Types

typedef std::map< std::string,
std::vector< Loggable * > > 
 Map for all logable units.

Protected Member Functions

void add (const std::string &label, Loggable *loggable)
 Add a new loggable in the log under a certain label.
virtual void initLog (std::ostream &log)=0
 Init the log file (e.g. write information in the begining of the log file).
virtual void dumpSnapshot (std::ostream &log)=0
 Dump a snapshot (e.g. write the content of all variables to the log file).

Protected Attributes

std::ofstream logFile
 file to log to
bool inited
 true if log is initialised. Used for delayed initialisation
LoggableMap loggables
 all logables units


std::ostream & operator<< (std::ostream &os, const Logger::Loggable &loggable)
 Operator << for ostreams and Loggables.


class  Loggable
 Abstract class for loggable unit. More...
class  LoggableIshtarVariable
 Lagable based on an ishtar variable. More...
class  LoggableVariable
 Loggable based on pointer. More...

The documentation for this class was generated from the following files:
Generated on Mon Oct 24 17:38:29 2005 for Teem by  doxygen 1.4.2