Simple class template for data logging. More...
#include <DwmDataLog.hh>
Classes | |
| class | Entry |
| Encapsulates a single data log entry. More... | |
Public Member Functions | |
| DataLog (const std::string &filename) | |
Constructor. filename is the name of the file to use. | |
| ~DataLog () | |
| Destructor. | |
| bool | Open (std::ios_base::openmode mode) |
Opens the log with the given mode. Returns true on success. | |
| bool | Rewind () |
| Rewinds the log to the beginning. Returns true on success. | |
| bool | Close () |
| Closes the log. Returns true on success. | |
| bool | GetNext (Entry &entry) |
| Fetches the next entry from the log. Returns true on succes. | |
| bool | Record (const T &value) |
| Writes an entry to the log. Returns true on success. | |
Simple class template for data logging.
Each log entry is represented by the DataLog::Entry class, which holds a timestamp and and instance of the parameterized type.