Stream::BaseStream Class Reference

#include <Streams.hpp>

Inheritance diagram for Stream::BaseStream:

Stream::InputStream Stream::OutputStream Stream::LineSplitStream< String > Stream::LineSplitStream< Bstrlib::String > Stream::MemoryBlockStream Stream::MemoryBufferedStream Stream::InputFileStream List of all members.

Detailed Description

The Stream interface that must be supported in child classes.


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 bool setPosition (const uint32 &newPos)=0
 Try to seek to the given absolute position (return false if not supported).

Protected Member Functions

 BaseStream ()
 The default constructor is only available to child classes.
virtual ~BaseStream ()
 The only destructor.


Constructor & Destructor Documentation

Stream::BaseStream::BaseStream (  )  [inline, protected]

The default constructor is only available to child classes.

virtual Stream::BaseStream::~BaseStream (  )  [inline, protected, virtual]

The only destructor.


Member Function Documentation

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

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]

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]

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]

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 bool Stream::BaseStream::setPosition ( const uint32 &  newPos  )  [pure virtual]

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