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

Class to handle streaming of messages. More...

#include <Log.hh>

Inheritance diagram for LDASTools::AL::Log::StreamInterface:
Inheritance graph
[legend]

Public Types

typedef boost::shared_ptr< StreamCBInterfacecallback_type
 
typedef boost::shared_ptr< StreamCBInterfacecallback_type
 
typedef boost::shared_ptr< StreamCBInterfacecallback_type
 

Public Member Functions

 StreamInterface ()
 Constructor. More...
 
virtual ~StreamInterface ()
 Destructor. More...
 
void Callback (callback_type Callback)
 Establish callback. More...
 
virtual void Close ()=0
 How to close the stream. More...
 
virtual bool IsOpen () const =0
 Resturn the open state of the stream. More...
 
virtual void Open ()=0
 How to open the stream. More...
 
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. More...
 
 StreamInterface ()
 Constructor. More...
 
virtual ~StreamInterface ()
 Destructor. More...
 
void Callback (callback_type Callback)
 Establish callback. More...
 
virtual void Close ()=0
 How to close the stream. More...
 
virtual bool IsOpen () const =0
 Resturn the open state of the stream. More...
 
virtual void Open ()=0
 How to open the stream. More...
 
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. More...
 
 StreamInterface ()
 Constructor. More...
 
virtual ~StreamInterface ()
 Destructor. More...
 
void Callback (callback_type Callback)
 Establish callback. More...
 
virtual void Close ()=0
 How to close the stream. More...
 
virtual bool IsOpen () const =0
 Resturn the open state of the stream. More...
 
virtual void Open ()=0
 How to open the stream. More...
 
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. More...
 

Protected Member Functions

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

Private Attributes

callback_type callback
 Callback storage. More...
 

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 Typedef Documentation

◆ callback_type [1/3]

◆ callback_type [2/3]

◆ callback_type [3/3]

Constructor & Destructor Documentation

◆ StreamInterface() [1/3]

LDASTools::AL::Log::StreamInterface::StreamInterface ( )

Constructor.

◆ ~StreamInterface() [1/3]

LDASTools::AL::Log::StreamInterface::~StreamInterface ( )
virtual

Destructor.

◆ StreamInterface() [2/3]

LDASTools::AL::Log::StreamInterface::StreamInterface ( )

Constructor.

◆ ~StreamInterface() [2/3]

virtual LDASTools::AL::Log::StreamInterface::~StreamInterface ( )
virtual

Destructor.

◆ StreamInterface() [3/3]

LDASTools::AL::Log::StreamInterface::StreamInterface ( )

Constructor.

◆ ~StreamInterface() [3/3]

virtual LDASTools::AL::Log::StreamInterface::~StreamInterface ( )
virtual

Destructor.

Member Function Documentation

◆ Callback() [1/3]

void LDASTools::AL::Log::StreamInterface::Callback ( callback_type  Callback)
inline

Establish callback.

◆ Callback() [2/3]

void LDASTools::AL::Log::StreamInterface::Callback ( callback_type  Callback)

Establish callback.

◆ Callback() [3/3]

void LDASTools::AL::Log::StreamInterface::Callback ( callback_type  Callback)

Establish callback.

◆ Close() [1/3]

virtual void LDASTools::AL::Log::StreamInterface::Close ( )
pure virtual

◆ Close() [2/3]

virtual void LDASTools::AL::Log::StreamInterface::Close ( )
pure virtual

◆ Close() [3/3]

virtual void LDASTools::AL::Log::StreamInterface::Close ( )
pure virtual

◆ IsOpen() [1/3]

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.

Implemented in LDASTools::AL::Log::StreamFile, LDASTools::AL::Log::StreamFile, LDASTools::AL::Log::StreamFile, LDASTools::AL::Log::StreamStdErr, LDASTools::AL::Log::StreamStdErr, and LDASTools::AL::Log::StreamStdErr.

◆ IsOpen() [2/3]

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.

Implemented in LDASTools::AL::Log::StreamFile, LDASTools::AL::Log::StreamFile, LDASTools::AL::Log::StreamFile, LDASTools::AL::Log::StreamStdErr, LDASTools::AL::Log::StreamStdErr, and LDASTools::AL::Log::StreamStdErr.

◆ IsOpen() [3/3]

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.

Implemented in LDASTools::AL::Log::StreamFile, LDASTools::AL::Log::StreamFile, LDASTools::AL::Log::StreamFile, LDASTools::AL::Log::StreamStdErr, LDASTools::AL::Log::StreamStdErr, and LDASTools::AL::Log::StreamStdErr.

◆ onClose() [1/3]

void LDASTools::AL::Log::StreamInterface::onClose ( )
protected

◆ onClose() [2/3]

void LDASTools::AL::Log::StreamInterface::onClose ( )
protected

◆ onClose() [3/3]

void LDASTools::AL::Log::StreamInterface::onClose ( )
protected

Destructor.

◆ onOpen() [1/3]

void LDASTools::AL::Log::StreamInterface::onOpen ( )
protected

Destructor.

◆ onOpen() [2/3]

void LDASTools::AL::Log::StreamInterface::onOpen ( )
protected

◆ onOpen() [3/3]

void LDASTools::AL::Log::StreamInterface::onOpen ( )
protected

◆ Open() [1/3]

virtual void LDASTools::AL::Log::StreamInterface::Open ( )
pure virtual

◆ Open() [2/3]

virtual void LDASTools::AL::Log::StreamInterface::Open ( )
pure virtual

◆ Open() [3/3]

virtual void LDASTools::AL::Log::StreamInterface::Open ( )
pure virtual

◆ operator<<() [1/3]

template<typename T >
std::ostream& LDASTools::AL::Log::StreamInterface::operator<< ( a)
inline

Output to the stream.

◆ operator<<() [2/3]

template<typename T >
std::ostream& LDASTools::AL::Log::StreamInterface::operator<< ( a)
inline

Output to the stream.

◆ operator<<() [3/3]

template<typename T >
std::ostream& LDASTools::AL::Log::StreamInterface::operator<< ( a)
inline

Output to the stream.

◆ stream() [1/3]

virtual std::ostream& LDASTools::AL::Log::StreamInterface::stream ( )
protectedpure virtual

◆ stream() [2/3]

virtual std::ostream& LDASTools::AL::Log::StreamInterface::stream ( )
protectedpure virtual

◆ stream() [3/3]

virtual std::ostream& LDASTools::AL::Log::StreamInterface::stream ( )
protectedpure virtual

◆ WriteMessage() [1/3]

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

◆ WriteMessage() [2/3]

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

◆ WriteMessage() [3/3]

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

Member Data Documentation

◆ callback

callback_type LDASTools::AL::Log::StreamInterface::callback
private

Callback storage.

If this is set, then this instance is called to handle additional actions that should happen when the stream is opened or closed.


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