26#ifndef CASA_VAXCONVERSION_H
27#define CASA_VAXCONVERSION_H
30#include <casacore/casa/aips.h>
32#include <casacore/casa/OS/LittleEndianConversion.h>
39#define SIZE_VAX_CHAR 1
40#define SIZE_VAX_UCHAR 1
41#define SIZE_VAX_SHORT 2
42#define SIZE_VAX_USHORT 2
44#define SIZE_VAX_UINT 4
45#define SIZE_VAX_INT64 4
46#define SIZE_VAX_UINT64 4
47#define SIZE_VAX_FLOAT 4
48#define SIZE_VAX_DOUBLE 8
82 static void toLocal(
char& to,
const void* from);
83 static void toLocal(
unsigned char& to,
const void* from);
84 static void toLocal(
short& to,
const void* from);
85 static void toLocal(
unsigned short& to,
const void* from);
86 static void toLocal(
int& to,
const void* from);
87 static void toLocal(
unsigned int& to,
const void* from);
90 static void toLocal(
float& to,
const void* from);
91 static void toLocal(
double& to,
const void* from);
97 static void toLocal(
char* to,
const void* from,
size_t nr);
98 static void toLocal(
unsigned char* to,
const void* from,
size_t nr);
99 static void toLocal(
short* to,
const void* from,
size_t nr);
100 static void toLocal(
unsigned short* to,
const void* from,
size_t nr);
101 static void toLocal(
int* to,
const void* from,
size_t nr);
102 static void toLocal(
unsigned int* to,
const void* from,
size_t nr);
103 static void toLocal(
Int64* to,
const void* from,
size_t nr);
104 static void toLocal(
uInt64* to,
const void* from,
size_t nr);
105 static void toLocal(
float* to,
const void* from,
size_t nr);
106 static void toLocal(
double* to,
const void* from,
size_t nr);
112 static void fromLocal(
void* to,
char from);
113 static void fromLocal(
void* to,
unsigned char from);
114 static void fromLocal(
void* to,
short from);
115 static void fromLocal(
void* to,
unsigned short from);
116 static void fromLocal(
void* to,
int from);
117 static void fromLocal(
void* to,
unsigned int from);
120 static void fromLocal(
void* to,
float from);
121 static void fromLocal(
void* to,
double from);
127 static void fromLocal(
void* to,
const char* from,
size_t nr);
128 static void fromLocal(
void* to,
const unsigned char* from,
size_t nr);
129 static void fromLocal(
void* to,
const short* from,
size_t nr);
130 static void fromLocal(
void* to,
const unsigned short* from,
size_t nr);
131 static void fromLocal(
void* to,
const int* from,
size_t nr);
132 static void fromLocal(
void* to,
const unsigned int* from,
size_t nr);
135 static void fromLocal(
void* to,
const float* from,
size_t nr);
136 static void fromLocal(
void* to,
const double* from,
size_t nr);
140 static void moveFloat(
void* to,
const void* from);
285#if defined(AIPS_LITTLE_ENDIAN)
286 ((
char*)to)[0] = ((
const char*)from)[2];
287 ((
char*)to)[1] = ((
const char*)from)[3];
288 ((
char*)to)[2] = ((
const char*)from)[0];
289 ((
char*)to)[3] = ((
const char*)from)[1];
291 ((
char*)to)[0] = ((
const char*)from)[1];
292 ((
char*)to)[1] = ((
const char*)from)[0];
293 ((
char*)to)[2] = ((
const char*)from)[3];
294 ((
char*)to)[3] = ((
const char*)from)[2];
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.
static void toLocal(double *to, const void *from, size_t nr)
static void fromLocal(void *to, char from)
Convert one value from local format to VAX format.
static void fromLocal(void *to, const float *from, size_t nr)
static void moveFloat(void *to, const void *from)
Move a float value (by swapping bytes correctly).
static void toLocal(char &to, const void *from)
Convert one value from VAX format to local format.
static void fromLocal(void *to, const double *from, size_t nr)
static void toLocal(float *to, const void *from, size_t nr)
VAXConversion()
This class should not be constructed (so declare the constructor private).
For temporary backward namespace compatibility, use casa as alias for casacore.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size).
unsigned long long uInt64