|
CartoType API
|
#include <cartotype_stream.h>
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 MString * | Name () |
The input stream interface. Streams that do not support random access always return errors for Seek and may return errors for Position and Length.
| virtual CartoType::MInputStream::~MInputStream | ( | ) | [inline, virtual] |
Virtual destructor: strictly unneeded since pointers to MInputStream are not owned and should not be deleted.
| 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.
1.7.5.1