28 #ifndef CASA_DATACONVERSION_H
29 #define CASA_DATACONVERSION_H
32 #include <casacore/casa/aips.h>
33 #include <casacore/casa/OS/Conversion.h>
98 const void* from)
const = 0;
99 virtual size_t toLocal (
unsigned char& to,
100 const void* from)
const = 0;
102 const void* from)
const = 0;
104 const void* from)
const = 0;
106 const void* from)
const = 0;
108 const void* from)
const = 0;
110 const void* from)
const = 0;
112 const void* from)
const = 0;
114 const void* from)
const = 0;
116 const void* from)
const = 0;
126 virtual size_t toLocal (
char* to,
const void* from,
127 size_t nr)
const = 0;
128 virtual size_t toLocal (
unsigned char* to,
const void* from,
129 size_t nr)
const = 0;
130 virtual size_t toLocal (
short* to,
const void* from,
131 size_t nr)
const = 0;
132 virtual size_t toLocal (
unsigned short* to,
const void* from,
133 size_t nr)
const = 0;
134 virtual size_t toLocal (
int* to,
const void* from,
135 size_t nr)
const = 0;
136 virtual size_t toLocal (
unsigned int* to,
const void* from,
137 size_t nr)
const = 0;
139 size_t nr)
const = 0;
141 size_t nr)
const = 0;
142 virtual size_t toLocal (
float* to,
const void* from,
143 size_t nr)
const = 0;
144 virtual size_t toLocal (
double* to,
const void* from,
145 size_t nr)
const = 0;
155 virtual size_t fromLocal (
void* to,
char from)
const = 0;
156 virtual size_t fromLocal (
void* to,
unsigned char from)
const = 0;
157 virtual size_t fromLocal (
void* to,
short from)
const = 0;
158 virtual size_t fromLocal (
void* to,
unsigned short from)
const = 0;
159 virtual size_t fromLocal (
void* to,
int from)
const = 0;
160 virtual size_t fromLocal (
void* to,
unsigned int from)
const = 0;
163 virtual size_t fromLocal (
void* to,
float from)
const = 0;
164 virtual size_t fromLocal (
void* to,
double from)
const = 0;
175 size_t nr)
const = 0;
176 virtual size_t fromLocal (
void* to,
const unsigned char* from,
177 size_t nr)
const = 0;
179 size_t nr)
const = 0;
180 virtual size_t fromLocal (
void* to,
const unsigned short* from,
181 size_t nr)
const = 0;
183 size_t nr)
const = 0;
184 virtual size_t fromLocal (
void* to,
const unsigned int* from,
185 size_t nr)
const = 0;
187 size_t nr)
const = 0;
189 size_t nr)
const = 0;
191 size_t nr)
const = 0;
193 size_t nr)
const = 0;
virtual size_t toLocal(int *to, const void *from, size_t nr) const =0
virtual size_t toLocal(short &to, const void *from) const =0
virtual size_t toLocal(short *to, const void *from, size_t nr) const =0
virtual size_t fromLocal(void *to, const char *from, size_t nr) const =0
Convert nr values from local format to foreign format.
virtual unsigned int externalSize(const float *) const =0
virtual size_t fromLocal(void *to, unsigned short from) const =0
virtual size_t fromLocal(void *to, const unsigned short *from, size_t nr) const =0
virtual size_t toLocal(Int64 *to, const void *from, size_t nr) const =0
virtual Bool canCopy(const uInt64 *) const =0
virtual size_t fromLocal(void *to, const short *from, size_t nr) const =0
virtual unsigned int externalSize(const short *) const =0
virtual Bool canCopy(const unsigned short *) const =0
virtual size_t fromLocal(void *to, short from) const =0
virtual size_t fromLocal(void *to, const unsigned int *from, size_t nr) const =0
virtual unsigned int externalSize(const Int64 *) const =0
virtual Bool canCopy(const unsigned char *) const =0
virtual size_t fromLocal(void *to, const double *from, size_t nr) const =0
virtual size_t fromLocal(void *to, int from) const =0
virtual size_t fromLocal(void *to, const unsigned char *from, size_t nr) const =0
virtual Bool canCopy(const float *) const =0
virtual size_t fromLocal(void *to, const uInt64 *from, size_t nr) const =0
virtual size_t toLocal(double &to, const void *from) const =0
virtual size_t toLocal(char *to, const void *from, size_t nr) const =0
Convert nr values from foreign format to local format.
virtual size_t toLocal(int &to, const void *from) const =0
virtual size_t toLocal(uInt64 *to, const void *from, size_t nr) const =0
virtual size_t toLocal(unsigned short &to, const void *from) const =0
virtual size_t toLocal(float &to, const void *from) const =0
virtual size_t toLocal(double *to, const void *from, size_t nr) const =0
virtual unsigned int externalSize(const char *) const =0
Get the external size of the data type.
virtual unsigned int externalSize(const double *) const =0
virtual Bool canCopy(const short *) const =0
virtual size_t fromLocal(void *to, const Int64 *from, size_t nr) const =0
virtual size_t fromLocal(void *to, const float *from, size_t nr) const =0
virtual size_t toLocal(Int64 &to, const void *from) const =0
virtual size_t fromLocal(void *to, char from) const =0
Convert one value from local format to foreign format.
virtual unsigned int externalSize(const int *) const =0
virtual ~DataConversion()
virtual unsigned int externalSize(const unsigned int *) const =0
virtual size_t toLocal(unsigned int *to, const void *from, size_t nr) const =0
virtual size_t fromLocal(void *to, uInt64 from) const =0
virtual size_t fromLocal(void *to, float from) const =0
virtual Bool canCopy(const int *) const =0
virtual size_t toLocal(float *to, const void *from, size_t nr) const =0
virtual size_t toLocal(unsigned char &to, const void *from) const =0
virtual size_t fromLocal(void *to, double from) const =0
virtual size_t toLocal(unsigned int &to, const void *from) const =0
virtual size_t fromLocal(void *to, unsigned char from) const =0
virtual Bool canCopy(const Int64 *) const =0
virtual size_t toLocal(uInt64 &to, const void *from) const =0
virtual size_t fromLocal(void *to, const int *from, size_t nr) const =0
virtual Bool canCopy(const unsigned int *) const =0
virtual Bool canCopy(const double *) const =0
DataConversion()
Construct the object.
virtual unsigned int externalSize(const unsigned char *) const =0
virtual size_t toLocal(unsigned char *to, const void *from, size_t nr) const =0
virtual size_t fromLocal(void *to, Int64 from) const =0
virtual unsigned int externalSize(const unsigned short *) const =0
virtual size_t toLocal(unsigned short *to, const void *from, size_t nr) const =0
virtual unsigned int externalSize(const uInt64 *) const =0
virtual size_t toLocal(char &to, const void *from) const =0
Convert one value from foreign format to local format.
virtual Bool canCopy(const char *) const =0
Determine if the data for a data type can be simply copied, thus if no conversion is needed.
virtual size_t fromLocal(void *to, unsigned int from) const =0
this file contains all the compiler specific defines
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
bool Bool
Define the standard types used by Casacore.
unsigned long long uInt64