28#ifndef CASA_MODCOMPCONVERSION_H
29#define CASA_MODCOMPCONVERSION_H
31#include <casacore/casa/aips.h>
32#include <casacore/casa/Utilities/Assert.h>
33#include <casacore/casa/OS/CanonicalConversion.h>
40#define SIZE_MODCOMP_CHAR 1
41#define SIZE_MODCOMP_UCHAR 1
42#define SIZE_MODCOMP_SHORT 2
43#define SIZE_MODCOMP_USHORT 2
44#define SIZE_MODCOMP_INT 4
45#define SIZE_MODCOMP_UINT 4
46#define SIZE_MODCOMP_INT64 4
47#define SIZE_MODCOMP_UINT64 4
48#define SIZE_MODCOMP_FLOAT 4
49#define SIZE_MODCOMP_DOUBLE 8
61#define CONVERT_MODCOMP_CHAR 0
62#define CONVERT_MODCOMP_UCHAR 0
65#if defined(AIPS_LITTLE_ENDIAN)
66#define CONVERT_MODCOMP_SHORT 1
67#define CONVERT_MODCOMP_USHORT 1
68#define CONVERT_MODCOMP_INT 1
69#define CONVERT_MODCOMP_UINT 1
70#define CONVERT_MODCOMP_INT64 1
71#define CONVERT_MODCOMP_UINT64 1
75#define CONVERT_MODCOMP_SHORT 0
76#define CONVERT_MODCOMP_USHORT 0
77#define CONVERT_MODCOMP_INT 0
78#define CONVERT_MODCOMP_UINT 0
79#define CONVERT_MODCOMP_INT64 1
80#define CONVERT_MODCOMP_UINT64 1
83#define CONVERT_MODCOMP_FLOAT 1
84#define CONVERT_MODCOMP_DOUBLE 1
126 static size_t toLocal(
Int& to,
const void* from);
137 static size_t toLocal(
Char* to,
const void* from,
size_t nr);
138 static size_t toLocal(
uChar* to,
const void* from,
size_t nr);
139 static size_t toLocal(
Short* to,
const void* from,
size_t nr);
140 static size_t toLocal(
uShort* to,
const void* from,
size_t nr);
141 static size_t toLocal(
Int* to,
const void* from,
size_t nr);
142 static size_t toLocal(
uInt* to,
const void* from,
size_t nr);
169 static size_t fromLocal(
void* to,
const Char* from,
size_t nr);
173 static size_t fromLocal(
void* to,
const Int* from,
size_t nr);
174 static size_t fromLocal(
void* to,
const uInt* from,
size_t nr);
213 size_t res =
toLocal (tmp, from);
220 size_t res =
toLocal (tmp, from);
static size_t toLocalChar(void *to, const void *from, size_t nr)
Convert nr values from canonical format to local format.
static size_t fromLocalChar(void *to, const void *from, size_t nr)
Convert nr values from local format to canonical format.
static size_t fromLocalUShort(void *to, const void *from, size_t nr)
static size_t fromLocalUChar(void *to, const void *from, size_t nr)
static size_t toLocalInt(void *to, const void *from, size_t nr)
static size_t fromLocal(void *to, const char &from)
Convert one value from local format to canonical format.
static size_t toLocal(char &to, const void *from)
Convert one value from canonical format to local format.
static size_t toLocalUChar(void *to, const void *from, size_t nr)
static size_t fromLocalShort(void *to, const void *from, size_t nr)
static size_t toLocalUInt(void *to, const void *from, size_t nr)
static size_t toLocalUShort(void *to, const void *from, size_t nr)
static size_t fromLocalInt(void *to, const void *from, size_t nr)
static size_t toLocalShort(void *to, const void *from, size_t nr)
static size_t fromLocalUInt(void *to, const void *from, size_t nr)
static size_t fromLocal(void *to, Char from)
Convert one value from local format to Modcomp format.
static size_t toLocal(Char &to, const void *from)
Convert one value from Modcomp format to local format.
static size_t fromLocal(void *to, const Int64 *from, size_t nr)
static size_t toLocal(Float *to, const void *from, size_t nr)
static size_t fromLocal(void *to, const Double *from, size_t nr)
ModcompConversion()
This class should not be constructed (so declare the constructor private).
static size_t toLocal(uInt64 *to, const void *from, size_t nr)
static size_t toLocal(Int64 *to, const void *from, size_t nr)
static size_t toLocal(Double *to, const void *from, size_t nr)
static size_t fromLocal(void *to, const Float *from, size_t nr)
static size_t fromLocal(void *to, const uInt64 *from, size_t nr)
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