28 #ifndef CASA_QUANTUMHOLDER_H
29 #define CASA_QUANTUMHOLDER_H
43 class RecordInterface;
45 template <
class Qtype>
class Quantum;
const Quantum< Array< Float > > & asQuantumArrayFloat()
Bool isQuantumComplex() const
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
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