Stream::LineSplitStream< String > Class Template Reference

#include <Streams.hpp>

Inheritance diagram for Stream::LineSplitStream< String >:

Stream::InputStream Stream::BaseStream Stream::InputFileStream List of all members.

Detailed Description

template<class String>
class Stream::LineSplitStream< String >

An interface version that can split the input in lines.


Public Member Functions

virtual uint32 currentPosition () const=0
 This method returns the position of the next byte that could be read from this stream.
virtual bool endReached () const=0
 This method returns true if the end of stream is reached.
virtual uint32 fullSize () const=0
 This method returns the stream length in byte, if known If the length is equal or higher than 2^32 - 1, the returned value is 0xfffffffe For stream where the length is not known, this method will return 0xffffffff.
virtual bool goForward (const uint32 &skipAmount)=0
 Move the stream position forward of the given amount This should give the same results as setPosition(currentPosition() + value), but implementation can be faster for non-seek-able stream.
virtual uint32 read (void *const buffer, const uint32 &size) const=0 throw ()
 Try to read the given amount of data to the specified buffer.
virtual String readNextLine () const throw ()
 Read the next line.
virtual bool setPosition (const uint32 &newPos)=0
 Try to seek to the given absolute position (return false if not supported).

Protected Member Functions

 LineSplitStream ()
 The default constructor is only available to child classes.


Constructor & Destructor Documentation

template<class String>
Stream::LineSplitStream< String >::LineSplitStream (  )  [inline, protected]

The default constructor is only available to child classes.


Member Function Documentation

virtual uint32 Stream::BaseStream::currentPosition (  )  const [pure virtual, inherited]

This method returns the position of the next byte that could be read from this stream.

Implemented in Stream::InputFileStream, Stream::MemoryBufferedStream, and Stream::MemoryBlockStream.

virtual bool Stream::BaseStream::endReached (  )  const [pure virtual, inherited]

This method returns true if the end of stream is reached.

Implemented in Stream::InputFileStream, Stream::MemoryBufferedStream, and Stream::MemoryBlockStream.

virtual uint32 Stream::BaseStream::fullSize (  )  const [pure virtual, inherited]

This method returns the stream length in byte, if known If the length is equal or higher than 2^32 - 1, the returned value is 0xfffffffe For stream where the length is not known, this method will return 0xffffffff.

Implemented in Stream::InputFileStream, Stream::MemoryBufferedStream, and Stream::MemoryBlockStream.

virtual bool Stream::BaseStream::goForward ( const uint32 &  skipAmount  )  [pure virtual, inherited]

Move the stream position forward of the given amount This should give the same results as setPosition(currentPosition() + value), but implementation can be faster for non-seek-able stream.

Implemented in Stream::InputFileStream, Stream::MemoryBufferedStream, and Stream::MemoryBlockStream.

virtual uint32 Stream::InputStream::read ( void *const   buffer,
const uint32 &  size 
) const throw () [pure virtual, inherited]

Try to read the given amount of data to the specified buffer.

Returns:
the number of byte truly read (this method doesn't throw)

Implemented in Stream::InputFileStream, Stream::MemoryBufferedStream, and Stream::MemoryBlockStream.

template<class String>
virtual String Stream::LineSplitStream< String >::readNextLine (  )  const throw () [inline, virtual]

Read the next line.

Returns:
The String containing the next line (should end by
or
)

virtual bool Stream::BaseStream::setPosition ( const uint32 &  newPos  )  [pure virtual, inherited]

Try to seek to the given absolute position (return false if not supported).

Implemented in Stream::InputFileStream, Stream::MemoryBufferedStream, and Stream::MemoryBlockStream.


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

(C) An X-Ryl669 project 2007

This document describes Unlimited Zooming Interface source code. UZI stands for Unlimited Zooming Interface, and source code license is