CFx SDK Documentation 2024 SP0
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
OdPlatformStreamer Class Reference

#include <OdPlatformStreamer.h>

Static Public Member Functions

static OdInt16 rdInt16 (OdStreamBuf &streamBuf)
 
static OdUInt16 rdUInt16 (OdStreamBuf &streamBuf)
 
static OdInt32 rdInt32 (OdStreamBuf &streamBuf)
 
static OdInt64 rdInt64 (OdStreamBuf &streamBuf)
 
static float rdFloat (OdStreamBuf &streamBuf)
 
static double rdDouble (OdStreamBuf &streamBuf)
 
static void rd2Doubles (OdStreamBuf &streamBuf, void *doubles)
 
static void rd3Doubles (OdStreamBuf &streamBuf, void *doubles)
 
static void rdDoubles (OdStreamBuf &streamBuf, int numDoubles, void *doubles)
 
static void wrInt16 (OdStreamBuf &streamBuf, OdInt16 value)
 
static void wrUInt16 (OdStreamBuf &streamBuf, OdUInt16 value)
 
static void wrInt32 (OdStreamBuf &streamBuf, OdInt32 value)
 
static void wrInt64 (OdStreamBuf &streamBuf, OdInt64 value)
 
static void wrFloat (OdStreamBuf &out, float val)
 
static void wrDouble (OdStreamBuf &streamBuf, double value)
 
static void wr2Doubles (OdStreamBuf &streamBuf, const void *doubles)
 
static void wr3Doubles (OdStreamBuf &streamBuf, const void *doubles)
 
static void wrDoubles (OdStreamBuf &streamBuf, int numDoubles, const void *doubles)
 
static OdString getUnicodeStrFromBuffer (const OdUInt8 *&buffer, OdInt32 size)
 
static void putUnicodeStrToBuffer (const OdString &val, OdUInt8 *&buffer)
 
static void wrString (OdStreamBuf &streamBuf, const OdString &val)
 
static OdString rdString (OdStreamBuf &streamBuf)
 

Detailed Description

This class implements platform dependent stream I/O for various data types. <group Other_Classes>

Definition at line 36 of file OdPlatformStreamer.h.

Member Function Documentation

◆ getUnicodeStrFromBuffer()

OdString OdPlatformStreamer::getUnicodeStrFromBuffer ( const OdUInt8 *&  buffer,
OdInt32  size 
)
inlinestatic

Extracts a Unicode string from buffer, and returns it as an OdString.

Parameters
buffer[in/out] Buffer pointer to read the Unicode string from.
size[in] Length of the Unicode string in characters (assumes 2 byte characters in buffer stored in little endian format), or -1 if the string is null terminated.
Remarks
The buffer pointer is incremented to the next byte past the string that was read in. If size is > 0, size * 2 bytes will be read. If size is -1, a null terminated string will be read from buffer, including the null byte.

Definition at line 288 of file OdPlatformStreamer.h.

◆ putUnicodeStrToBuffer()

void OdPlatformStreamer::putUnicodeStrToBuffer ( const OdString val,
OdUInt8 *&  buffer 
)
inlinestatic

Writes a Unicode string to the passed in buffer, in little endian format, using 2 bytes per character. The trailing null character is NOT written.

Parameters
val[in] Unicode string to be written.
buffer[in] Char buffer to which will receive the Unicode data.
Remarks
The buffer pointer is incremented to the next byte past the string that was written.

Definition at line 331 of file OdPlatformStreamer.h.

◆ rd2Doubles()

void OdPlatformStreamer::rd2Doubles ( OdStreamBuf streamBuf,
void doubles 
)
inlinestatic

Reads two doubles from the specified StreamBuf object.

Parameters
streamBuf[in] StreamBuf object from which the data are to be read.
doubles[out] Array of doubles to receive the data.

Definition at line 233 of file OdPlatformStreamer.h.

◆ rd3Doubles()

void OdPlatformStreamer::rd3Doubles ( OdStreamBuf streamBuf,
void doubles 
)
inlinestatic

Reads three doubles from the specified StreamBuf object.

Parameters
streamBuf[in] StreamBuf object from which the data are to be read.
doubles[out] Array of doubles to receive the data.

Definition at line 240 of file OdPlatformStreamer.h.

◆ rdDouble()

double OdPlatformStreamer::rdDouble ( OdStreamBuf streamBuf)
inlinestatic

Reads a double from the specified StreamBuf object.

Parameters
streamBuf[in] StreamBuf object from which the data are to be read.

Definition at line 221 of file OdPlatformStreamer.h.

◆ rdDoubles()

void OdPlatformStreamer::rdDoubles ( OdStreamBuf streamBuf,
int  numDoubles,
void doubles 
)
inlinestatic

Reads the specified number of doubles from the specified StreamBuf object.

Parameters
streamBuf[in] StreamBuf object from which the data are to be read.
doubles[out] Array of doubles to receive the data.
numDoubles[in] Number of doubles.

Definition at line 248 of file OdPlatformStreamer.h.

◆ rdFloat()

float OdPlatformStreamer::rdFloat ( OdStreamBuf streamBuf)
inlinestatic

Reads a 32-bit floating point number from the specified StreamBuf object.

Parameters
streamBuf[in] StreamBuf object from which the data are to be read.

Definition at line 214 of file OdPlatformStreamer.h.

