casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Static Public Member Functions
casa::TBData Class Reference

Data types used for loaded data. More...

#include <TBData.h>

Inheritance diagram for casa::TBData:
casa::TBArrayData casa::TBDataBool casa::TBDataChar casa::TBDataComplex casa::TBDataDate casa::TBDataDComplex casa::TBDataDouble casa::TBDataFloat casa::TBDataInt casa::TBDataRecord casa::TBDataShort casa::TBDataString casa::TBDataUChar casa::TBDataUInt

List of all members.

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 RecordasRecord ()=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 TBDatacreate (String value, String type)
 Creates and returns a TBData object representing the given value and type.
static TBDatacreate (TBArray *array, String type)
 Creates a TBArrayData object containing the data in the given TBArray object with the given type.
static TBDatacreate (TBData &data)
 Creates and returns a copy of the given TBData.

Detailed Description

Data types used for loaded data.

Synopsis

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.

Definition at line 54 of file TBData.h.


Constructor & Destructor Documentation

Default Constructor.

virtual casa::TBData::~TBData ( ) [virtual]

Member Function Documentation

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]
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]

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 String form.

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]
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.


The documentation for this class was generated from the following file: