Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | Namespace Members | Class Members

Logger Struct Reference

#include <src/Logger.h>

Inheritance diagram for Logger:

Inheritance graph
[legend]
List of all members.

Detailed Description

Very basic logging interface.

Enough for our current needs, something more sophisticated may be necessary in the future. See for example the Transport Sample Protocol at https://savannah.nongnu.org/projects/tsp/

The idea is the use the logger as a vector of values. When all new values are filled, then call record() to write to the log file/socket/whatever. The logger should be initialized with a descriptive ID (used in file name, for ex:), and the variables names corresponding to the values that will be sent.

Author:
Nicolas Brodu


Public Types

typedef std::vector< double
>::const_iterator 
const_iterator
typedef std::vector< double
>::iterator 
iterator

Public Member Functions

 Logger (const std::string &id, const std::vector< std::string > &names)
 Takes a number of entries and their names This implicitly defines this vector size. All values are initialized with 0.0.
virtual void record ()
 Record the previously set values. If a value was not set since the last record, it keeps the same old value (init:0.0) for the new one.

Public Attributes

std::vector< std::string > names
std::string id


The documentation for this struct was generated from the following files:
Generated on Mon Mar 28 11:27:26 2005 for Crogai by  doxygen 1.4.1