Main Page | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

ers::Stream Class Reference

Root/Null issue stream. More...

#include <Stream.h>

Inheritance diagram for ers::Stream:

ers::DefaultStream ers::DefaultStream ers::FIFOStream ers::FIFOStream ers::FilterStream ers::FilterStream ers::HumanStream ers::HumanStream List of all members.

Public Member Functions

 operator std::string () const
 operator std::string () const
virtual void print_to (std::ostream &stream) const
virtual void print_to (std::ostream &stream) const
virtual Issuereceive ()
 Receives an issue from the stream.
virtual Issuereceive ()
 Receives an issue from the stream.
virtual void send (const Issue *i)
 Sends an issue into the stream.
virtual void send (const Issue *i)
 Sends an issue into the stream.
 Stream (const Stream &other)
 Stream ()
 Stream (const Stream &other)
 Stream ()
virtual ~Stream ()
virtual ~Stream ()

Static Public Attributes

const char *const NULL_STREAM_KEY
const char *const NULL_STREAM_KEY = "null"

Friends

class Issue

Detailed Description

Root/Null issue stream.

Root issue stream. An ERS stream is a mean to send and receive issues. The two core method to do so are send and receive. Certain subclasses of stream might implement only sending, or only receiving. The root stream class implements a null stream, i.e a stream where no issue can be read from and silently discards sent issues.

Author:
Matthias Wiesmann
Version:
1.0


Constructor & Destructor Documentation

ers::Stream::Stream  ) 
 

00031 {}

ers::Stream::Stream const Stream other  ) 
 

00032 {} 

ers::Stream::~Stream  )  [virtual]
 

00033 {}

ers::Stream::Stream  ) 
 

ers::Stream::Stream const Stream other  ) 
 

virtual ers::Stream::~Stream  )  [virtual]
 


Member Function Documentation

ers::Stream::operator std::string  )  const
 

ers::Stream::operator std::string  )  const
 

00035                                     {
00036     std::ostringstream stream ; 
00037     print_to(stream); 
00038     return stream.str(); 
00039 } // to string 

virtual void ers::Stream::print_to std::ostream stream  )  const [virtual]
 

Reimplemented in ers::FIFOStream, ers::FilterStream, ers::HumanStream, ers::FIFOStream, ers::FilterStream, and ers::HumanStream.

void ers::Stream::print_to std::ostream stream  )  const [virtual]
 

Reimplemented in ers::FIFOStream, ers::FilterStream, ers::HumanStream, ers::FIFOStream, ers::FilterStream, and ers::HumanStream.

00059                                                  {
00060     stream << NULL_STREAM_KEY << ':' ; 
00061 } // print_to

virtual Issue* ers::Stream::receive  )  [virtual]
 

Receives an issue from the stream.

Reimplemented in ers::FIFOStream, and ers::FIFOStream.

ers::Issue * ers::Stream::receive  )  [virtual]
 

Receives an issue from the stream.

Reads an isssue on the stream

Returns:
the issue that has been read
Note:
This implementation always returns a null pointer

Reimplemented in ers::FIFOStream, and ers::FIFOStream.

00055                              {
00056     return 0 ; 
00057 } // receive

virtual void ers::Stream::send const Issue i  )  [virtual]
 

Sends an issue into the stream.

Reimplemented in ers::DefaultStream, ers::FIFOStream, ers::FilterStream, ers::HumanStream, ers::DefaultStream, ers::FIFOStream, ers::FilterStream, and ers::HumanStream.

void ers::Stream::send const Issue i  )  [virtual]
 

Sends an issue into the stream.

Sends the issue to the stream.

Parameters:
i the issue to send
Note:
This implementation silently discards the Issue

Reimplemented in ers::DefaultStream, ers::FIFOStream, ers::FilterStream, ers::HumanStream, ers::DefaultStream, ers::FIFOStream, ers::FilterStream, and ers::HumanStream.

00046                                    {
00047     (void) i ; 
00048 } // send 


Friends And Related Function Documentation

Issue [friend]
 


Member Data Documentation

const char* const ers::Stream::NULL_STREAM_KEY [static]
 

Key for discard stream

const char *const ers::Stream::NULL_STREAM_KEY = "null" [static]
 

Key for discard stream


The documentation for this class was generated from the following files:
Generated on Wed Feb 2 19:20:27 2011 for BOSS6.5.5 by  doxygen 1.3.9.1