Go to the documentation of this file.
28 #ifndef CASA_VALTYPE_H
29 #define CASA_VALTYPE_H
33 #include <casacore/casa/aips.h>
34 #include <casacore/casa/Utilities/DataType.h>
35 #include <casacore/casa/BasicSL/String.h>
36 #include <casacore/casa/BasicSL/Complex.h>
37 #include <casacore/casa/Utilities/Compare.h>
38 #include <casacore/casa/Utilities/CountedPtr.h>
39 #include <casacore/casa/OS/Conversion.h>
40 #include <casacore/casa/IO/AipsIO.h>
41 #include <casacore/casa/iosfwd.h>
131 static DataType
getType (
const float*);
132 static DataType
getType (
const double*);
137 static DataType
getType (
const void*);
178 uInt& nrElementsPerValue,
203 static void put (
AipsIO&,
const double*);
234 static void put (ostream&,
const Bool*);
235 static void put (ostream&,
const Char*);
236 static void put (ostream&,
const uChar*);
237 static void put (ostream&,
const Short*);
238 static void put (ostream&,
const uShort*);
239 static void put (ostream&,
const Int*);
240 static void put (ostream&,
const uInt*);
241 static void put (ostream&,
const Int64*);
242 static void put (ostream&,
const float*);
243 static void put (ostream&,
const double*);
246 static void put (ostream&,
const String*);
247 static void put (ostream&,
const void*);
287 static String result(
"Bool ");
291 static String result(
"Char ");
295 static String result(
"uChar ");
299 static String result(
"Short ");
303 static String result(
"uShort ");
307 static String result(
"Int ");
311 static String result(
"uInt ");
315 static String result(
"Int64 ");
319 static String result(
"float ");
323 static String result(
"double ");
327 static String result(
"Complex ");
331 static String result(
"DComplex");
335 static String result(
"String ");
339 static String result(
"Record ");
343 static String result(
"Table ");
347 static String result(
"Other ");
351 static String result(
"unknown ");
570 {
return *
value != *undef;}
572 {
return *
value != *undef;}
574 {
return *
value != *undef;}
576 {
return *
value != *undef;}
578 {
return *
value != *undef;}
580 {
return *
value != *undef;}
582 {
return *
value != *undef;}
584 {
return *
value != *undef;}
586 {
return *
value != *undef;}
588 {
return *
value != *undef;}
590 {
return *
value != *undef;}
592 {
return *
value != *undef;}
594 {
return *
value != *undef;}
static ObjCompareFunc * getCmpFunc(DataType)
Get the pointer to the routine which compares two values.
static int isDefined(const Bool *value, const Bool *undef)
Check if a value is defined, i.e.
static Bool undefBool()
Get the "undefined value" for this data type as the function's return value.
AipsIO is the object persistency mechanism of Casacore
static const Int64 undefint64
static const String & strunknown()
std::complex< Double > DComplex
static const String & strtable()
A hierarchical collection of named fields of various types.
Referenced counted pointer for constant data.
static Int64 undefInt64()
static Complex undefComplex()
static int getCanonicalSize(DataType, Bool BECanonical=True)
Get the size of data type in canonical format.
static String undefString()
static const String & strbool()
static const String & strchar()
static double undefDouble()
static const float undeffloat
static const String & strcomplex()
Data types and their undefined values.
static const uChar undefuchar
static const Bool undefbool
static const String & getTypeStr(DataType)
Get the name of the data type.
static const String & strint()
static const String & strfloat()
static Short undefShort()
static const Int undefint
static int getTypeSize(DataType)
Get the size of data type (in local format).
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
static const Char undefchar
static const uShort undefushort
static const String & strushort()
this file contains all the compiler specific defines
ValType()
This class is not meant to be constructed.
static const DComplex undefdcomplex
static const double undefdouble
static uShort undefUShort()
static Bool isPromotable(DataType from, DataType to)
Test if a data type can be promoted to another.
static void getCanonicalFunc(DataType dt, Conversion::ValueFunction *&readFunc, Conversion::ValueFunction *&writeFunc, uInt &nrElementsPerValue, Bool BECanonical=True)
Get the functions to convert to/from canonical format.
static const String & strdcomplex()
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
static void put(AipsIO &, const Bool *)
Put the value into AipsIO.
static float undefFloat()
static const uInt undefuint
static const String & struchar()
String: the storage and methods of handling collections of characters.
size_t ValueFunction(void *to, const void *from, size_t nvalues)
Define the signature of a function converting nvalues values from internal to external format or vice...
bool Bool
Define the standard types used by Casacore.
std::complex< Float > Complex
static uChar undefUChar()
static const String & strstring()
static DataType getType(const Bool *)
Get the data type code for this type as the function's return value.
static const String & strdouble()
static const String & struint()
static const String & strshort()
static DComplex undefDComplex()
static const String & strrecord()
static const Complex undefcomplex
static const String undefstring
static const Short undefshort
static const String & strint64()
static CountedPtr< BaseCompare > getCmpObj(DataType)
Get the object which compares two values.
static void getUndef(Bool *)
Get the "undefined value" for this data type in the argument.
static void get(AipsIO &, Bool *)
Get the value from AipsIO.
static const String & strother()