28 #ifndef CASA_IBMCONVERSION_H
29 #define CASA_IBMCONVERSION_H
40 #define SIZE_IBM_CHAR 1
41 #define SIZE_IBM_UCHAR 1
42 #define SIZE_IBM_SHORT 2
43 #define SIZE_IBM_USHORT 2
44 #define SIZE_IBM_INT 4
45 #define SIZE_IBM_UINT 4
46 #define SIZE_IBM_INT64 4
47 #define SIZE_IBM_UINT64 4
48 #define SIZE_IBM_FLOAT 4
49 #define SIZE_IBM_DOUBLE 8
90 static void toLocal (
char& to,
const void* from);
91 static void toLocal (
unsigned char& to,
const void* from);
92 static void toLocal (
short& to,
const void* from);
93 static void toLocal (
unsigned short& to,
const void* from);
94 static void toLocal (
int& to,
const void* from);
95 static void toLocal (
unsigned int& to,
const void* from);
98 static void toLocal (
float& to,
const void* from);
99 static void toLocal (
double& to,
const void* from);
109 static void toLocal (
char* to,
const void* from,
111 static void toLocal (
unsigned char* to,
const void* from,
113 static void toLocal (
short* to,
const void* from,
115 static void toLocal (
unsigned short* to,
const void* from,
117 static void toLocal (
int* to,
const void* from,
119 static void toLocal (
unsigned int* to,
const void* from,
125 static void toLocal (
float* to,
const void* from,
127 static void toLocal (
double* to,
const void* from,
138 static void fromLocal (
void* to,
char from);
139 static void fromLocal (
void* to,
unsigned char from);
140 static void fromLocal (
void* to,
short from);
141 static void fromLocal (
void* to,
unsigned short from);
142 static void fromLocal (
void* to,
int from);
143 static void fromLocal (
void* to,
unsigned int from);
146 static void fromLocal (
void* to,
float from);
147 static void fromLocal (
void* to,
double from);
157 static void fromLocal (
void* to,
const char* from,
159 static void fromLocal (
void* to,
const unsigned char* from,
161 static void fromLocal (
void* to,
const short* from,
163 static void fromLocal (
void* to,
const unsigned short* from,
165 static void fromLocal (
void* to,
const int* from,
167 static void fromLocal (
void* to,
const unsigned int* from,
173 static void fromLocal (
void* to,
const float* from,
175 static void fromLocal (
void* to,
const double* from,
214 if (
sizeof(
Int64) != 4) {
215 if (((
signed char*)from)[0] < 0) {
221 #if defined(AIPS_LITTLE_ENDIAN)
230 if (
sizeof(
uInt64) != 4) {
233 #if defined(AIPS_LITTLE_ENDIAN)
308 #if defined(AIPS_LITTLE_ENDIAN)
317 #if defined(AIPS_LITTLE_ENDIAN)
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
unsigned long long uInt64
static void move4(void *to, const void *from)
Move 4 bytes.
IBMConversion()
This class should not be constructed (so declare the constructor private).
static void toLocal(char &to, const void *from)
Convert one value from IBM format to local format.
static void reverse4(void *to, const void *from)
Reverse 4 bytes.
static void fromLocal(void *to, char from)
Convert one value from local format to IBM format.
static size_t toLocal(char &to, const void *from)
Convert one value from canonical format to local format.
static size_t fromLocal(void *to, const char &from)
Convert one value from local format to canonical format.
A class with static functions to convert IBM format.
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.