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

rovsoft::io::SegmentIStreamer Class Reference

This class defines the interface for reading from a segmented stream. More...

#include <SegmentIStreamer.hh>

Inheritance diagram for rovsoft::io::SegmentIStreamer:

Inheritance graph
[legend]
Collaboration diagram for rovsoft::io::SegmentIStreamer:

Collaboration graph
[legend]
List of all members.

Public Member Functions

virtual int nextStart ()=0 throw (IOExceptionPtr)
 Discards all data until the beginning of a segment is detected.
virtual bool isStart ()=0 throw (IOExceptionPtr)
 Test if we are at the beginning of a segment.
virtual bool isEnd ()=0 throw (IOExceptionPtr)
 Test if we are at the end of a segment.

Detailed Description

This class defines the interface for reading from a segmented stream.

A segmented stream has separators between the valid data parts of the stream. There is a "start" separator and a "end" separator, marking the beginning and the end of a data block, these separators are only internal and never read by the user of this class, he can only use them indirectly with for example nextStart().


Member Function Documentation

virtual bool rovsoft::io::SegmentIStreamer::isEnd  )  throw (IOExceptionPtr) [pure virtual]
 

Test if we are at the end of a segment.

Returns:
true if we are at the end of a segment.

Implemented in rovsoft::io::BinaryLenSegmentIStreamer.

virtual bool rovsoft::io::SegmentIStreamer::isStart  )  throw (IOExceptionPtr) [pure virtual]
 

Test if we are at the beginning of a segment.

Returns:
true if we are at the beginning of a segment, this is only true if a nextStart() method had been called previously and no data was read yet.

Implemented in rovsoft::io::BinaryLenSegmentIStreamer.

virtual int rovsoft::io::SegmentIStreamer::nextStart  )  throw (IOExceptionPtr) [pure virtual]
 

Discards all data until the beginning of a segment is detected.

This method has to be called before reading a new segment.

Returns:
The number of bytes thrown away, not being the start character (in a protocol with a start character) So if the next read byte is the start character, this method will return 0.

Implemented in rovsoft::io::BinaryLenSegmentIStreamer.


The documentation for this class was generated from the following file:
Generated on Tue May 31 14:19:41 2005 for Rovsoft by  doxygen 1.4.3