casa
5.7.0-16
|
casacore::Data types used for loaded data. More...
#include <TBData.h>
Public Member Functions | |
TBData () | |
Default Constructor. More... | |
virtual | ~TBData () |
casacore::String | displayValue () |
See TBData::asString(). More... | |
virtual casacore::String | asString ()=0 |
asString() must be implemented by any subclass. More... | |
virtual double | asDouble ()=0 |
asDouble() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as a double. More... | |
virtual float | asFloat ()=0 |
asFloat() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as a float. More... | |
virtual int | asInt ()=0 |
asInt() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as an int. More... | |
virtual unsigned int | asUInt ()=0 |
asUInt() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as an unsigned int. More... | |
virtual bool | asBool ()=0 |
asBool() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as a boolean. More... | |
virtual char | asChar ()=0 |
asChar() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as a char. More... | |
virtual unsigned char | asUChar ()=0 |
asUChar() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as an unsigned character. More... | |
virtual short int | asShort ()=0 |
asShort() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as a short. More... | |
virtual std::pair< float, float > | asComplex ()=0 |
asComplex() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as a complex. More... | |
virtual std::pair< double, double > | asDComplex ()=0 |
asDComplex() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as a double complex. More... | |
virtual casacore::Record * | asRecord ()=0 |
asRecord() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as a record. More... | |
virtual void | setValue (TBData &value)=0 |
setValue() must be implemented by any subclass. More... | |
virtual casacore::String | getType ()=0 |
getType() must be implemented by any subclass. More... | |
virtual bool | equals (TBData *data)=0 |
equals() must be implemented by any subclass. More... | |
Static Public Member Functions | |
static TBData * | create (casacore::String value, casacore::String type) |
Creates and returns a TBData object representing the given value and type. More... | |
static TBData * | create (TBArray *array, casacore::String type) |
Creates a TBArrayData object containing the data in the given TBArray object with the given type. More... | |
static TBData * | create (TBData &data) |
Creates and returns a copy of the given TBData. More... | |
casacore::Data types used for loaded data.
TBData is the abstract superclass for any data type that the browser knows about. The idea is to get around templates and other such unpleasantness that causes unnecessary code copying.
casa::TBData::TBData | ( | ) |
Default Constructor.
|
virtual |
|
pure virtual |
asBool() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as a boolean.
Implemented in casa::TBArrayData, casa::TBDataDate, casa::TBDataRecord, casa::TBDataDComplex, casa::TBDataComplex, casa::TBDataShort, casa::TBDataUChar, casa::TBDataChar, casa::TBDataBool, casa::TBDataUInt, casa::TBDataInt, casa::TBDataFloat, casa::TBDataDouble, and casa::TBDataString.
|
pure virtual |
asChar() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as a char.
Implemented in casa::TBArrayData, casa::TBDataDate, casa::TBDataRecord, casa::TBDataDComplex, casa::TBDataComplex, casa::TBDataShort, casa::TBDataUChar, casa::TBDataChar, casa::TBDataBool, casa::TBDataUInt, casa::TBDataInt, casa::TBDataFloat, casa::TBDataDouble, and casa::TBDataString.
|
pure virtual |
asComplex() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as a complex.
Implemented in casa::TBArrayData, casa::TBDataDate, casa::TBDataRecord, casa::TBDataDComplex, casa::TBDataComplex, casa::TBDataShort, casa::TBDataUChar, casa::TBDataChar, casa::TBDataBool, casa::TBDataUInt, casa::TBDataInt, casa::TBDataFloat, casa::TBDataDouble, and casa::TBDataString.
|
pure virtual |
asDComplex() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as a double complex.
Implemented in casa::TBArrayData, casa::TBDataDate, casa::TBDataRecord, casa::TBDataDComplex, casa::TBDataComplex, casa::TBDataShort, casa::TBDataUChar, casa::TBDataChar, casa::TBDataBool, casa::TBDataUInt, casa::TBDataInt, casa::TBDataFloat, casa::TBDataDouble, and casa::TBDataString.
|
pure virtual |
asDouble() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as a double.
Implemented in casa::TBArrayData, casa::TBDataDate, casa::TBDataRecord, casa::TBDataDComplex, casa::TBDataComplex, casa::TBDataShort, casa::TBDataUChar, casa::TBDataChar, casa::TBDataBool, casa::TBDataUInt, casa::TBDataInt, casa::TBDataFloat, casa::TBDataDouble, and casa::TBDataString.
|
pure virtual |
asFloat() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as a float.
Implemented in casa::TBArrayData, casa::TBDataDate, casa::TBDataRecord, casa::TBDataDComplex, casa::TBDataComplex, casa::TBDataShort, casa::TBDataUChar, casa::TBDataChar, casa::TBDataBool, casa::TBDataUInt, casa::TBDataInt, casa::TBDataFloat, casa::TBDataDouble, and casa::TBDataString.
|
pure virtual |
asInt() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as an int.
Implemented in casa::TBArrayData, casa::TBDataDate, casa::TBDataRecord, casa::TBDataDComplex, casa::TBDataComplex, casa::TBDataShort, casa::TBDataUChar, casa::TBDataChar, casa::TBDataBool, casa::TBDataUInt, casa::TBDataInt, casa::TBDataFloat, casa::TBDataDouble, and casa::TBDataString.
|
pure virtual |
asRecord() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as a record.
Implemented in casa::TBArrayData, casa::TBDataDate, casa::TBDataRecord, casa::TBDataDComplex, casa::TBDataComplex, casa::TBDataShort, casa::TBDataUChar, casa::TBDataChar, casa::TBDataBool, casa::TBDataUInt, casa::TBDataInt, casa::TBDataFloat, casa::TBDataDouble, and casa::TBDataString.
|
pure virtual |
asShort() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as a short.
Implemented in casa::TBArrayData, casa::TBDataDate, casa::TBDataRecord, casa::TBDataDComplex, casa::TBDataComplex, casa::TBDataShort, casa::TBDataUChar, casa::TBDataChar, casa::TBDataBool, casa::TBDataUInt, casa::TBDataInt, casa::TBDataFloat, casa::TBDataDouble, and casa::TBDataString.
|
pure virtual |
asString() must be implemented by any subclass.
Returns this data value in casacore::String form. This method is especially important because the browser uses this casacore::String to display in the GUI widgets.
Implemented in casa::TBArrayDataDComplex, casa::TBArrayDataComplex, casa::TBArrayDataShort, casa::TBArrayDataUChar, casa::TBArrayDataChar, casa::TBArrayDataBool, casa::TBArrayDataUInt, casa::TBArrayDataInt, casa::TBArrayDataFloat, casa::TBArrayDataDouble, casa::TBArrayDataString, casa::TBArrayData, casa::TBDataDate, casa::TBDataRecord, casa::TBDataDComplex, casa::TBDataComplex, casa::TBDataShort, casa::TBDataUChar, casa::TBDataChar, casa::TBDataBool, casa::TBDataUInt, casa::TBDataInt, casa::TBDataFloat, casa::TBDataDouble, and casa::TBDataString.
|
pure virtual |
asUChar() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as an unsigned character.
Implemented in casa::TBArrayData, casa::TBDataDate, casa::TBDataRecord, casa::TBDataDComplex, casa::TBDataComplex, casa::TBDataShort, casa::TBDataUChar, casa::TBDataChar, casa::TBDataBool, casa::TBDataUInt, casa::TBDataInt, casa::TBDataFloat, casa::TBDataDouble, and casa::TBDataString.
|
pure virtual |
asUInt() must be implemented by any subclass, although the returned value does not have to be valid for classes for which the value cannot be represented as an unsigned int.
Implemented in casa::TBArrayData, casa::TBDataDate, casa::TBDataRecord, casa::TBDataDComplex, casa::TBDataComplex, casa::TBDataShort, casa::TBDataUChar, casa::TBDataChar, casa::TBDataBool, casa::TBDataUInt, casa::TBDataInt, casa::TBDataFloat, casa::TBDataDouble, and casa::TBDataString.
|
static |
Creates and returns a TBData object representing the given value and type.
May return NULL if the value/type combination is invalid. NOTE: this method currently does not work for Records in casacore::String form.
|
static |
Creates a TBArrayData object containing the data in the given TBArray object with the given type.
NOTE: with the restructuring of the browser to use TBDatas rather than Strings to store data, this method should NOT be used. It is currently being used as a helper method for create(casacore::String, casacore::String), but its use is NOT encouraged.
Creates and returns a copy of the given TBData.
casacore::String casa::TBData::displayValue | ( | ) |
See TBData::asString().
|
pure virtual |
equals() must be implemented by any subclass.
Returns true if the given TBData is equal to this TBData object, false otherwise. Note: the behavior of this method is undefined if the given TBData is not of the same type as "this" TBData.
Implemented in casa::TBArrayData, casa::TBDataDate, casa::TBDataRecord, casa::TBDataDComplex, casa::TBDataComplex, casa::TBDataShort, casa::TBDataUChar, casa::TBDataChar, casa::TBDataBool, casa::TBDataUInt, casa::TBDataInt, casa::TBDataFloat, casa::TBDataDouble, and casa::TBDataString.
|
pure virtual |
getType() must be implemented by any subclass.
Returns this TBData object's type. Must be one of TBConstants::TYPE_* definitions.
Implemented in casa::TBArrayDataDComplex, casa::TBArrayDataComplex, casa::TBArrayDataShort, casa::TBArrayDataUChar, casa::TBArrayDataChar, casa::TBArrayDataBool, casa::TBArrayDataUInt, casa::TBArrayDataInt, casa::TBArrayDataFloat, casa::TBArrayDataDouble, casa::TBArrayDataString, casa::TBDataDate, casa::TBDataRecord, casa::TBDataTable, casa::TBDataDComplex, casa::TBDataComplex, casa::TBDataShort, casa::TBDataUChar, casa::TBDataChar, casa::TBDataBool, casa::TBDataUInt, casa::TBDataInt, casa::TBDataFloat, casa::TBDataDouble, and casa::TBDataString.
|
pure virtual |
setValue() must be implemented by any subclass.
Sets this data's value to the value of the given TBData. Note: the behavior of this method is undefined if the given TBData is not the same type as "this" TBData.
Implemented in casa::TBArrayData, casa::TBDataDate, casa::TBDataRecord, casa::TBDataDComplex, casa::TBDataComplex, casa::TBDataShort, casa::TBDataUChar, casa::TBDataChar, casa::TBDataBool, casa::TBDataUInt, casa::TBDataInt, casa::TBDataFloat, casa::TBDataDouble, and casa::TBDataString.