casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Static Public Member Functions | List of all members
casa::TBData Class Referenceabstract

casacore::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

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

Detailed Description

casacore::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 51 of file TBData.h.

Constructor & Destructor Documentation

casa::TBData::TBData ( )

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 std::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 std::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 casacore::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 casacore::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 ( casacore::String  value,
casacore::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 casacore::String form.

static TBData* casa::TBData::create ( TBArray array,
casacore::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(casacore::String, casacore::String), but its use is NOT encouraged.

static TBData* casa::TBData::create ( TBData data)
static

Creates and returns a copy of the given TBData.

casacore::String casa::TBData::displayValue ( )
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 casacore::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: