28 #ifndef CASA_DATACONVERSION_H
29 #define CASA_DATACONVERSION_H
97 virtual size_t toLocal (
char& to,
98 const void* from)
const = 0;
99 virtual size_t toLocal (
unsigned char& to,
100 const void* from)
const = 0;
101 virtual size_t toLocal (
short& to,
102 const void* from)
const = 0;
103 virtual size_t toLocal (
unsigned short& to,
104 const void* from)
const = 0;
105 virtual size_t toLocal (
int& to,
106 const void* from)
const = 0;
107 virtual size_t toLocal (
unsigned int& to,
108 const void* from)
const = 0;
110 const void* from)
const = 0;
112 const void* from)
const = 0;
113 virtual size_t toLocal (
float& to,
114 const void* from)
const = 0;
115 virtual size_t toLocal (
double& to,
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;
174 virtual size_t fromLocal (
void* to,
const char* from,
175 size_t nr)
const = 0;
176 virtual size_t fromLocal (
void* to,
const unsigned char* from,
177 size_t nr)
const = 0;
178 virtual size_t fromLocal (
void* to,
const short* from,
179 size_t nr)
const = 0;
180 virtual size_t fromLocal (
void* to,
const unsigned short* from,
181 size_t nr)
const = 0;
182 virtual size_t fromLocal (
void* to,
const int* from,
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;
190 virtual size_t fromLocal (
void* to,
const float* from,
191 size_t nr)
const = 0;
192 virtual size_t fromLocal (
void* to,
const double* from,
193 size_t nr)
const = 0;
200 virtual Bool canCopy (
const unsigned char*)
const = 0;
202 virtual Bool canCopy (
const unsigned short*)
const = 0;
204 virtual Bool canCopy (
const unsigned int*)
const = 0;
213 virtual unsigned int externalSize (
const char*)
const = 0;
214 virtual unsigned int externalSize (
const unsigned char*)
const = 0;
215 virtual unsigned int externalSize (
const short*)
const = 0;
216 virtual unsigned int externalSize (
const unsigned short*)
const = 0;
217 virtual unsigned int externalSize (
const int*)
const = 0;
218 virtual unsigned int externalSize (
const unsigned int*)
const = 0;
221 virtual unsigned int externalSize (
const float*)
const = 0;
222 virtual unsigned int externalSize (
const double*)
const = 0;
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Abstract base class with functions to convert any format.
unsigned long long uInt64
virtual ~DataConversion()
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...
bool Bool
Define the standard types used by Casacore.
virtual unsigned int externalSize(const char *) const =0
Get the external size of the data type.
virtual size_t fromLocal(void *to, char from) const =0
Convert one value from local format to foreign format.
DataConversion()
Construct the object.
virtual size_t toLocal(char &to, const void *from) const =0
Convert one value from foreign format to local format.