28 #ifndef CASA_VAXCONVERSION_H
29 #define CASA_VAXCONVERSION_H
42 #define SIZE_VAX_CHAR 1
43 #define SIZE_VAX_UCHAR 1
44 #define SIZE_VAX_SHORT 2
45 #define SIZE_VAX_USHORT 2
46 #define SIZE_VAX_INT 4
47 #define SIZE_VAX_UINT 4
48 #define SIZE_VAX_INT64 4
49 #define SIZE_VAX_UINT64 4
50 #define SIZE_VAX_FLOAT 4
51 #define SIZE_VAX_DOUBLE 8
88 static void toLocal (
char& to,
const void* from);
89 static void toLocal (
unsigned char& to,
const void* from);
90 static void toLocal (
short& to,
const void* from);
91 static void toLocal (
unsigned short& to,
const void* from);
92 static void toLocal (
int& to,
const void* from);
93 static void toLocal (
unsigned int& to,
const void* from);
96 static void toLocal (
float& to,
const void* from);
97 static void toLocal (
double& to,
const void* from);
103 static void toLocal (
char* to,
const void* from,
105 static void toLocal (
unsigned char* to,
const void* from,
107 static void toLocal (
short* to,
const void* from,
109 static void toLocal (
unsigned short* to,
const void* from,
111 static void toLocal (
int* to,
const void* from,
113 static void toLocal (
unsigned int* to,
const void* from,
119 static void toLocal (
float* to,
const void* from,
121 static void toLocal (
double* to,
const void* from,
128 static void fromLocal (
void* to,
char from);
129 static void fromLocal (
void* to,
unsigned char from);
130 static void fromLocal (
void* to,
short from);
131 static void fromLocal (
void* to,
unsigned short from);
132 static void fromLocal (
void* to,
int from);
133 static void fromLocal (
void* to,
unsigned int from);
136 static void fromLocal (
void* to,
float from);
137 static void fromLocal (
void* to,
double from);
143 static void fromLocal (
void* to,
const char* from,
145 static void fromLocal (
void* to,
const unsigned char* from,
147 static void fromLocal (
void* to,
const short* from,
149 static void fromLocal (
void* to,
const unsigned short* from,
151 static void fromLocal (
void* to,
const int* from,
153 static void fromLocal (
void* to,
const unsigned int* from,
159 static void fromLocal (
void* to,
const float* from,
161 static void fromLocal (
void* to,
const double* from,
166 static void moveFloat (
void* to,
const void* from);
377 #if defined(AIPS_LITTLE_ENDIAN)
378 ((
char*)to)[0] = ((
const char*)from)[2];
379 ((
char*)to)[1] = ((
const char*)from)[3];
380 ((
char*)to)[2] = ((
const char*)from)[0];
381 ((
char*)to)[3] = ((
const char*)from)[1];
383 ((
char*)to)[0] = ((
const char*)from)[1];
384 ((
char*)to)[1] = ((
const char*)from)[0];
385 ((
char*)to)[2] = ((
const char*)from)[3];
386 ((
char*)to)[3] = ((
const char*)from)[2];
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
VAXConversion()
This class should not be constructed (so declare the constructor private).
unsigned long long uInt64
static void toLocal(char &to, const void *from)
Convert one value from VAX format to local format.
static void toLocal(char &to, const void *from)
Convert one value from littleEndian format to local format.
static void fromLocal(void *to, char from)
Convert one value from local format to littleEndian format.
A class with static functions to convert VAX format.
static void fromLocal(void *to, char from)
Convert one value from local format to VAX format.
static void moveFloat(void *to, const void *from)
Move a float value (by swapping bytes correctly).