◆ rdInt16()

OdInt16 OdPlatformStreamer::rdInt16 ( OdStreamBuf streamBuf)
inlinestatic

Reads a 16-bit integer from the specified StreamBuf object.

Parameters
streamBuf[in] StreamBuf object from which the data are to be read.

Definition at line 186 of file OdPlatformStreamer.h.

◆ rdInt32()

OdInt32 OdPlatformStreamer::rdInt32 ( OdStreamBuf streamBuf)
inlinestatic

Reads a 32-bit integer from the specified StreamBuf object.

Parameters
streamBuf[in] StreamBuf object from which the data are to be read.

Definition at line 200 of file OdPlatformStreamer.h.

◆ rdInt64()

OdInt64 OdPlatformStreamer::rdInt64 ( OdStreamBuf streamBuf)
inlinestatic

Reads a 64-bit integer from the specified StreamBuf object.

Parameters
streamBuf[in] StreamBuf object from which the data are to be read.

Definition at line 207 of file OdPlatformStreamer.h.

◆ rdString()

OdString OdPlatformStreamer::rdString ( OdStreamBuf streamBuf)
inlinestatic

Inverse of wrString.

Definition at line 358 of file OdPlatformStreamer.h.

◆ rdUInt16()

OdUInt16 OdPlatformStreamer::rdUInt16 ( OdStreamBuf streamBuf)
inlinestatic

Reads a 16-bit unsigned integer from the specified StreamBuf object.

Parameters
streamBuf[in] StreamBuf object from which the data are to be read.

Definition at line 193 of file OdPlatformStreamer.h.

◆ wr2Doubles()

void OdPlatformStreamer::wr2Doubles ( OdStreamBuf streamBuf,
const void doubles 
)
inlinestatic

Writes two doubles to the specified StreamBuf object.

Parameters
streamBuf[out] StreamBuf object to which the data are to be written.
doubles[in] Array of doubles to be written.

Definition at line 407 of file OdPlatformStreamer.h.

◆ wr3Doubles()

void OdPlatformStreamer::wr3Doubles ( OdStreamBuf streamBuf,
const void doubles 
)
inlinestatic

Writes three doubles to the specified StreamBuf object.

Parameters
streamBuf[out] StreamBuf object to which the data are to be written.
doubles[in] Array of doubles to be written.

Definition at line 412 of file OdPlatformStreamer.h.

◆ wrDouble()

void OdPlatformStreamer::wrDouble ( OdStreamBuf streamBuf,
double  value 
)
inlinestatic

Writes a double to the specified StreamBuf object.

Parameters
streamBuf[out] StreamBuf object to which the data are to be written.
value[in] Value to be written.

Definition at line 281 of file OdPlatformStreamer.h.

◆ wrDoubles()

void OdPlatformStreamer::wrDoubles ( OdStreamBuf streamBuf,
int  numDoubles,
const void doubles 
)
inlinestatic

Writes the specified number of doubles to the specified StreamBuf object.

Parameters
streamBuf[out] StreamBuf object to which the data are to be written.
doubles[in] Array of doubles to be written.
numDoubles[in] Number of doubles.

Definition at line 417 of file OdPlatformStreamer.h.

◆ wrFloat()

void OdPlatformStreamer::wrFloat ( OdStreamBuf out,
float  val 
)
inlinestatic

Writes a 32-bit floating point number to the specified StreamBuf object.

Parameters
streamBuf[out] StreamBuf object to which the data are to be written.
value[in] Value to be written.

Definition at line 276 of file OdPlatformStreamer.h.

◆ wrInt16()

void OdPlatformStreamer::wrInt16 ( OdStreamBuf streamBuf,
OdInt16  value 
)
inlinestatic

Writes a 16-bit integer to the specified StreamBuf object.

Parameters
streamBuf[out] StreamBuf object to which the data are to be written.
value[in] Value to be written.

Definition at line 256 of file OdPlatformStreamer.h.

◆ wrInt32()

void OdPlatformStreamer::wrInt32 ( OdStreamBuf streamBuf,
OdInt32  value 
)
inlinestatic

Writes a 32-bit integer to the specified StreamBuf object.

Parameters
streamBuf[out] StreamBuf object to which the data are to be written.
value[in] Value to be written.

Definition at line 266 of file OdPlatformStreamer.h.

◆ wrInt64()

void OdPlatformStreamer::wrInt64 ( OdStreamBuf streamBuf,
OdInt64  value 
)
inlinestatic

Writes a 64-bit integer to the specified StreamBuf object.

Parameters
streamBuf[out] StreamBuf object to which the data are to be written.
value[in] Value to be written.

Definition at line 271 of file OdPlatformStreamer.h.

◆ wrString()

void OdPlatformStreamer::wrString ( OdStreamBuf streamBuf,
const OdString val 
)
inlinestatic

Same as putUnicodeStrToBuffer, but writes to a stream, prepending string length.

Definition at line 345 of file OdPlatformStreamer.h.

◆ wrUInt16()

void OdPlatformStreamer::wrUInt16 ( OdStreamBuf streamBuf,
OdUInt16  value 
)
inlinestatic

Writes a 16-bit unsigned integer to the specified StreamBuf object.

Parameters
streamBuf[out] StreamBuf object to which the data are to be written.
value[in] Value to be written.

Definition at line 261 of file OdPlatformStreamer.h.


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