|
CartoType API
|
#include <cartotype_stream.h>
Classes | |
| class | CBuffer |
Public Member Functions | |
| CT_IMPORT TResult | Read (const uint8 *&aPointer, int32 &aLength) |
| CT_IMPORT bool | EndOfStream () const |
| CT_IMPORT TResult | Seek (int32 aPosition) |
| int32 | Position (TResult &aError) |
| CT_IMPORT int32 | Length (TResult &aError) |
| CT_IMPORT const MString * | Name () |
| void | ResetStatistics () |
| int32 | SeekCount () const |
| int32 | ReadCount () const |
Static Public Member Functions | |
| static CT_IMPORT CFileInputStream * | New (TResult &aError, const MString &aFilename, int32 aBufferSize=64 *1024) |
| static CT_IMPORT CFileInputStream * | New (TResult &aError, const char *aFilename, int32 aBufferSize=64 *1024) |
Protected Member Functions | |
| CFileInputStream (uint32 aBufferSize) | |
| TResult | Construct (const char *aFilename) |
Input stream for a file. The user of this stream determines the buffer size that is used to read from the file.
| TResult CFileInputStream::Construct | ( | const char * | aFileName | ) | [protected] |
Construct file stream data structures.
| CT_EXPORT bool CFileInputStream::EndOfStream | ( | ) | const [virtual] |
Return whether the end of the stream has been reached.
Implements CartoType::MInputStream.
| CT_EXPORT int32 CFileInputStream::Length | ( | TResult & | aError | ) | [virtual] |
Return the number of bytes in the stream.
Implements CartoType::MInputStream.
| CT_EXPORT const MString * CFileInputStream::Name | ( | ) | [virtual] |
Return the file name or URI associated with the stream if any.
Reimplemented from CartoType::MInputStream.
| int32 CartoType::CFileInputStream::Position | ( | TResult & | aError | ) | [inline, virtual] |
Return the current position.
Implements CartoType::MInputStream.
| CT_EXPORT TResult CFileInputStream::Read | ( | const uint8 *& | aPointer, |
| int32 & | aLength | ||
| ) | [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.
Implements CartoType::MInputStream.
| CT_EXPORT TResult CFileInputStream::Seek | ( | int32 | aPosition | ) | [virtual] |
Seek to the specified position.
Implements CartoType::MInputStream.
1.7.5.1