26#ifndef CASA_VAXCONVERSION_H
27#define CASA_VAXCONVERSION_H
30#include <casacore/casa/aips.h>
32#include <casacore/casa/OS/LittleEndianConversion.h>
40#define SIZE_VAX_CHAR 1
41#define SIZE_VAX_UCHAR 1
42#define SIZE_VAX_SHORT 2
43#define SIZE_VAX_USHORT 2
45#define SIZE_VAX_UINT 4
46#define SIZE_VAX_INT64 4
47#define SIZE_VAX_UINT64 4
48#define SIZE_VAX_FLOAT 4
49#define SIZE_VAX_DOUBLE 8
86 static void toLocal (
char& to,
const void* from);
87 static void toLocal (
unsigned char& to,
const void* from);
88 static void toLocal (
short& to,
const void* from);
89 static void toLocal (
unsigned short& to,
const void* from);
90 static void toLocal (
int& to,
const void* from);
91 static void toLocal (
unsigned int& to,
const void* from);
94 static void toLocal (
float& to,
const void* from);
95 static void toLocal (
double& to,
const void* from);
101 static void toLocal (
char* to,
const void* from,
103 static void toLocal (
unsigned char* to,
const void* from,
105 static void toLocal (
short* to,
const void* from,
107 static void toLocal (
unsigned short* to,
const void* from,
109 static void toLocal (
int* to,
const void* from,
111 static void toLocal (
unsigned int* to,
const void* from,
117 static void toLocal (
float* to,
const void* from,
119 static void toLocal (
double* to,
const void* from,
126 static void fromLocal (
void* to,
char from);
127 static void fromLocal (
void* to,
unsigned char from);
128 static void fromLocal (
void* to,
short from);
129 static void fromLocal (
void* to,
unsigned short from);
130 static void fromLocal (
void* to,
int from);
131 static void fromLocal (
void* to,
unsigned int from);
134 static void fromLocal (
void* to,
float from);
135 static void fromLocal (
void* to,
double from);
141 static void fromLocal (
void* to,
const char* from,
143 static void fromLocal (
void* to,
const unsigned char* from,
145 static void fromLocal (
void* to,
const short* from,
147 static void fromLocal (
void* to,
const unsigned short* from,
149 static void fromLocal (
void* to,
const int* from,
151 static void fromLocal (
void* to,
const unsigned int* from,
164 static void moveFloat (
void* to,
const void* from);
375#if defined(AIPS_LITTLE_ENDIAN)
376 ((
char*)to)[0] = ((
const char*)from)[2];
377 ((
char*)to)[1] = ((
const char*)from)[3];
378 ((
char*)to)[2] = ((
const char*)from)[0];
379 ((
char*)to)[3] = ((
const char*)from)[1];
381 ((
char*)to)[0] = ((
const char*)from)[1];
382 ((
char*)to)[1] = ((
const char*)from)[0];
383 ((
char*)to)[2] = ((
const char*)from)[3];
384 ((
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).
this file contains all the compiler specific defines
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
unsigned long long uInt64