PCL
|
XISF stream message logger More...
#include <XISF.h>
Public Types | |
using | message_type = XISFMessageType::value_type |
Public Member Functions | |
XISFLogHandler ()=default | |
virtual | ~XISFLogHandler () |
virtual void | Close () |
virtual void | Init (const String &filePath, bool writing) |
virtual void | Log (const String &text, message_type type) |
XISFLogHandler is a simple handler object which logs messages generated by the XISFReader and XISFWriter classes during XISF file transactions. These messages can be informative, warnings, and recoverable error messages.
Note that unrecoverable errors are not logged and hence not sent to this class (or derived); they are always thrown as Exception instances, which the caller must catch and manage appropriately.
using pcl::XISFLogHandler::message_type = XISFMessageType::value_type |
Represents a log message type. Supported values are enumerated in the XISFMessageType namespace.
|
default |
Default constructor.
|
inlinevirtual |
|
inlinevirtual |
Closes this log handler object. This function will be called by internal XISFReader and XISFWriter engines at the end of an XISF file transaction.
The default implementation does nothing. This virtual function can be reimplemented in a derived class requiring special cleanup or initialization at the end of a file loading or generation process.
|
inlinevirtual |
Initializes this log handler object. This function will be called by internal XISFReader and XISFWriter engines at the beginning of an XISF file transaction.
filePath | Full path to the XISF file about to be loaded or generated. |
writing | Will be true at the beginning of a file generation process; false at the beginning of a file loading process. |
The default implementation does nothing. This virtual function can be reimplemented in a derived class requiring special initialization at the beginning of a file loading or generation process.
|
inlinevirtual |
Handles a log message. This function will be called by internal XISFReader and XISFWriter engines at different points during XISF file transactions.
text | The log text message. |
type | The type of this log message. See the XISFMessageType namespace for possible values. |
The default implementation does nothing. This virtual function should be reimplemented in a derived class. Typically, the received text messages are sent directly to the platform console; for example, the standard XISF format support module does just that. Other options are writing messages to text files, or sending them to other processes.