version 3.3

VRS::MemoryUtil Class Reference

Utility class for accessing raw memory data. More...

#include <vrs/io/memoryutil.h>

List of all members.

Public Types

enum  Endianess { LE, BE, LittleEndian = LE, BigEndian = BE }

Static Public Member Functions

static char getInt8 (MemoryUtil::Endianess endian, const void *data, unsigned int byteOffset=0)
static char getInt8LE (const void *data, unsigned int byteOffset=0)
static char getInt8BE (const void *data, unsigned int byteOffset=0)
static unsigned char getUInt8 (MemoryUtil::Endianess endian, const void *data, unsigned int byteOffset=0)
static unsigned char getUInt8LE (const void *data, unsigned int byteOffset=0)
static unsigned char getUInt8BE (const void *data, unsigned int byteOffset=0)
static short getInt16 (MemoryUtil::Endianess endian, const void *data, unsigned int byteOffset=0)
static short getInt16LE (const void *data, unsigned int byteOffset=0)
static short getInt16BE (const void *data, unsigned int byteOffset=0)
static unsigned short getUInt16 (MemoryUtil::Endianess endian, const void *data, unsigned int byteOffset=0)
static unsigned short getUInt16LE (const void *data, unsigned int byteOffset=0)
static unsigned short getUInt16BE (const void *data, unsigned int byteOffset=0)
static int getInt32 (MemoryUtil::Endianess endian, const void *data, unsigned int byteOffset=0)
static int getInt32LE (const void *data, unsigned int byteOffset=0)
static int getInt32BE (const void *data, unsigned int byteOffset=0)
static unsigned int getUInt32 (MemoryUtil::Endianess endian, const void *data, unsigned int byteOffset=0)
static unsigned int getUInt32LE (const void *data, unsigned int byteOffset=0)
static unsigned int getUInt32BE (const void *data, unsigned int byteOffset=0)
static float getFloat32 (MemoryUtil::Endianess endian, const void *data, unsigned int byteOffset=0)
static float getFloat32LE (const void *data, unsigned int byteOffset=0)
static float getFloat32BE (const void *data, unsigned int byteOffset=0)
static double getFloat64 (MemoryUtil::Endianess endian, const void *data, unsigned int byteOffset=0)
static double getFloat64LE (const void *data, unsigned int byteOffset=0)
static double getFloat64BE (const void *data, unsigned int byteOffset=0)
template<typename T>
static void getValue (MemoryUtil::Endianess endian, T &value, const void *data, unsigned int byteOffset=0)
template<typename T>
static void getValueLE (T &value, const void *data, unsigned int byteOffset=0)
template<typename T>
static void getValueBE (T &value, const void *data, unsigned int byteOffset=0)
static void putInt8 (MemoryUtil::Endianess endian, char value, void *data, unsigned int byteOffset=0)
static void putInt8LE (char value, void *data, unsigned int byteOffset=0)
static void putInt8BE (char value, void *data, unsigned int byteOffset=0)
static void putUInt8 (MemoryUtil::Endianess endian, unsigned char value, void *data, unsigned int byteOffset=0)
static void putUInt8LE (unsigned char value, void *data, unsigned int byteOffset=0)
static void putUInt8BE (unsigned char value, void *data, unsigned int byteOffset=0)
static void putInt16 (MemoryUtil::Endianess endian, short value, void *data, unsigned int byteOffset=0)
static void putInt16LE (short value, void *data, unsigned int byteOffset=0)
static void putInt16BE (short value, void *data, unsigned int byteOffset=0)
static void putUInt16 (MemoryUtil::Endianess endian, unsigned short value, void *data, unsigned int byteOffset=0)
static void putUInt16LE (unsigned short value, void *data, unsigned int byteOffset=0)
static void putUInt16BE (unsigned short value, void *data, unsigned int byteOffset=0)
static void putInt32 (MemoryUtil::Endianess endian, int value, void *data, unsigned int byteOffset=0)
static void putInt32LE (int value, void *data, unsigned int byteOffset=0)
static void putInt32BE (int value, void *data, unsigned int byteOffset=0)
static void putUInt32 (MemoryUtil::Endianess endian, unsigned int value, void *data, unsigned int byteOffset=0)
static void putUInt32LE (unsigned int value, void *data, unsigned int byteOffset=0)
static void putUInt32BE (unsigned int value, void *data, unsigned int byteOffset=0)
static void putFloat32 (MemoryUtil::Endianess endian, float value, void *data, unsigned int byteOffset=0)
static void putFloat32LE (float value, void *data, unsigned int byteOffset=0)
static void putFloat32BE (float value, void *data, unsigned int byteOffset=0)
static void putFloat64 (MemoryUtil::Endianess endian, double value, void *data, unsigned int byteOffset=0)
static void putFloat64LE (double value, void *data, unsigned int byteOffset=0)
static void putFloat64BE (double value, void *data, unsigned int byteOffset=0)
template<typename T>
static void putValue (MemoryUtil::Endianess endian, T value, void *data, unsigned int byteOffset=0)
template<typename T>
static void putValueLE (T value, void *data, unsigned int byteOffset=0)
template<typename T>
static void putValueBE (T value, void *data, unsigned int byteOffset=0)


