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

#include <cartotype_stream.h>

Inheritance diagram for CartoType::TDataOutputStream:

Public Member Functions

 TDataOutputStream (MOutputStream &aOutputStream)
void WriteUint8 (uint8_t aValue)
void WriteUint16 (uint16_t aValue)
void WriteUint32 (uint32_t aValue)
void WriteUint (uint32_t aValue, int32_t aSize)
void WriteUint (uint64_t aValue)
void WriteInt (int64_t aValue)
void WriteFloat (float aValue)
void WriteDouble (double aValue)
void WriteNullTerminatedString (const MString &aString)
void WriteUtf8StringWithLength (const MString &aString)
void WriteBytes (const uint8_t *aBuffer, size_t aBytes)
void WriteNullTerminatedUtf8String (const MString &aString)
void WriteNullTerminatedUtf16String (const MString &aString)
void WriteString (const MString &aString)
void WriteXmlText (const MString &aString)
void WriteString (const char *aString)
- Public Member Functions inherited from CartoType::TDataStream
TStreamEncoding Encoding () const
void SetEncoding (TStreamEncoding aEncoding)
TStreamEndianness Endianness () const
void SetEndianness (TStreamEndianness aEndianness)

Additional Inherited Members

- Protected Attributes inherited from CartoType::TDataStream
TStreamEncoding iEncoding
TStreamEndianness iEndianness

Detailed Description

A data output stream. It writes integers, strings and blocks of data to a data sink provided by a class derived from MOutputStream.

Constructor & Destructor Documentation

◆ TDataOutputStream()

CartoType::TDataOutputStream::TDataOutputStream ( MOutputStream aOutputStream)

Creates a data output stream to write to aOutputStream.

Member Function Documentation

◆ WriteBytes()

void CartoType::TDataOutputStream::WriteBytes ( const uint8_t *  aBuffer,
size_t  aBytes 

Writes a number of bytes from a buffer.

◆ WriteDouble()

void CartoType::TDataOutputStream::WriteDouble ( double  aValue)

Writes a double-precision float as a 64-bit value.

◆ WriteFloat()

void CartoType::TDataOutputStream::WriteFloat ( float  aValue)

Writes a single-precision float as a 32-bit value.

◆ WriteInt()

void CartoType::TDataOutputStream::WriteInt ( int64_t  aValue)

Writes a signed integer of a size determined by the value.

◆ WriteNullTerminatedString()

void CartoType::TDataOutputStream::WriteNullTerminatedString ( const MString aString)

Writes a null terminated string according to the current encoding and endianness.

◆ WriteNullTerminatedUtf16String()

void CartoType::TDataOutputStream::WriteNullTerminatedUtf16String ( const MString aString)

Writes a null terminated string in UTF-16.

◆ WriteNullTerminatedUtf8String()

void CartoType::TDataOutputStream::WriteNullTerminatedUtf8String ( const MString aString)

Writes a null terminated string in UTF-8.

◆ WriteString() [1/2]

void CartoType::TDataOutputStream::WriteString ( const char *  aString)

Writes a null-terminated 8-bit string.

◆ WriteString() [2/2]

void CartoType::TDataOutputStream::WriteString ( const MString aString)

Writes a string to the stream, converting aString from UTF-16 to UTF-8 then writing the resulting bytes.

◆ WriteUint() [1/2]

void CartoType::TDataOutputStream::WriteUint ( uint32_t  aValue,
int32_t  aSize 

Write an integer of size aSize. aSize must be 1, 2 or 4.

◆ WriteUint() [2/2]

void CartoType::TDataOutputStream::WriteUint ( uint64_t  aValue)

Writes an unsigned integer of a size determined by the value.

◆ WriteUint16()

void CartoType::TDataOutputStream::WriteUint16 ( uint16_t  aValue)

Write a 2 byte integer.

◆ WriteUint32()

void CartoType::TDataOutputStream::WriteUint32 ( uint32_t  aValue)

Write a 4 byte integer.

◆ WriteUint8()

void CartoType::TDataOutputStream::WriteUint8 ( uint8_t  aValue)

Writes a single byte integer.

◆ WriteUtf8StringWithLength()

void CartoType::TDataOutputStream::WriteUtf8StringWithLength ( const MString aString)

Write a UTF-8 string preceded by its length as a variable-length unsigned integer.

◆ WriteXmlText()

void CartoType::TDataOutputStream::WriteXmlText ( const MString aString)

Writes a string, converting single and double quotes, less than and greater than, and ampersand, into XML entity references.

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