ldas-tools-al 2.6.7
Loading...
Searching...
No Matches
anonymous_namespace{Log.cc}::Log::StreamInterface Class Referenceabstract

Class to handle streaming of messages. More...

#include <Log.hh>

Inheritance diagram for anonymous_namespace{Log.cc}::Log::StreamInterface:

Public Types

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

Public Member Functions

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

Protected Member Functions

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

Private Attributes

callback_type callback
 Callback storage.

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/2]

◆ callback_type [2/2]

Constructor & Destructor Documentation

◆ StreamInterface() [1/2]

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

Constructor.

◆ StreamInterface() [2/2]

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

Constructor.

◆ ~StreamInterface() [1/2]

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

Destructor.

◆ ~StreamInterface() [2/2]

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

Destructor.

Member Function Documentation

◆ Callback() [1/2]

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

Establish callback.

◆ Callback() [2/2]

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

Establish callback.

◆ Close() [1/2]

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

How to close the stream.

◆ Close() [2/2]

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

How to close the stream.

◆ IsOpen() [1/2]

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.

◆ IsOpen() [2/2]

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.

◆ onClose() [1/2]

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

Destructor.

◆ onClose() [2/2]

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

◆ onOpen() [1/2]

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

Destructor.

◆ onOpen() [2/2]

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

◆ Open() [1/2]

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

How to open the stream.

◆ Open() [2/2]

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

How to open the stream.

◆ operator<<() [1/2]

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

Output to the stream.

◆ operator<<() [2/2]

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

Output to the stream.

◆ stream() [1/2]

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

Gain access to the stream.

◆ stream() [2/2]

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

Gain access to the stream.

◆ WriteMessage() [1/2]

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.

◆ WriteMessage() [2/2]

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.

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:
  • /home/abuild/rpmbuild/BUILD/ldas-tools-al-2.6.7-build/ldas-tools-al-2.6.7/build/include/ldastoolsal/Log.hh
  • /home/abuild/rpmbuild/BUILD/ldas-tools-al-2.6.7-build/ldas-tools-al-2.6.7/src/Log.hh
  • /home/abuild/rpmbuild/BUILD/ldas-tools-al-2.6.7-build/ldas-tools-al-2.6.7/src/Log.cc