CartoType API
Public Member Functions
CartoType::MInputStream Class Reference

#include <cartotype_stream.h>

Inheritance diagram for CartoType::MInputStream:
CartoType::CFileInputStream CartoType::TMemoryInputStream

List of all members.

Public Member Functions

virtual ~MInputStream ()
virtual TResult Read (const uint8 *&aPointer, int32 &aLength)=0
virtual bool EndOfStream () const =0
virtual TResult Seek (int32 aPosition)=0
virtual int32 Position (TResult &aError)=0
virtual int32 Length (TResult &aError)=0
virtual const MStringName ()

Detailed Description

The input stream interface. Streams that do not support random access always return errors for Seek and may return errors for Position and Length.


Constructor & Destructor Documentation

virtual CartoType::MInputStream::~MInputStream ( ) [inline, virtual]

Virtual destructor: strictly unneeded since pointers to MInputStream are not owned and should not be deleted.


Member Function Documentation

virtual bool CartoType::MInputStream::EndOfStream ( ) const [pure virtual]

Return whether the end of the stream has been reached.

Implemented in CartoType::CFileInputStream, and CartoType::TMemoryInputStream.

virtual int32 CartoType::MInputStream::Length ( TResult aError) [pure virtual]

Return the number of bytes in the stream.

Implemented in CartoType::CFileInputStream, and CartoType::TMemoryInputStream.

virtual const MString* CartoType::MInputStream::Name ( ) [inline, virtual]

Return the file name or URI associated with the stream if any.

Reimplemented in CartoType::CFileInputStream.

virtual int32 CartoType::MInputStream::Position ( TResult aError) [pure virtual]

Return the current position.

Implemented in CartoType::CFileInputStream, and CartoType::TMemoryInputStream.

virtual TResult CartoType::MInputStream::Read ( const uint8 *&  aPointer,
int32 &  aLength 
) [pure virtual]

Read some data into a buffer owned by the MInputStream object and return a pointer to it in aPointer. Return the number of bytes of data in aLength. This function will return at least one byte if there are bytes remaining in the stream. The pointer is valid until the next call to Read.

Implemented in CartoType::CFileInputStream, and CartoType::TMemoryInputStream.

virtual TResult CartoType::MInputStream::Seek ( int32  aPosition) [pure virtual]

Seek to the specified position.

Implemented in CartoType::CFileInputStream, and CartoType::TMemoryInputStream.


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