#include <logfile.h>
Inheritance diagram for LogFile:

T can be std::string or int or anything else supports the << of streams. (It is used as name for a channel.)
Definition at line 22 of file logfile.h.
Public Member Functions | |
| LogFile (const std::string &filename="", const std::string &info="", const std::string &separator="\t") | |
| ~LogFile () | |
| void | setInfo (const std::string &info) |
| void | addChannel (const T &name) |
| void | putData (const T &channel, double value) |
| void | comment (const std::string &text) |
| print comment line in file format is "#%d: %s" | |
| void | print_names_list () |
| print numbered names list in file header | |
| void | print () |
| print data line in file format is "%5.3f%s" * number of channels s is the separator string usually "\t" | |
Protected Types | |
| typedef std::map< T, double > | data_map |
| typedef std::list< T > | names_list |
Protected Member Functions | |
| void | init () |
Protected Attributes | |
| FILE * | f |
| data_map | data |
| names_list | names |
| std::string | filename |
| std::string | info |
| std::string | separator |
| int | line_counter |
| bool | _print_names_list |
|
|
|
|
|
|
|
||||||||||||||||
|
|
|
|
|
|
|
|
|
|
print comment line in file format is "#%d: %s"
|
|
|
|
|
|
print data line in file format is "%5.3f%s" * number of channels s is the separator string usually "\t"
|
|
|
print numbered names list in file header
|
|
||||||||||||
|
Reimplemented in PlotLog, and PlotLog< std::string >. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1.4.5