![]() |
Main Page
Class Hierarchy
Alphabetical List
Compound List
File List
Compound Members
![]() |
#include <FXBinaryLogReader.h>
Public Methods | |
FXBinaryLogReader (const FXString &file="", FXuint opts=0) | |
FXbool | name (const FXString &file) |
FXString | name () |
FXbool | opened () |
FXBinaryLogData * | read () |
virtual | ~FXBinaryLogReader () |
Friends | |
FXStream & | operator<< (FXStream &store, const FXBinaryLogReader &b) |
FXStream & | operator>> (FXStream &store, FXBinaryLogReader &b) |
How this differs from a normal log file is that, up to 1000% of the speed of a log file is consumed in the printf style parsing of the input string. By using numbers only, no parsing is necessary. As an added bonus, you dont log many bytes per log entry so the disk I/O time is reduced.
The upshot is that a binary logger can run many times quicker than a text file logger, and that the storage of that information is more compact. The downside is that you need a custom program to read the file (see FXBinaryLogReader).
File format:
It is envisaged that you could use this logger in an embedded application. You would log the values you need, when you identify a condition that needs to be logged. You should create a specific enumerated value, for all possible log cases.
Definition at line 81 of file FXBinaryLogReader.h.
|
Give me a log file.
|
|
done.
|
|
Change the location of the log file - change is immediate.
|
|
get the current filename.
|
|
indicates whether the log file can/will be read from.
|
|
read log entries from the file.
|
|
Save to stream.
|
|
load from stream.
|