26#ifndef CASA_MODCOMPCONVERSION_H
27#define CASA_MODCOMPCONVERSION_H
29#include <casacore/casa/aips.h>
30#include <casacore/casa/Utilities/Assert.h>
31#include <casacore/casa/OS/CanonicalConversion.h>
38#define SIZE_MODCOMP_CHAR 1
39#define SIZE_MODCOMP_UCHAR 1
40#define SIZE_MODCOMP_SHORT 2
41#define SIZE_MODCOMP_USHORT 2
42#define SIZE_MODCOMP_INT 4
43#define SIZE_MODCOMP_UINT 4
44#define SIZE_MODCOMP_INT64 4
45#define SIZE_MODCOMP_UINT64 4
46#define SIZE_MODCOMP_FLOAT 4
47#define SIZE_MODCOMP_DOUBLE 8
59#define CONVERT_MODCOMP_CHAR 0
60#define CONVERT_MODCOMP_UCHAR 0
63#if defined(AIPS_LITTLE_ENDIAN)
64#define CONVERT_MODCOMP_SHORT 1
65#define CONVERT_MODCOMP_USHORT 1
66#define CONVERT_MODCOMP_INT 1
67#define CONVERT_MODCOMP_UINT 1
68#define CONVERT_MODCOMP_INT64 1
69#define CONVERT_MODCOMP_UINT64 1
73#define CONVERT_MODCOMP_SHORT 0
74#define CONVERT_MODCOMP_USHORT 0
75#define CONVERT_MODCOMP_INT 0
76#define CONVERT_MODCOMP_UINT 0
77#define CONVERT_MODCOMP_INT64 1
78#define CONVERT_MODCOMP_UINT64 1
81#define CONVERT_MODCOMP_FLOAT 1
82#define CONVERT_MODCOMP_DOUBLE 1
124 static size_t toLocal(
Int& to,
const void* from);
135 static size_t toLocal(
Char* to,
const void* from,
size_t nr);
136 static size_t toLocal(
uChar* to,
const void* from,
size_t nr);
137 static size_t toLocal(
Short* to,
const void* from,
size_t nr);
138 static size_t toLocal(
uShort* to,
const void* from,
size_t nr);
139 static size_t toLocal(
Int* to,
const void* from,
size_t nr);
140 static size_t toLocal(
uInt* to,
const void* from,
size_t nr);
167 static size_t fromLocal(
void* to,
const Char* from,
size_t nr);
171 static size_t fromLocal(
void* to,
const Int* from,
size_t nr);
172 static size_t fromLocal(
void* to,
const uInt* from,
size_t nr);
211 size_t res =
toLocal (tmp, from);
218 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