casa
5.7.0-16
|
A holder for a value of any basic type. More...
#include <ValueHolderRep.h>
Static Public Member Functions | |
static ValueHolderRep * | fromRecord (const Record &rec, const RecordFieldId &) |
Construct the object from the value in a record. More... | |
Private Member Functions | |
ValueHolderRep (const ValueHolderRep &) | |
Forbid copy ctor and assignment. More... | |
ValueHolderRep & | operator= (const ValueHolderRep &) |
Private Attributes | |
uInt | itsNdim |
DataType | itsType |
union { | |
Bool itsBool | |
Int64 itsInt64 | |
Float itsFloat | |
Double itsDouble | |
void * itsPtr | |
}; | |
A holder for a value of any basic type.
Internal
Class ValueHolderRep is the letter class for the envelope class ValueHolder. See that class for more information.
Copying ValueHolders should be as cheap as possible, so a counted referenced letter class is used.
Definition at line 65 of file ValueHolderRep.h.
|
explicit |
Create the object for the given value.
|
explicit |
|
explicit |
|
explicit |
|
explicit |
|
explicit |
|
explicit |
|
explicit |
|
explicit |
|
explicit |
|
explicit |
|
explicit |
|
explicit |
|
explicit |
|
explicit |
|
explicit |
casacore::ValueHolderRep::~ValueHolderRep | ( | ) |
Destructor.
|
private |
Forbid copy ctor and assignment.
const Array<Complex> casacore::ValueHolderRep::asArrayComplex | ( | ) | const |
const Array<DComplex> casacore::ValueHolderRep::asArrayDComplex | ( | ) | const |
Bool casacore::ValueHolderRep::asBool | ( | ) | const |
Get the value.
If possible, it converts the data as needed.
Complex casacore::ValueHolderRep::asComplex | ( | ) | const |
DComplex casacore::ValueHolderRep::asDComplex | ( | ) | const |
Double casacore::ValueHolderRep::asDouble | ( | ) | const |
Float casacore::ValueHolderRep::asFloat | ( | ) | const |
Int casacore::ValueHolderRep::asInt | ( | ) | const |
Int64 casacore::ValueHolderRep::asInt64 | ( | ) | const |
const Record& casacore::ValueHolderRep::asRecord | ( | ) | const |
Short casacore::ValueHolderRep::asShort | ( | ) | const |
const String& casacore::ValueHolderRep::asString | ( | ) | const |
uChar casacore::ValueHolderRep::asuChar | ( | ) | const |
uInt casacore::ValueHolderRep::asuInt | ( | ) | const |
uShort casacore::ValueHolderRep::asuShort | ( | ) | const |
|
inline |
Get the data type (as defined in DataType.h).
Definition at line 178 of file ValueHolderRep.h.
References itsType.
|
static |
Construct the object from the value in a record.
Referenced by casacore::ValueHolder::fromRecord().
bool casacore::ValueHolderRep::operator< | ( | const ValueHolderRep & | right | ) | const |
Compare two ValueHolder objects.
They must have the same data type.
|
private |
void casacore::ValueHolderRep::toRecord | ( | Record & | , |
const RecordFieldId & | |||
) | const |
Put the value as a field in a record.
std::ostream& casacore::ValueHolderRep::write | ( | std::ostream & | os | ) | const |
Write the ValueHolderRep to an output stream.
Arrays are written as normal arrays using ArrayIO.h.
union { ... } |
Bool casacore::ValueHolderRep::itsBool |
Definition at line 169 of file ValueHolderRep.h.
Double casacore::ValueHolderRep::itsDouble |
Definition at line 172 of file ValueHolderRep.h.
Float casacore::ValueHolderRep::itsFloat |
Definition at line 171 of file ValueHolderRep.h.
Int64 casacore::ValueHolderRep::itsInt64 |
Definition at line 170 of file ValueHolderRep.h.
|
private |
Definition at line 166 of file ValueHolderRep.h.
void* casacore::ValueHolderRep::itsPtr |
Definition at line 173 of file ValueHolderRep.h.
|
private |
Definition at line 167 of file ValueHolderRep.h.
Referenced by dataType().