ldas-tools-al  2.5.7
Public Member Functions | Protected Member Functions | List of all members
LDASTools::AL::Log::StreamInterface Class Referenceabstract

Class to handle streaming of messages. More...

#include <Log.hh>

Inherited by LDASTools::AL::Log::StreamFile, and LDASTools::AL::Log::StreamStdErr.

Public Member Functions

 StreamInterface ()
 Constructor.
 
virtual ~StreamInterface ()
 Destructor.
 
void Callback (callback_type Callback)
 Establish callback.
 
virtual void Close ()=0
 How to close the stream.
 
virtual bool IsOpen () const =0
 Resturn the open state of the stream. More...
 
virtual void Open ()=0
 How to open the stream.
 
virtual void WriteMessage (const std::string &Message)=0
 How to open the stream. More...
 
template<typename T >
std::ostream & operator<< (T a)
 Output to the stream.
 

Protected Member Functions

void onClose ()
 Destructor.
 
void onOpen ()
 Destructor.
 
virtual std::ostream & stream ()=0
 Gain access to the stream.
 

Detailed Description

Class to handle streaming of messages.

This is an pure abstract class which describes the interface that needs to be created by derived classes.

Member Function Documentation

◆ IsOpen()

virtual bool LDASTools::AL::Log::StreamInterface::IsOpen ( ) const
pure virtual

Resturn the open state of the stream.

Returns
If the stream is open and writable, then return true. Otherwise, false.

◆ WriteMessage()

virtual void LDASTools::AL::Log::StreamInterface::WriteMessage ( const std::string &  Message)
pure virtual

How to open the stream.

Parameters
[in]MessageThe message to send to the output stream.

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