casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
ValType.h
Go to the documentation of this file.
1 //# ValType.h: Data types and their undefined values
2 //# Copyright (C) 1993,1994,1995,1996,1998,2001,2002
3 //# Associated Universities, Inc. Washington DC, USA.
4 //#
5 //# This library is free software; you can redistribute it and/or modify it
6 //# under the terms of the GNU Library General Public License as published by
7 //# the Free Software Foundation; either version 2 of the License, or (at your
8 //# option) any later version.
9 //#
10 //# This library is distributed in the hope that it will be useful, but WITHOUT
11 //# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
12 //# FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public
13 //# License for more details.
14 //#
15 //# You should have received a copy of the GNU Library General Public License
16 //# along with this library; if not, write to the Free Software Foundation,
17 //# Inc., 675 Massachusetts Ave, Cambridge, MA 02139, USA.
18 //#
19 //# Correspondence concerning AIPS++ should be addressed as follows:
20 //# Internet email: aips2-request@nrao.edu.
21 //# Postal address: AIPS++ Project Office
22 //# National Radio Astronomy Observatory
23 //# 520 Edgemont Road
24 //# Charlottesville, VA 22903-2475 USA
25 //#
26 //# $Id$
27 
28 #ifndef CASA_VALTYPE_H
29 #define CASA_VALTYPE_H
30 
31 
32 //# Includes
33 #include <casacore/casa/aips.h>
41 #include <casacore/casa/iosfwd.h>
42 
43 namespace casacore { //# NAMESPACE CASACORE - BEGIN
44 
45 //# Forward Declarations
46 class TableRecord;
47 
48 
49 // <summary>
50 // Data types and their undefined values.
51 // </summary>
52 
53 // <use visibility=export>
54 
55 // <reviewed reviewer="Friso olnon" date="1995/03/20" tests="" demos="">
56 // </reviewed>
57 
58 // <prerequisite>
59 // <li> enum <linkto group="DataType.h#DataType">DataType</linkto>
60 // </prerequisite>
61 
62 // <synopsis>
63 // Class <src>ValType</src> describes the data types and their
64 // "undefined values".
65 //
66 // Supported are built-in data types, <src>Bool</src>,
67 // <src>String</src>, <src>Complex</src> and <src>DComplex</src>.
68 // As a rule, the smallest possible value of a data type is used as its
69 // "undefined value"; for <src>String</src> we use the null string, and
70 // for <src>Bool</src> the value <em>False</em>.
71 //
72 // The class does not contain data. It merely defines constants and
73 // has overloaded functions that return in some form the "undefined
74 // value", the data type, or certain other information about the data
75 // type.
76 // </synopsis>
77 
78 
79 class ValType {
80 public:
81 
82  // Get the "undefined value" for this data type as the function's
83  // return value.
84  //<group>
85  static Bool undefBool ();
86  static Char undefChar ();
87  static uChar undefUChar ();
88  static Short undefShort ();
89  static uShort undefUShort ();
90  static Int undefInt ();
91  static uInt undefUInt ();
92  static Int64 undefInt64 ();
93  static float undefFloat ();
94  static double undefDouble ();
95  static Complex undefComplex ();
96  static DComplex undefDComplex ();
97  static String undefString ();
98  //</group>
99 
100  // Get the "undefined value" for this data type in the argument.
101  // The <src>void*</src> function is not doing anything and is for
102  // TpOther types.
103  //<group>
104  static void getUndef (Bool*);
105  static void getUndef (Char*);
106  static void getUndef (uChar*);
107  static void getUndef (Short*);
108  static void getUndef (uShort*);
109  static void getUndef (Int*);
110  static void getUndef (uInt*);
111  static void getUndef (Int64*);
112  static void getUndef (float*);
113  static void getUndef (double*);
114  static void getUndef (Complex*);
115  static void getUndef (DComplex*);
116  static void getUndef (String*);
117  static void getUndef (void*);
118  //</group>
119 
120  // Get the data type code for this type as the function's
121  // return value.
122  //<group>
123  static DataType getType (const Bool*);
124  static DataType getType (const Char*);
125  static DataType getType (const uChar*);
126  static DataType getType (const Short*);
127  static DataType getType (const uShort*);
128  static DataType getType (const Int*);
129  static DataType getType (const uInt*);
130  static DataType getType (const Int64*);
131  static DataType getType (const float*);
132  static DataType getType (const double*);
133  static DataType getType (const Complex*);
134  static DataType getType (const DComplex*);
135  static DataType getType (const String*);
136  static DataType getType (const TableRecord*);
137  static DataType getType (const void*);
138  //</group>
139 
140  // Get the name of the data type. The <src>void*</src> returns
141  // the string "Other ".
142  //<group>
143  static const String& getTypeStr (DataType);
144  static const String& getTypeStr (const Bool*);
145  static const String& getTypeStr (const Char*);
146  static const String& getTypeStr (const uChar*);
147  static const String& getTypeStr (const Short*);
148  static const String& getTypeStr (const uShort*);
149  static const String& getTypeStr (const Int*);
150  static const String& getTypeStr (const uInt*);
151  static const String& getTypeStr (const Int64*);
152  static const String& getTypeStr (const float*);
153  static const String& getTypeStr (const double*);
154  static const String& getTypeStr (const Complex*);
155  static const String& getTypeStr (const DComplex*);
156  static const String& getTypeStr (const String*);
157  static const String& getTypeStr (const TableRecord*);
158  static const String& getTypeStr (const void*);
159  //</group>
160 
161  // Get the size of data type (in local format).
162  static int getTypeSize (DataType);
163 
164  // Get the size of data type in canonical format.
165  // <br>The argument <src>BECanonical</src> determines if the big-endian
166  // or little-endian canonical format is used.
167  static int getCanonicalSize (DataType, Bool BECanonical = True);
168 
169  // Get the functions to convert to/from canonical format.
170  // These functions take the number of pixels as the length argument.
171  // It returns the number of elements per value; normally this is 1,
172  // but for complex values it is 2 (since they convert float/double).
173  // <br>The argument <src>BECanonical</src> determines if the big-endian
174  // or little-endian canonical format is used.
175  static void getCanonicalFunc (DataType dt,
176  Conversion::ValueFunction*& readFunc,
177  Conversion::ValueFunction*& writeFunc,
178  uInt& nrElementsPerValue,
179  Bool BECanonical = True);
180 
181  // Test if a data type can be promoted to another.
182  static Bool isPromotable (DataType from, DataType to);
183 
184  // Get the pointer to the routine which compares two values.
185  static ObjCompareFunc* getCmpFunc (DataType);
186 
187  // Get the object which compares two values.
188  static CountedPtr<BaseCompare> getCmpObj (DataType);
189 
190  // Put the value into <src>AipsIO</src>.
191  // The <src>void*</src> function is not doing anything and is for
192  // TpOther types.
193  //<group>
194  static void put (AipsIO&, const Bool*);
195  static void put (AipsIO&, const Char*);
196  static void put (AipsIO&, const uChar*);
197  static void put (AipsIO&, const Short*);
198  static void put (AipsIO&, const uShort*);
199  static void put (AipsIO&, const Int*);
200  static void put (AipsIO&, const uInt*);
201  static void put (AipsIO&, const Int64*);
202  static void put (AipsIO&, const float*);
203  static void put (AipsIO&, const double*);
204  static void put (AipsIO&, const Complex*);
205  static void put (AipsIO&, const DComplex*);
206  static void put (AipsIO&, const String*);
207  static void put (AipsIO&, const void*);
208  //</group>
209 
210  // Get the value from <src>AipsIO</src>.
211  // The <src>void*</src> function is not doing anything and is for
212  // TpOther types.
213  //<group>
214  static void get (AipsIO&, Bool*);
215  static void get (AipsIO&, Char*);
216  static void get (AipsIO&, uChar*);
217  static void get (AipsIO&, Short*);
218  static void get (AipsIO&, uShort*);
219  static void get (AipsIO&, Int*);
220  static void get (AipsIO&, uInt*);
221  static void get (AipsIO&, Int64*);
222  static void get (AipsIO&, float*);
223  static void get (AipsIO&, double*);
224  static void get (AipsIO&, Complex*);
225  static void get (AipsIO&, DComplex*);
226  static void get (AipsIO&, String*);
227  static void get (AipsIO&, void*);
228  //</group>
229 
230  // Put the value into the <src>ostream</src>.
231  // The <src>void*</src> function is not doing anything and is for
232  // TpOther types.
233  //<group>
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*);
244  static void put (ostream&, const Complex*);
245  static void put (ostream&, const DComplex*);
246  static void put (ostream&, const String*);
247  static void put (ostream&, const void*);
248  //</group>
249 
250  // Check if a value is defined, i.e. if it mismatches the given
251  // undefined value. The <src>void*</src> function (for non-standard
252  // data types) always returns the value <src>1</src>, since such
253  // values cannot be undefined.
254  //<group>
255  static int isDefined (const Bool* value, const Bool* undef);
256  static int isDefined (const Char* value, const Char* undef);
257  static int isDefined (const uChar* value, const uChar* undef);
258  static int isDefined (const Short* value, const Short* undef);
259  static int isDefined (const uShort* value, const uShort* undef);
260  static int isDefined (const Int* value, const Int* undef);
261  static int isDefined (const uInt* value, const uInt* undef);
262  static int isDefined (const Int64* value, const Int64* undef);
263  static int isDefined (const float* value, const float* undef);
264  static int isDefined (const double* value, const double* undef);
265  static int isDefined (const Complex* value, const Complex* undef);
266  static int isDefined (const DComplex* value, const DComplex* undef);
267  static int isDefined (const String* value, const String* undef);
268  static int isDefined (const void* value, const void* undef);
269  //</group>
270 
271 private:
272  static const Bool undefbool ;
273  static const Char undefchar ;
274  static const uChar undefuchar ;
275  static const Short undefshort ;
276  static const uShort undefushort ;
277  static const Int undefint ;
278  static const uInt undefuint ;
279  static const Int64 undefint64 ;
280  static const float undeffloat ;
281  static const double undefdouble ;
282  static const Complex undefcomplex ;
283  static const DComplex undefdcomplex;
284  static const String undefstring ;
285 
286  static const String &strbool( ) {
287  static String result("Bool ");
288  return result;
289  }
290  static const String &strchar( ) {
291  static String result("Char ");
292  return result;
293  }
294  static const String &struchar( ) {
295  static String result("uChar ");
296  return result;
297  }
298  static const String &strshort( ) {
299  static String result("Short ");
300  return result;
301  }
302  static const String &strushort( ) {
303  static String result("uShort ");
304  return result;
305  }
306  static const String &strint( ) {
307  static String result("Int ");
308  return result;
309  }
310  static const String &struint( ) {
311  static String result("uInt ");
312  return result;
313  }
314  static const String &strint64( ) {
315  static String result("Int64 ");
316  return result;
317  }
318  static const String &strfloat( ) {
319  static String result("float ");
320  return result;
321  }
322  static const String &strdouble( ) {
323  static String result("double ");
324  return result;
325  }
326  static const String &strcomplex( ) {
327  static String result("Complex ");
328  return result;
329  }
330  static const String &strdcomplex( ) {
331  static String result("DComplex");
332  return result;
333  }
334  static const String &strstring( ) {
335  static String result("String ");
336  return result;
337  }
338  static const String &strrecord( ) {
339  static String result("Record ");
340  return result;
341  }
342  static const String &strtable( ) {
343  static String result("Table ");
344  return result;
345  }
346  static const String &strother( ) {
347  static String result("Other ");
348  return result;
349  }
350  static const String &strunknown( ) {
351  static String result("unknown ");
352  return result;
353  }
354  //
355  // This class is not meant to be constructed.
356  //
357  ValType ();
358 };
359 
360 
361 
363  {return undefbool;}
365  {return undefchar;}
367  {return undefuchar;}
369  {return undefshort;}
371  {return undefushort;}
373  {return undefint;}
375  {return undefuint;}
377  {return undefint64;}
378 inline float ValType::undefFloat ()
379  {return undeffloat;}
380 inline double ValType::undefDouble ()
381  {return undefdouble;}
383  {return undefcomplex;}
385  {return undefdcomplex;}
387  {return undefstring;}
388 
389 
390 inline void ValType::getUndef (Bool* val)
391  {*val = undefbool;}
392 inline void ValType::getUndef (Char* val)
393  {*val = undefchar;}
394 inline void ValType::getUndef (uChar* val)
395  {*val = undefuchar;}
396 inline void ValType::getUndef (Short* val)
397  {*val = undefshort;}
398 inline void ValType::getUndef (uShort* val)
399  {*val = undefushort;}
400 inline void ValType::getUndef (Int* val)
401  {*val = undefint;}
402 inline void ValType::getUndef (uInt* val)
403  {*val = undefuint;}
404 inline void ValType::getUndef (Int64* val)
405  {*val = undefint64;}
406 inline void ValType::getUndef (float* val)
407  {*val = undeffloat;}
408 inline void ValType::getUndef (double* val)
409  {*val = undefdouble;}
410 inline void ValType::getUndef (Complex* val)
411  {*val = undefcomplex;}
412 inline void ValType::getUndef (DComplex* val)
413  {*val = undefdcomplex;}
414 inline void ValType::getUndef (String* val)
415  {*val = undefstring;}
416 inline void ValType::getUndef (void*)
417  {}
418 
419 inline DataType ValType::getType (const Bool*)
420  {return TpBool;}
421 inline DataType ValType::getType (const Char*)
422  {return TpChar;}
423 inline DataType ValType::getType (const uChar*)
424  {return TpUChar;}
425 inline DataType ValType::getType (const Short*)
426  {return TpShort;}
427 inline DataType ValType::getType (const uShort*)
428  {return TpUShort;}
429 inline DataType ValType::getType (const Int*)
430  {return TpInt;}
431 inline DataType ValType::getType (const uInt*)
432  {return TpUInt;}
433 inline DataType ValType::getType (const Int64*)
434  {return TpInt64;}
435 inline DataType ValType::getType (const float*)
436  {return TpFloat;}
437 inline DataType ValType::getType (const double*)
438  {return TpDouble;}
439 inline DataType ValType::getType (const Complex*)
440  {return TpComplex;}
441 inline DataType ValType::getType (const DComplex*)
442  {return TpDComplex;}
443 inline DataType ValType::getType (const String*)
444  {return TpString;}
445 inline DataType ValType::getType (const TableRecord*)
446  {return TpRecord;}
447 inline DataType ValType::getType (const void*)
448  {return TpOther;}
449 
450 inline const String& ValType::getTypeStr (const Bool*)
451  {return strbool();}
452 inline const String& ValType::getTypeStr (const Char*)
453  {return strchar();}
454 inline const String& ValType::getTypeStr (const uChar*)
455  {return struchar();}
456 inline const String& ValType::getTypeStr (const Short*)
457  {return strshort();}
458 inline const String& ValType::getTypeStr (const uShort*)
459  {return strushort();}
460 inline const String& ValType::getTypeStr (const Int*)
461  {return strint();}
462 inline const String& ValType::getTypeStr (const uInt*)
463  {return struint();}
464 inline const String& ValType::getTypeStr (const Int64*)
465  {return strint64();}
466 inline const String& ValType::getTypeStr (const float*)
467  {return strfloat();}
468 inline const String& ValType::getTypeStr (const double*)
469  {return strdouble();}
470 inline const String& ValType::getTypeStr (const Complex*)
471  {return strcomplex();}
472 inline const String& ValType::getTypeStr (const DComplex*)
473  {return strdcomplex();}
474 inline const String& ValType::getTypeStr (const String*)
475  {return strstring();}
476 inline const String& ValType::getTypeStr (const TableRecord*)
477  {return strrecord();}
478 inline const String& ValType::getTypeStr (const void*)
479  {return strother();}
480 
481 inline void ValType::put (AipsIO& ios, const Bool* value)
482  {ios << *value;}
483 inline void ValType::put (AipsIO& ios, const Char* value)
484  {ios << *value;}
485 inline void ValType::put (AipsIO& ios, const uChar* value)
486  {ios << *value;}
487 inline void ValType::put (AipsIO& ios, const Short* value)
488  {ios << *value;}
489 inline void ValType::put (AipsIO& ios, const uShort* value)
490  {ios << *value;}
491 inline void ValType::put (AipsIO& ios, const Int* value)
492  {ios << *value;}
493 inline void ValType::put (AipsIO& ios, const uInt* value)
494  {ios << *value;}
495 inline void ValType::put (AipsIO& ios, const Int64* value)
496  {ios << *value;}
497 inline void ValType::put (AipsIO& ios, const float* value)
498  {ios << *value;}
499 inline void ValType::put (AipsIO& ios, const double* value)
500  {ios << *value;}
501 inline void ValType::put (AipsIO& ios, const Complex* value)
502  {ios << *value;}
503 inline void ValType::put (AipsIO& ios, const DComplex* value)
504  {ios << *value;}
505 inline void ValType::put (AipsIO& ios, const String* value)
506  {ios << *value;}
507 inline void ValType::put (AipsIO&, const void*)
508  {}
509 
510 inline void ValType::get (AipsIO& ios, Bool* value)
511  {ios >> *value;}
512 inline void ValType::get (AipsIO& ios, Char* value)
513  {ios >> *value;}
514 inline void ValType::get (AipsIO& ios, uChar* value)
515  {ios >> *value;}
516 inline void ValType::get (AipsIO& ios, Short* value)
517  {ios >> *value;}
518 inline void ValType::get (AipsIO& ios, uShort* value)
519  {ios >> *value;}
520 inline void ValType::get (AipsIO& ios, Int* value)
521  {ios >> *value;}
522 inline void ValType::get (AipsIO& ios, uInt* value)
523  {ios >> *value;}
524 inline void ValType::get (AipsIO& ios, Int64* value)
525  {ios >> *value;}
526 inline void ValType::get (AipsIO& ios, float* value)
527  {ios >> *value;}
528 inline void ValType::get (AipsIO& ios, double* value)
529  {ios >> *value;}
530 inline void ValType::get (AipsIO& ios, Complex* value)
531  {ios >> *value;}
532 inline void ValType::get (AipsIO& ios, DComplex* value)
533  {ios >> *value;}
534 inline void ValType::get (AipsIO& ios, String* value)
535  {ios >> *value;}
536 inline void ValType::get (AipsIO&, void*)
537  {}
538 
539 inline void ValType::put (ostream& ios, const Bool* value)
540  {ios << *value;}
541 inline void ValType::put (ostream& ios, const Char* value)
542  {ios << *value;}
543 inline void ValType::put (ostream& ios, const uChar* value)
544  {ios << *value;}
545 inline void ValType::put (ostream& ios, const Short* value)
546  {ios << *value;}
547 inline void ValType::put (ostream& ios, const uShort* value)
548  {ios << *value;}
549 inline void ValType::put (ostream& ios, const Int* value)
550  {ios << *value;}
551 inline void ValType::put (ostream& ios, const uInt* value)
552  {ios << *value;}
553 inline void ValType::put (ostream& ios, const Int64* value)
554  {ios << *value;}
555 inline void ValType::put (ostream& ios, const float* value)
556  {ios << *value;}
557 inline void ValType::put (ostream& ios, const double* value)
558  {ios << *value;}
559 inline void ValType::put (ostream& ios, const Complex* value)
560  {ios << *value;}
561 inline void ValType::put (ostream& ios, const DComplex* value)
562  {ios << *value;}
563 inline void ValType::put (ostream& ios, const String* value)
564  {ios << *value;}
565 inline void ValType::put (ostream&, const void*)
566  {}
567 
568 
569 inline int ValType::isDefined (const Bool* value, const Bool* undef)
570  {return *value != *undef;}
571 inline int ValType::isDefined (const Char* value, const Char* undef)
572  {return *value != *undef;}
573 inline int ValType::isDefined (const uChar* value, const uChar* undef)
574  {return *value != *undef;}
575 inline int ValType::isDefined (const Short* value, const Short* undef)
576  {return *value != *undef;}
577 inline int ValType::isDefined (const uShort* value, const uShort* undef)
578  {return *value != *undef;}
579 inline int ValType::isDefined (const Int* value, const Int* undef)
580  {return *value != *undef;}
581 inline int ValType::isDefined (const uInt* value, const uInt* undef)
582  {return *value != *undef;}
583 inline int ValType::isDefined (const Int64* value, const Int64* undef)
584  {return *value != *undef;}
585 inline int ValType::isDefined (const float* value, const float* undef)
586  {return *value != *undef;}
587 inline int ValType::isDefined (const double* value, const double* undef)
588  {return *value != *undef;}
589 inline int ValType::isDefined (const Complex* value, const Complex* undef)
590  {return *value != *undef;}
591 inline int ValType::isDefined (const DComplex* value, const DComplex* undef)
592  {return *value != *undef;}
593 inline int ValType::isDefined (const String* value, const String* undef)
594  {return *value != *undef;}
595 inline int ValType::isDefined (const void*, const void*)
596  {return 1;}
597 
598 
599 
600 } //# NAMESPACE CASACORE - END
601 
602 #endif
603 
604 
605 
static const String & strunknown()
Definition: ValType.h:350
static const String & getTypeStr(DataType)
Get the name of the data type.
static const String & strfloat()
Definition: ValType.h:318
static const Int64 undefint64
Definition: ValType.h:279
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
Definition: aipsxtype.h:38
int Int
Definition: aipstype.h:50
static DComplex undefDComplex()
Definition: ValType.h:384
static uInt undefUInt()
Definition: ValType.h:374
static const Int undefint
Definition: ValType.h:277
static int getTypeSize(DataType)
Get the size of data type (in local format).
static double undefDouble()
Definition: ValType.h:380
AipsIO is the object persistency mechanism of Casacore.
Definition: AipsIO.h:168
static const double undefdouble
Definition: ValType.h:281
static int isDefined(const Bool *value, const Bool *undef)
Check if a value is defined, i.e.
Definition: ValType.h:569
static const String & struint()
Definition: ValType.h:310
unsigned char uChar
Definition: aipstype.h:47
static const Complex undefcomplex
Definition: ValType.h:282
static const String & strint64()
Definition: ValType.h:314
static const Short undefshort
Definition: ValType.h:275
char Char
Definition: aipstype.h:46
static const String & strother()
Definition: ValType.h:346
ValType()
This class is not meant to be constructed.
static const DComplex undefdcomplex
Definition: ValType.h:283
short Short
Definition: aipstype.h:48
Data types and their undefined values.
Definition: ValType.h:79
static uShort undefUShort()
Definition: ValType.h:370
static Bool isPromotable(DataType from, DataType to)
Test if a data type can be promoted to another.
static const float undeffloat
Definition: ValType.h:280
static const String & strshort()
Definition: ValType.h:298
static const String & strrecord()
Definition: ValType.h:338
static const String & strdcomplex()
Definition: ValType.h:330
static Short undefShort()
Definition: ValType.h:368
static const uInt undefuint
Definition: ValType.h:278
static const String undefstring
Definition: ValType.h:284
Referenced counted pointer for constant data.
Definition: VisModelData.h:42
static const String & strtable()
Definition: ValType.h:342
static void get(AipsIO &, Bool *)
Get the value from AipsIO.
Definition: ValType.h:510
static ObjCompareFunc * getCmpFunc(DataType)
Get the pointer to the routine which compares two values.
static Int64 undefInt64()
Definition: ValType.h:376
static const String & strushort()
Definition: ValType.h:302
static DataType getType(const Bool *)
Get the data type code for this type as the function&#39;s return value.
Definition: ValType.h:419
bool Bool
Define the standard types used by Casacore.
Definition: aipstype.h:42
static Char undefChar()
Definition: ValType.h:364
static const Char undefchar
Definition: ValType.h:273
static Int undefInt()
Definition: ValType.h:372
static const uChar undefuchar
Definition: ValType.h:274
static void put(AipsIO &, const Bool *)
Put the value into AipsIO.
Definition: ValType.h:481
static float undefFloat()
Definition: ValType.h:378
static void getUndef(Bool *)
Get the &quot;undefined value&quot; for this data type in the argument.
Definition: ValType.h:390
A hierarchical collection of named fields of various types.
Definition: TableRecord.h:182
static const String & strstring()
Definition: ValType.h:334
static String undefString()
Definition: ValType.h:386
static const String & struchar()
Definition: ValType.h:294
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.
String: the storage and methods of handling collections of characters.
Definition: String.h:223
static const String & strint()
Definition: ValType.h:306
static CountedPtr< BaseCompare > getCmpObj(DataType)
Get the object which compares two values.
static Complex undefComplex()
Definition: ValType.h:382
static int getCanonicalSize(DataType, Bool BECanonical=True)
Get the size of data type in canonical format.
static const String & strbool()
Definition: ValType.h:286
static const String & strchar()
Definition: ValType.h:290
const Bool True
Definition: aipstype.h:43
static uChar undefUChar()
Definition: ValType.h:366
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.
unsigned int uInt
Definition: aipstype.h:51
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...
Definition: Conversion.h:100
static const uShort undefushort
Definition: ValType.h:276
unsigned short uShort
Definition: aipstype.h:49
static Bool undefBool()
Get the &quot;undefined value&quot; for this data type as the function&#39;s return value.
Definition: ValType.h:362
static const String & strcomplex()
Definition: ValType.h:326
static const Bool undefbool
Definition: ValType.h:272
static const String & strdouble()
Definition: ValType.h:322
#define casacore
&lt;X11/Intrinsic.h&gt; #defines true, false, casacore::Bool, and String.
Definition: X11Intrinsic.h:42