casa
$Rev:20696$
|
A class with static functions to convert littleEndian format. More...
#include <LittleEndianConversion.h>
Static Public Member Functions | |
static void | toLocal (char &to, const void *from) |
Convert one value from littleEndian format to local format. | |
static void | toLocal (unsigned char &to, const void *from) |
static void | toLocal (short &to, const void *from) |
static void | toLocal (unsigned short &to, const void *from) |
static void | toLocal (int &to, const void *from) |
static void | toLocal (unsigned int &to, const void *from) |
static void | toLocal (Int64 &to, const void *from) |
static void | toLocal (uInt64 &to, const void *from) |
static void | toLocal (float &to, const void *from) |
static void | toLocal (double &to, const void *from) |
static void | toLocal (char *to, const void *from, unsigned int nr) |
Convert nr values from littleEndian format to local format. | |
static void | toLocal (unsigned char *to, const void *from, unsigned int nr) |
static void | toLocal (short *to, const void *from, unsigned int nr) |
static void | toLocal (unsigned short *to, const void *from, unsigned int nr) |
static void | toLocal (int *to, const void *from, unsigned int nr) |
static void | toLocal (unsigned int *to, const void *from, unsigned int nr) |
static void | toLocal (Int64 *to, const void *from, unsigned int nr) |
static void | toLocal (uInt64 *to, const void *from, unsigned int nr) |
static void | toLocal (float *to, const void *from, unsigned int nr) |
static void | toLocal (double *to, const void *from, unsigned int nr) |
static void | fromLocal (void *to, char from) |
Convert one value from local format to littleEndian format. | |
static void | fromLocal (void *to, unsigned char from) |
static void | fromLocal (void *to, short from) |
static void | fromLocal (void *to, unsigned short from) |
static void | fromLocal (void *to, int from) |
static void | fromLocal (void *to, unsigned int from) |
static void | fromLocal (void *to, Int64 from) |
static void | fromLocal (void *to, uInt64 from) |
static void | fromLocal (void *to, float from) |
static void | fromLocal (void *to, double from) |
static void | fromLocal (void *to, const char *from, unsigned int nr) |
Convert nr values from local format to littleEndian format. | |
static void | fromLocal (void *to, const unsigned char *from, unsigned int nr) |
static void | fromLocal (void *to, const short *from, unsigned int nr) |
static void | fromLocal (void *to, const unsigned short *from, unsigned int nr) |
static void | fromLocal (void *to, const int *from, unsigned int nr) |
static void | fromLocal (void *to, const unsigned int *from, unsigned int nr) |
static void | fromLocal (void *to, const Int64 *from, unsigned int nr) |
static void | fromLocal (void *to, const uInt64 *from, unsigned int nr) |
static void | fromLocal (void *to, const float *from, unsigned int nr) |
static void | fromLocal (void *to, const double *from, unsigned int nr) |
Private Member Functions | |
LittleEndianConversion () | |
A class with static functions to convert littleEndian format.
Public interface
This class is intended to be used as a common class for all classes converting data to/from little-endian format.
Sometimes data are stored in little-endian format (e.g. old VAX-data). Instead of putting all these conversion functions in all such classes, it is better to keep them separate to be able to use them elsewhere. However, note that this version handles a long as 4 bytes. On several little-endian machines (e.g. DEC-alpha) a long is 8 bytes, so a special function is needed for them.
Definition at line 67 of file LittleEndianConversion.h.
casa::LittleEndianConversion::LittleEndianConversion | ( | ) | [private] |
This class should not be constructed (so declare the constructor private).
void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
char | from | ||
) | [inline, static] |
Convert one value from local format to littleEndian format.
The from and to buffer should not overlap.
Definition at line 261 of file LittleEndianConversion.h.
void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
unsigned char | from | ||
) | [inline, static] |
Definition at line 265 of file LittleEndianConversion.h.
void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
short | from | ||
) | [inline, static] |
Definition at line 270 of file LittleEndianConversion.h.
References casa::CanonicalConversion::move2(), and casa::CanonicalConversion::reverse2().
void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
unsigned short | from | ||
) | [inline, static] |
Definition at line 279 of file LittleEndianConversion.h.
References casa::CanonicalConversion::move2(), and casa::CanonicalConversion::reverse2().
void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
int | from | ||
) | [inline, static] |
Definition at line 288 of file LittleEndianConversion.h.
References casa::CanonicalConversion::move4(), and casa::CanonicalConversion::reverse4().
void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
unsigned int | from | ||
) | [inline, static] |
Definition at line 297 of file LittleEndianConversion.h.
References casa::CanonicalConversion::move4(), and casa::CanonicalConversion::reverse4().
void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
Int64 | from | ||
) | [inline, static] |
Definition at line 306 of file LittleEndianConversion.h.
References casa::CanonicalConversion::move4(), and casa::CanonicalConversion::reverse4().
void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
uInt64 | from | ||
) | [inline, static] |
Definition at line 315 of file LittleEndianConversion.h.
References casa::CanonicalConversion::move4(), and casa::CanonicalConversion::reverse4().
void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
float | from | ||
) | [inline, static] |
Definition at line 324 of file LittleEndianConversion.h.
References casa::CanonicalConversion::move4(), and casa::CanonicalConversion::reverse4().
void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
double | from | ||
) | [inline, static] |
Definition at line 333 of file LittleEndianConversion.h.
References casa::CanonicalConversion::move8(), and casa::CanonicalConversion::reverse8().
static void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
const char * | from, | ||
unsigned int | nr | ||
) | [static] |
Convert nr values from local format to littleEndian format.
The from and to buffer should not overlap.
static void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
const unsigned char * | from, | ||
unsigned int | nr | ||
) | [static] |
static void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
const short * | from, | ||
unsigned int | nr | ||
) | [static] |
static void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
const unsigned short * | from, | ||
unsigned int | nr | ||
) | [static] |
static void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
const int * | from, | ||
unsigned int | nr | ||
) | [static] |
static void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
const unsigned int * | from, | ||
unsigned int | nr | ||
) | [static] |
static void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
const Int64 * | from, | ||
unsigned int | nr | ||
) | [static] |
static void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
const uInt64 * | from, | ||
unsigned int | nr | ||
) | [static] |
static void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
const float * | from, | ||
unsigned int | nr | ||
) | [static] |
static void casa::LittleEndianConversion::fromLocal | ( | void * | to, |
const double * | from, | ||
unsigned int | nr | ||
) | [static] |
void casa::LittleEndianConversion::toLocal | ( | char & | to, |
const void * | from | ||
) | [inline, static] |
Convert one value from littleEndian format to local format.
The from and to buffer should not overlap.
Definition at line 158 of file LittleEndianConversion.h.
Referenced by toLocal().
void casa::LittleEndianConversion::toLocal | ( | unsigned char & | to, |
const void * | from | ||
) | [inline, static] |
Definition at line 163 of file LittleEndianConversion.h.
void casa::LittleEndianConversion::toLocal | ( | short & | to, |
const void * | from | ||
) | [inline, static] |
Definition at line 169 of file LittleEndianConversion.h.
References casa::CanonicalConversion::move2(), and casa::CanonicalConversion::reverse2().
void casa::LittleEndianConversion::toLocal | ( | unsigned short & | to, |
const void * | from | ||
) | [inline, static] |
Definition at line 185 of file LittleEndianConversion.h.
References casa::CanonicalConversion::move2(), and casa::CanonicalConversion::reverse2().
void casa::LittleEndianConversion::toLocal | ( | int & | to, |
const void * | from | ||
) | [inline, static] |
Definition at line 198 of file LittleEndianConversion.h.
References casa::CanonicalConversion::move4(), and casa::CanonicalConversion::reverse4().
void casa::LittleEndianConversion::toLocal | ( | unsigned int & | to, |
const void * | from | ||
) | [inline, static] |
Definition at line 214 of file LittleEndianConversion.h.
References casa::CanonicalConversion::move4(), and casa::CanonicalConversion::reverse4().
void casa::LittleEndianConversion::toLocal | ( | Int64 & | to, |
const void * | from | ||
) | [inline, static] |
Definition at line 227 of file LittleEndianConversion.h.
References toLocal().
void casa::LittleEndianConversion::toLocal | ( | uInt64 & | to, |
const void * | from | ||
) | [inline, static] |
Definition at line 234 of file LittleEndianConversion.h.
References toLocal().
void casa::LittleEndianConversion::toLocal | ( | float & | to, |
const void * | from | ||
) | [inline, static] |
Definition at line 242 of file LittleEndianConversion.h.
References casa::CanonicalConversion::move4(), and casa::CanonicalConversion::reverse4().
void casa::LittleEndianConversion::toLocal | ( | double & | to, |
const void * | from | ||
) | [inline, static] |
Definition at line 251 of file LittleEndianConversion.h.
References casa::CanonicalConversion::move8(), and casa::CanonicalConversion::reverse8().
static void casa::LittleEndianConversion::toLocal | ( | char * | to, |
const void * | from, | ||
unsigned int | nr | ||
) | [static] |
Convert nr values from littleEndian format to local format.
The from and to buffer should not overlap.
static void casa::LittleEndianConversion::toLocal | ( | unsigned char * | to, |
const void * | from, | ||
unsigned int | nr | ||
) | [static] |
static void casa::LittleEndianConversion::toLocal | ( | short * | to, |
const void * | from, | ||
unsigned int | nr | ||
) | [static] |
static void casa::LittleEndianConversion::toLocal | ( | unsigned short * | to, |
const void * | from, | ||
unsigned int | nr | ||
) | [static] |
static void casa::LittleEndianConversion::toLocal | ( | int * | to, |
const void * | from, | ||
unsigned int | nr | ||
) | [static] |
static void casa::LittleEndianConversion::toLocal | ( | unsigned int * | to, |
const void * | from, | ||
unsigned int | nr | ||
) | [static] |
static void casa::LittleEndianConversion::toLocal | ( | Int64 * | to, |
const void * | from, | ||
unsigned int | nr | ||
) | [static] |
static void casa::LittleEndianConversion::toLocal | ( | uInt64 * | to, |
const void * | from, | ||
unsigned int | nr | ||
) | [static] |
static void casa::LittleEndianConversion::toLocal | ( | float * | to, |
const void * | from, | ||
unsigned int | nr | ||
) | [static] |
static void casa::LittleEndianConversion::toLocal | ( | double * | to, |
const void * | from, | ||
unsigned int | nr | ||
) | [static] |