28 #ifndef CASA_QUANTUMHOLDER_H
29 #define CASA_QUANTUMHOLDER_H
42 class RecordInterface;
45 template <
class T>
class Vector;
46 template <
class T>
class Array;
const Quantum< Array< Float > > & asQuantumArrayFloat()
Bool isQuantumComplex() const
A 1-D Specialization of the Array class.
Base for Quantities (i.e. dimensioned values)
virtual Bool fromRecord(String &error, const RecordInterface &in)
Create a Quantum from a record or a string.
const Quantum< Vector< DComplex > > & asQuantumVectorDComplex()
QuantumHolder()
Creates an empty holder.
Bool isQuantumVectorDouble() const
Bool isQuantumArrayDouble() const
Hold and delete pointers not deleted by object destructors.
A holder for Quantums to enable record conversions.
PtrHolder< QBase > hold_p
Pointer to a Quantity.
void toComplex(const uInt &tp)
Convert to a different complex scalar quantum.
virtual Record toRecord() const
this version throws an exception or returns the result Record.
Bool isQuantumFloat() const
Bool isQuantumArrayDComplex() const
Int nelements() const
Get number of numeric elements (1 if scalar, else vector length) or dimensions (0 if scalar) ...
const Quantum< Array< DComplex > > & asQuantumArrayDComplex()
Bool isQuantumDComplex() const
Bool isQuantumArrayComplex() const
const Quantum< Float > & asQuantumFloat()
Bool isQuantumVectorComplex() const
const Quantum< Double > & asQuantity()
void toReal(const uInt &tp)
Convert to a different real scalar quantum.
const Quantum< DComplex > & asQuantumDComplex()
const Quantum< Vector< Float > > & asQuantumVectorFloat()
A hierarchical collection of named fields of various types.
bool Bool
Define the standard types used by Casacore.
const Quantum< Vector< Int > > & asQuantumVectorInt()
Bool isQuantumDouble() const
Quantities (i.e. dimensioned values)
template <class T, class U> class vector;
const Quantum< Array< Int > > & asQuantumArrayInt()
const Quantum< Array< Complex > > & asQuantumArrayComplex()
const Quantum< Vector< Double > > & asQuantumVectorDouble()
Bool isQuantumVectorInt() const
virtual Bool fromString(String &error, const String &in)
Initialise the class from a String representation.
const Quantum< Array< Double > > & asQuantumArrayDouble()
QuantumHolder & operator=(const QuantumHolder &other)
Assignment (copy semantics)
Bool isEmpty() const
Check if it holds a Quantity.
Bool isQuantumInt() const
String: the storage and methods of handling collections of characters.
Bool isQuantumVectorDComplex() const
const Quantum< Vector< Complex > > & asQuantumVectorComplex()
Bool isQuantumVectorFloat() const
const Quantum< Complex > & asQuantumComplex()
Abstract base class for Record classes.
virtual const String & ident() const
Return identification.
void toVector()
Convert scalar to Vector.
const Quantum< Double > & asQuantumDouble()
const QBase & asQuantum() const
Get a Quantum from the holder (with lifetime as long as holder exists).
Bool isQuantumArrayFloat() const
const Quantum< Int > & asQuantumInt()
void toArray()
Convert scalar to Array.
Bool isQuantumArrayInt() const
#define casacore
<X11/Intrinsic.h> #defines true, false, casacore::Bool, and String.