casa
$Rev:20696$
|
Data types used for loaded data. More...
#include <TBData.h>
Public Member Functions | |
TBData () | |
Default Constructor. | |
virtual | ~TBData () |
String | displayValue () |
See TBData::asString(). | |
virtual String | asString ()=0 |
asString() must be implemented by any subclass. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
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. | |
virtual 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. | |
virtual 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. | |
virtual 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. | |
virtual void | setValue (TBData &value)=0 |
setValue() must be implemented by any subclass. | |
virtual String | getType ()=0 |
getType() must be implemented by any subclass. | |
virtual bool | equals (TBData *data)=0 |
equals() must be implemented by any subclass. | |
Static Public Member Functions | |
static TBData * | create (String value, String type) |
Creates and returns a TBData object representing the given value and type. | |
static TBData * | create (TBArray *array, String type) |
Creates a TBArrayData object containing the data in the given TBArray object with the given type. | |
static TBData * | create (TBData &data) |
Creates and returns a copy of the given TBData. |
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.
Default Constructor.
virtual casa::TBData::~TBData | ( | ) | [virtual] |
virtual bool casa::TBData::asBool | ( | ) | [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.
virtual char casa::TBData::asChar | ( | ) | [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.
virtual pair<float, float> casa::TBData::asComplex | ( | ) | [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.
virtual pair<double, double> casa::TBData::asDComplex | ( | ) | [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.
virtual double casa::TBData::asDouble | ( | ) | [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.
virtual float casa::TBData::asFloat | ( | ) | [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.
virtual int casa::TBData::asInt | ( | ) | [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.
virtual Record* casa::TBData::asRecord | ( | ) | [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.
virtual short int casa::TBData::asShort | ( | ) | [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.
virtual String casa::TBData::asString | ( | ) | [pure virtual] |
asString() must be implemented by any subclass.
Returns this data value in String form. This method is especially important because the browser uses this 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.
virtual unsigned char casa::TBData::asUChar | ( | ) | [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.
virtual unsigned int casa::TBData::asUInt | ( | ) | [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 TBData* casa::TBData::create | ( | String | value, |
String | type | ||
) | [static] |
static TBData* casa::TBData::create | ( | TBArray * | array, |
String | type | ||
) | [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(String, String), but its use is NOT encouraged.
static TBData* casa::TBData::create | ( | TBData & | data | ) | [static] |
Creates and returns a copy of the given TBData.
virtual bool casa::TBData::equals | ( | TBData * | data | ) | [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.
virtual String casa::TBData::getType | ( | ) | [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.
virtual void casa::TBData::setValue | ( | TBData & | value | ) | [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.