Detailed Description

Utility class for accessing raw memory data.

Member Enumeration Documentation

Enumerator:
LE 
BE 
LittleEndian 
BigEndian 


Member Function Documentation

static char VRS::MemoryUtil::getInt8 ( MemoryUtil::Endianess  endian,
const void *  data,
unsigned int  byteOffset = 0 
) [static]

static char VRS::MemoryUtil::getInt8LE ( const void *  data,
unsigned int  byteOffset = 0 
) [static]

static char VRS::MemoryUtil::getInt8BE ( const void *  data,
unsigned int  byteOffset = 0 
) [static]

Reads a byte at the given data location and the corresponding byteOffset with the given endianess.

static unsigned char VRS::MemoryUtil::getUInt8 ( MemoryUtil::Endianess  endian,
const void *  data,
unsigned int  byteOffset = 0 
) [static]

static unsigned char VRS::MemoryUtil::getUInt8LE ( const void *  data,
unsigned int  byteOffset = 0 
) [static]

static unsigned char VRS::MemoryUtil::getUInt8BE ( const void *  data,
unsigned int  byteOffset = 0 
) [static]

Reads an unsigned byte at the given data location and the corresponding byteOffset with the given endianess.

static short VRS::MemoryUtil::getInt16 ( MemoryUtil::Endianess  endian,
const void *  data,
unsigned int  byteOffset = 0 
) [static]

static short VRS::MemoryUtil::getInt16LE ( const void *  data,
unsigned int  byteOffset = 0 
) [static]

static short VRS::MemoryUtil::getInt16BE ( const void *  data,
unsigned int  byteOffset = 0 
) [static]

Reads a short at the given data location and the corresponding byteOffset with the given endianess.

static unsigned short VRS::MemoryUtil::getUInt16 ( MemoryUtil::Endianess  endian,
const void *  data,
unsigned int  byteOffset = 0 
) [static]

static unsigned short VRS::MemoryUtil::getUInt16LE ( const void *  data,
unsigned int  byteOffset = 0 
) [static]

static unsigned short VRS::MemoryUtil::getUInt16BE ( const void *  data,
unsigned int  byteOffset = 0 
) [static]

Reads an unsigned short at the given data location and the corresponding byteOffset with the given endianess.

static int VRS::MemoryUtil::getInt32 ( MemoryUtil::Endianess  endian,
const void *  data,
unsigned int  byteOffset = 0 
) [static]

static int VRS::MemoryUtil::getInt32LE ( const void *  data,
unsigned int  byteOffset = 0 
) [static]

static int VRS::MemoryUtil::getInt32BE ( const void *  data,
unsigned int  byteOffset = 0 
) [static]

Reads an int at the given data location and the corresponding byteOffset with the given endianess.

static unsigned int VRS::MemoryUtil::getUInt32 ( MemoryUtil::Endianess  endian,
const void *  data,
unsigned int  byteOffset = 0 
) [static]

static unsigned int VRS::MemoryUtil::getUInt32LE ( const void *  data,
unsigned int  byteOffset = 0 
) [static]

static unsigned int VRS::MemoryUtil::getUInt32BE ( const void *  data,
unsigned int  byteOffset = 0 
) [static]

Reads an unsigned int at the given data location and the corresponding byteOffset with the given endianess.

static float VRS::MemoryUtil::getFloat32 ( MemoryUtil::Endianess  endian,
const void *  data,
unsigned int  byteOffset = 0 
) [static]

static float VRS::MemoryUtil::getFloat32LE ( const void *  data,
unsigned int  byteOffset = 0 
) [static]

static float VRS::MemoryUtil::getFloat32BE ( const void *  data,
unsigned int  byteOffset = 0 
) [static]

Reads a float at the given data location and the corresponding byteOffset with the given endianess.

