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::CMemoryOutputStream Class Reference

#include <cartotype_stream.h>

Inheritance diagram for CartoType::CMemoryOutputStream:

Public Member Functions

 CMemoryOutputStream (size_t aInitialBufferSize=0)
void Write (const uint8_t *aBuffer, size_t aBytes) override
const uint8_t * Data () const
std::vector< uint8_t > RemoveData ()
size_t Length () const
- Public Member Functions inherited from CartoType::MOutputStream
virtual ~MOutputStream ()
virtual void Write (const uint8_t *aBuffer, size_t aBytes)=0
void WriteString (const char *aString)
void WriteString (const MString &aString)
void WriteXmlText (const MString &aString)

Detailed Description

Output stream for a buffer in memory. The caller specifies the initial size of the buffer, which is automatically enlarged when necessary.

Constructor & Destructor Documentation

◆ CMemoryOutputStream()

CartoType::CMemoryOutputStream::CMemoryOutputStream ( size_t  aInitialBufferSize = 0)

Creates a CMemoryOutputStream object to write to a buffer owned by it, optionally specifying an initial buffer size in bytes.

Member Function Documentation

◆ Data()

const uint8_t * CartoType::CMemoryOutputStream::Data ( ) const

Return a pointer to the memory buffer.

◆ Length()

size_t CartoType::CMemoryOutputStream::Length ( ) const

Return the number of bytes written.

◆ RemoveData()

std::vector< uint8_t > CartoType::CMemoryOutputStream::RemoveData ( )

Take ownership of the data.

◆ Write()

void CartoType::CMemoryOutputStream::Write ( const uint8_t *  aBuffer,
size_t  aBytes 

Writes aBytes bytes from aBuffer to the stream.

Implements CartoType::MOutputStream.

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