C12Adapter Opensource C++ Interface
|
Abstract log file utility class to handle the log from the monitor. More...
Classes | |
struct | LogFilePage |
Page format of the monitor file. More... | |
struct | PacketHeader |
Packet header structure. More... | |
Public Types | |
enum | { PAGE_HEADER_SIGNATURE = 0xA2EBBAED, PAGE_OBFUSCATED_HEADER_SIGNATURE = 0xA2EBBAEC, PAGE_TOTAL_SIZE = 0x1000, PAGE_HEADER_SIZE = 16, PAGE_FOOTER_SIZE = 4, PAGE_BODY_SIZE = PAGE_TOTAL_SIZE - PAGE_HEADER_SIZE - PAGE_FOOTER_SIZE, PACKET_HEADER_SIZE = 10, NUMBER_OF_PAGES_LIMIT = 0xFFFF } |
Public Member Functions | |
virtual | ~MLogFile () |
Object destructor, close the log file. | |
bool | IsOpen () const |
Tells if the file is open. More... | |
const MStdString & | GetFileName () const |
Get the file name, as set for logging. More... | |
const MStdString & | GetOpenWarnings () const |
Get the warning message which might arise during opening a file and checking its contents. More... | |
void | SetListener (MMonitorFile *listener) |
Sets the listener object to start handling events. More... | |
virtual void | Close () |
Close the file, if it was open. | |
bool | GetObfuscate () const |
void | SetObfuscate (bool yes) |
Protected Member Functions | |
MLogFile () | |
Constructor that creates an uninitialized log file object. | |
Abstract log file utility class to handle the log from the monitor.
The concrete instances of this class will provide facilities for reading and writing the log files.
anonymous enum |
|
inline |
Get the file name, as set for logging.
If the file exists, the full file name will be returned, made from the user file name by the operating system.
|
inline |
Whether to obfuscate the monitor file so it does not clearly present text chunks of data. This option is not any sort of secure encryption.
|
inline |
Get the warning message which might arise during opening a file and checking its contents.
It will return an empty string if there were no warnings during opening. The warnings are kept until a new open is called.
|
inline |
Tells if the file is open.
Normally the error is thrown at the constructor if there is a problem with the file at opening, however if the problem appears later on use, the object will exist, throw exceptions on attempts to operate the file, and IsOpen will become false.
|
inline |
Sets the listener object to start handling events.
Note that new pointer replaces previous one without destroying it.
|
inline |
Whether to obfuscate the monitor file so it does not clearly present text chunks of data. This option is not any sort of secure encryption.