static double VRS::MemoryUtil::getFloat64 ( MemoryUtil::Endianess  endian,
const void *  data,
unsigned int  byteOffset = 0 
) [static]

static double VRS::MemoryUtil::getFloat64LE ( const void *  data,
unsigned int  byteOffset = 0 
) [static]

static double VRS::MemoryUtil::getFloat64BE ( const void *  data,
unsigned int  byteOffset = 0 
) [static]

Reads a double at the given data location and the corresponding byteOffset with the given endianess.

template<typename T>
static void VRS::MemoryUtil::getValue ( MemoryUtil::Endianess  endian,
T &  value,
const void *  data,
unsigned int  byteOffset = 0 
) [inline, static]

template<typename T>
static void VRS::MemoryUtil::getValueLE ( T &  value,
const void *  data,
unsigned int  byteOffset = 0 
) [inline, static]

template<typename T>
static void VRS::MemoryUtil::getValueBE ( T &  value,
const void *  data,
unsigned int  byteOffset = 0 
) [inline, static]

Reads a value of the given template type at the given data location and the corresponding byteOffset with the given endianess.

static void VRS::MemoryUtil::putInt8 ( MemoryUtil::Endianess  endian,
char  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

static void VRS::MemoryUtil::putInt8LE ( char  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

static void VRS::MemoryUtil::putInt8BE ( char  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

Writes the given byte to the given data location and the corresponding byteOffset with the given endianess.

static void VRS::MemoryUtil::putUInt8 ( MemoryUtil::Endianess  endian,
unsigned char  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

static void VRS::MemoryUtil::putUInt8LE ( unsigned char  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

static void VRS::MemoryUtil::putUInt8BE ( unsigned char  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

Writes the given unsigned byte to the given data location and the corresponding byteOffset with the given endianess.

static void VRS::MemoryUtil::putInt16 ( MemoryUtil::Endianess  endian,
short  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

static void VRS::MemoryUtil::putInt16LE ( short  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

static void VRS::MemoryUtil::putInt16BE ( short  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

Writes the given short to the given data location and the corresponding byteOffset with the given endianess.

static void VRS::MemoryUtil::putUInt16 ( MemoryUtil::Endianess  endian,
unsigned short  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

static void VRS::MemoryUtil::putUInt16LE ( unsigned short  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

static void VRS::MemoryUtil::putUInt16BE ( unsigned short  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

Writes the given unsigned short to the given data location and the corresponding byteOffset with the given endianess.

static void VRS::MemoryUtil::putInt32 ( MemoryUtil::Endianess  endian,
int  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

static void VRS::MemoryUtil::putInt32LE ( int  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

static void VRS::MemoryUtil::putInt32BE ( int  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

Writes the given int to the given data location and the corresponding byteOffset with the given endianess.

static void VRS::MemoryUtil::putUInt32 ( MemoryUtil::Endianess  endian,
unsigned int  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

static void VRS::MemoryUtil::putUInt32LE ( unsigned int  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

static void VRS::MemoryUtil::putUInt32BE ( unsigned int  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

Writes the given unsigned int to the given data location and the corresponding byteOffset with the given endianess.

static void VRS::MemoryUtil::putFloat32 ( MemoryUtil::Endianess  endian,
float  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

static void VRS::MemoryUtil::putFloat32LE ( float  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

static void VRS::MemoryUtil::putFloat32BE ( float  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

Writes the given float to the given data location and the corresponding byteOffset with the given endianess.

static void VRS::MemoryUtil::putFloat64 ( MemoryUtil::Endianess  endian,
double  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

static void VRS::MemoryUtil::putFloat64LE ( double  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

static void VRS::MemoryUtil::putFloat64BE ( double  value,
void *  data,
unsigned int  byteOffset = 0 
) [static]

Writes the given double to the given data location and the corresponding byteOffset with the given endianess.

template<typename T>
static void VRS::MemoryUtil::putValue ( MemoryUtil::Endianess  endian,
value,
void *  data,
unsigned int  byteOffset = 0 
) [inline, static]

template<typename T>
static void VRS::MemoryUtil::putValueLE ( value,
void *  data,
unsigned int  byteOffset = 0 
) [inline, static]

template<typename T>
static void VRS::MemoryUtil::putValueBE ( value,
void *  data,
unsigned int  byteOffset = 0 
) [inline, static]

Writes the given value to the given data location and the corresponding byteOffset with the given endianess.


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

Generated on Tue May 22 06:00:22 2012 by Doxygen 1.5.6
© 2001-2010 Hasso-Plattner-Institut | Impressum | Contact