CartoType C++ API 7.8.2, 2022-03-25
for Windows, Linux, Qt and other platforms supporting C++ development
|
#include <cartotype_stream.h>
Public Member Functions | |
virtual | ~MInputStream () |
virtual void | Read (const uint8_t *&aPointer, size_t &aLength)=0 |
virtual bool | EndOfStream () const =0 |
virtual void | Seek (int64_t aPosition)=0 |
virtual int64_t | Position ()=0 |
virtual int64_t | Length ()=0 |
virtual std::string | Name () |
The input stream interface. Streams that do not support random access always throw exceptions for Seek and may throw exceptions for Position and Length.
Exceptions that are not caused by lack or memory are of the type TResult. Common values are KErrorEndOfData and KErrorIo.
|
inlinevirtual |
Virtual destructor: strictly unneeded since pointers to MInputStream are not owned and should not be deleted.
|
pure virtual |
Return whether the end of the stream has been reached.
Implemented in CartoType::TMemoryInputStream, CartoType::CFileInputStream, and CartoType::CSimpleFileInputStream.
|
pure virtual |
Return the number of bytes in the stream.
Implemented in CartoType::TMemoryInputStream, CartoType::CFileInputStream, and CartoType::CSimpleFileInputStream.
|
inlinevirtual |
Return the file name or URI associated with the stream if any. Return the empty string is there is no file name or URI.
Reimplemented in CartoType::CFileInputStream, and CartoType::CSimpleFileInputStream.
|
pure virtual |
Return the current position.
Implemented in CartoType::TMemoryInputStream, CartoType::CFileInputStream, and CartoType::CSimpleFileInputStream.
|
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::TMemoryInputStream, CartoType::CFileInputStream, and CartoType::CSimpleFileInputStream.
|
pure virtual |
Seek to the specified position.
Implemented in CartoType::TMemoryInputStream, CartoType::CFileInputStream, and CartoType::CSimpleFileInputStream.