30 #ifndef CASA_VALUEHOLDER_H
31 #define CASA_VALUEHOLDER_H
34 #include <casacore/casa/aips.h>
35 #include <casacore/casa/Containers/ValueHolderRep.h>
36 #include <casacore/casa/Arrays/Array.h>
37 #include <casacore/casa/Utilities/CountedPtr.h>
217 {
return vh.
itsRep->write (os); }
226 {
return itsRep->dataType(); }
228 {
return itsRep->toRecord (rec,
id); }
233 {
return itsRep->asBool(); }
235 {
return itsRep->asuChar(); }
237 {
return itsRep->asShort(); }
239 {
return itsRep->asuShort(); }
241 {
return itsRep->asInt(); }
243 {
return itsRep->asuInt(); }
245 {
return itsRep->asInt64(); }
247 {
return itsRep->asFloat(); }
249 {
return itsRep->asDouble(); }
251 {
return itsRep->asComplex(); }
253 {
return itsRep->asDComplex(); }
255 {
return itsRep->asString(); }
257 {
return itsRep->asArrayBool(); }
259 {
return itsRep->asArrayuChar(); }
261 {
return itsRep->asArrayShort(); }
263 {
return itsRep->asArrayuShort(); }
265 {
return itsRep->asArrayInt(); }
267 {
return itsRep->asArrayuInt(); }
269 {
return itsRep->asArrayInt64(); }
271 {
return itsRep->asArrayFloat(); }
273 {
return itsRep->asArrayDouble(); }
275 {
return itsRep->asArrayComplex(); }
277 {
return itsRep->asArrayDComplex(); }
279 {
return itsRep->asArrayString(); }
281 {
return itsRep->asRecord(); }
Referenced counted pointer for constant data.
String: the storage and methods of handling collections of characters.
static ValueHolderRep * fromRecord(const Record &rec, const RecordFieldId &)
Construct the object from the value in a record.
void getValue(Float &value) const
ValueHolder(const Array< uChar > &value)
ValueHolder(uShort value)
void getValue(Complex &value) const
Complex asComplex() const
const Array< Complex > asArrayComplex() const
ValueHolder(const Array< uInt > &value)
const Array< String > asArrayString() const
~ValueHolder()
Destructor.
ValueHolder(ValueHolderRep *rep)
Create a ValueHolder from a ValueHolderRep.
CountedPtr< ValueHolderRep > itsRep
const Array< DComplex > asArrayDComplex() const
ValueHolder(const Array< Bool > &value)
ValueHolder(uInt ndim, Bool dummy)
Create an empty N-dim array (gets type TpOther).
void toRecord(Record &, const RecordFieldId &) const
Put the value as a field in a record.
void getValue(Array< Float > &value) const
ValueHolder(const Array< DComplex > &value)
ValueHolder(const DComplex &value)
ValueHolder(const Array< Float > &value)
void getValue(Array< uShort > &value) const
static ValueHolder fromRecord(const Record &, const RecordFieldId &)
Construct the object from the value in a record.
void getValue(String &value) const
void getValue(Array< uChar > &value) const
Bool isNull() const
Is this a null object?
const Array< Int64 > asArrayInt64() const
void getValue(Bool &value) const
Get the data in a way useful for templates.
void getValue(Array< String > &value) const
ValueHolder(const Array< String > &value)
ValueHolder(const Array< Short > &value)
void getValue(Array< DComplex > &value) const
const Array< uChar > asArrayuChar() const
ValueHolder(const Array< Complex > &value)
const Array< uShort > asArrayuShort() const
ValueHolder(const Array< Int > &value)
const Array< uInt > asArrayuInt() const
ValueHolder(const Complex &value)
void getValue(uShort &value) const
void getValue(Array< Short > &value) const
ValueHolder(const ValueHolder &)
Copy constructor (reference semantics).
const Record & asRecord() const
void getValue(DComplex &value) const
ValueHolder()
Construct a null object.
ValueHolder(const Record &value)
const String & asString() const
void getValue(Short &value) const
friend std::ostream & operator<<(std::ostream &os, const ValueHolder &vh)
Write the ValueHolder to an output stream.
void getValue(Array< Double > &value) const
void getValue(Array< uInt > &value) const
void getValue(Array< Bool > &value) const
void getValue(Double &value) const
const Array< Float > asArrayFloat() const
const Array< Bool > asArrayBool() const
void getValue(Int &value) const
void getValue(Array< Int > &value) const
DataType dataType() const
Get the data type (as defined in DataType.h).
bool operator<(const ValueHolder &right) const
Compare two ValueHolder objects.
void getValue(uInt &value) const
const Array< Short > asArrayShort() const
ValueHolder(const Array< Double > &value)
ValueHolder & operator=(const ValueHolder &)
Assignment (reference semantics).
Bool asBool() const
Get the value.
const Array< Int > asArrayInt() const
const Array< Double > asArrayDouble() const
ValueHolder(Double value)
void getValue(Int64 &value) const
DComplex asDComplex() const
ValueHolder(const Char *value)
void getValue(uChar &value) const
ValueHolder(const Array< uShort > &value)
ValueHolder(Bool value)
Create the object for the given value.
ValueHolder(const String &value)
ValueHolder(const Array< Int64 > &value)
void getValue(Array< Int64 > &value) const
void getValue(Array< Complex > &value) const
std::complex< Float > Complex
std::complex< Double > DComplex
this file contains all the compiler specific defines
LatticeExprNode ndim(const LatticeExprNode &expr)
1-argument function to get the dimensionality of a lattice.
long long Int64
Define the extra non-standard types used by Casacore (like proposed uSize, Size)
bool Bool
Define the standard types used by Casacore.
LatticeExprNode value(const LatticeExprNode &expr)
This function returns the value of the expression without a mask.