PCL
pcl::XISFLogHandler Class Reference

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)
 

Detailed Description

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.

See also
XISFReader, XISFWriter

Definition at line 801 of file XISF.h.

Member Typedef Documentation

◆ message_type

using pcl::XISFLogHandler::message_type = XISFMessageType::value_type

Represents a log message type. Supported values are enumerated in the XISFMessageType namespace.

Definition at line 809 of file XISF.h.

Constructor & Destructor Documentation

◆ XISFLogHandler()

pcl::XISFLogHandler::XISFLogHandler ( )
default

Default constructor.

◆ ~XISFLogHandler()

virtual pcl::XISFLogHandler::~XISFLogHandler ( )
inlinevirtual

Virtual destructor.

Definition at line 819 of file XISF.h.

Member Function Documentation

◆ Close()

virtual void pcl::XISFLogHandler::Close ( )
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.

Definition at line 872 of file XISF.h.

◆ Init()

virtual void pcl::XISFLogHandler::Init ( const String filePath,
bool  writing 
)
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.

Parameters
filePathFull path to the XISF file about to be loaded or generated.
writingWill 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.

Definition at line 839 of file XISF.h.

◆ Log()

virtual void pcl::XISFLogHandler::Log ( const String text,
message_type  type 
)
inlinevirtual

Handles a log message. This function will be called by internal XISFReader and XISFWriter engines at different points during XISF file transactions.

Parameters
textThe log text message.
typeThe 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.

Definition at line 859 of file XISF.h.


The documentation for this class was generated from the following file: