CartoType C++ API 7.8.2, 2022-03-25
for Windows, Linux, Qt and other platforms supporting C++ development
Public Member Functions | List of all members
CartoType::MInputStream Class Referenceabstract

#include <cartotype_stream.h>

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

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 ()
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ ~MInputStream()

virtual CartoType::MInputStream::~MInputStream ( )
inlinevirtual

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

Member Function Documentation

◆ EndOfStream()

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

Return whether the end of the stream has been reached.

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

◆ Length()

virtual int64_t CartoType::MInputStream::Length ( )
pure virtual

Return the number of bytes in the stream.

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

◆ Name()

virtual std::string CartoType::MInputStream::Name ( )
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.

◆ Position()

virtual int64_t CartoType::MInputStream::Position ( )
pure virtual

◆ Read()

virtual void CartoType::MInputStream::Read ( const uint8_t *&  aPointer,
size_t &  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::TMemoryInputStream, CartoType::CFileInputStream, and CartoType::CSimpleFileInputStream.

◆ Seek()

virtual void CartoType::MInputStream::Seek ( int64_t  aPosition)
pure virtual

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