casa  5.7.0-16
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Private Attributes | List of all members
casa::TBArrayDataDouble Class Reference

Implementation of TBArrayData for double array data. More...

#include <TBData.h>

Inheritance diagram for casa::TBArrayDataDouble:
casa::TBArrayData casa::TBData

Public Member Functions

 TBArrayDataDouble ()
 Default constructor. More...
 
 TBArrayDataDouble (const casacore::Array< casacore::Double > &value, bool full=false)
 Constructor that takes the value and whether or not to load (copy) the given data or not. More...
 
 TBArrayDataDouble (TBData &data)
 Constructor that copies the given data if it is the correct type. More...
 
 ~TBArrayDataDouble ()
 
TBDatadataAt (std::vector< int > d)
 See TBArrayData::dataAt(). More...
 
casacore::Array
< casacore::Double > & 
data ()
 Returns the value. More...
 
casacore::String asString ()
 Returns the casacore::String representation of this array. More...
 
void load (const casacore::Array< casacore::Double > &value)
 Loads the given data into the array. More...
 
bool release ()
 Releases the loaded data, if any. More...
 
void setDataAt (std::vector< int > d, TBData &value)
 If the array is loaded, sets the value at the given coordinates (if valid) to the given data. More...
 
casacore::String getType ()
 Returns the double array type. More...
 
bool contains (TBData *data)
 See TBArrayData::contains(). More...
 
bool containsBetween (TBData *data, TBData *data2)
 See TBArrayData::containsBetween(). More...
 
bool containsLessThan (TBData *data)
 See TBArrayData::containsLessThan(). More...
 
bool containsGreaterThan (TBData *data)
 See TBArrayData::containsGreaterThan(). More...
 
casacore::String to1DString ()
 See TBArrayData::to1DString(). More...
 
- Public Member Functions inherited from casa::TBArrayData
 TBArrayData ()
 Default Constructor. More...
 
 ~TBArrayData ()
 
std::vector< int > getShape ()
 Returns the array's shape. More...
 
bool isLoaded ()
 Returns true if the array has data loaded into it, false otherwise. More...
 
bool isOneDimensional ()
 Returns true if the array is one-dimensional, false otherwise. More...
 
bool coordIsValid (std::vector< int > d)
 Returns true if the given coordinate is a valid index for this array given its shape, false otherwise. More...
 
bool isEmpty ()
 Returns true if the array is empty (i.e., all dimensions have size 0), false otherwise. More...
 
TBDatafirstItem ()
 Returns the first item in the array, or NULL if there is no data loaded. More...
 
double asDouble ()
 Invalid operations. More...
 
float asFloat ()
 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...
 
int asInt ()
 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...
 
unsigned int asUInt ()
 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...
 
bool asBool ()
 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...
 
char asChar ()
 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...
 
unsigned char asUChar ()
 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...
 
short int asShort ()
 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...
 
std::pair< float, float > asComplex ()
 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...
 
std::pair< double, double > asDComplex ()
 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...
 
casacore::RecordasRecord ()
 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...
 
void setValue (TBData &value)
 setValue() must be implemented by any subclass. More...
 
bool equals (TBData *data)
 equals() must be implemented by any subclass. More...
 
- Public Member Functions inherited from casa::TBData
 TBData ()
 Default Constructor. More...
 
virtual ~TBData ()
 
casacore::String displayValue ()
 See TBData::asString(). More...
 

Private Attributes

casacore::Array< casacore::Doublevalue
 Value. More...
 

Additional Inherited Members

- Static Public Member Functions inherited from casa::TBData
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...
 
- Protected Attributes inherited from casa::TBArrayData
std::vector< int > shape
 casacore::Array shape. More...
 
bool loaded
 Whether data is loaded. More...
 
bool oneDim
 Whether the array is one-dimensional. More...
 

Detailed Description

Implementation of TBArrayData for double array data.

Definition at line 1167 of file TBData.h.

Constructor & Destructor Documentation

casa::TBArrayDataDouble::TBArrayDataDouble ( )

Default constructor.

Builds an empty, unloaded array.

casa::TBArrayDataDouble::TBArrayDataDouble ( const casacore::Array< casacore::Double > &  value,
bool  full = false 
)

Constructor that takes the value and whether or not to load (copy) the given data or not.

Note: data is always loaded for one-dimensional arrays.

casa::TBArrayDataDouble::TBArrayDataDouble ( TBData data)

Constructor that copies the given data if it is the correct type.

casa::TBArrayDataDouble::~TBArrayDataDouble ( )

Member Function Documentation

casacore::String casa::TBArrayDataDouble::asString ( )
virtual

Returns the casacore::String representation of this array.

For one-dimensional, loaded arrays returns the values; otherwise returns the shape and type.

Implements casa::TBArrayData.

bool casa::TBArrayDataDouble::contains ( TBData data)
virtual

See TBArrayData::contains().

Returns false if the given data is not of type double.

Implements casa::TBArrayData.

bool casa::TBArrayDataDouble::containsBetween ( TBData data,
TBData data2 
)
virtual

See TBArrayData::containsBetween().

Returns false if either data is not of type double.

Implements casa::TBArrayData.

bool casa::TBArrayDataDouble::containsGreaterThan ( TBData data)
virtual

See TBArrayData::containsGreaterThan().

Returns false if either data is not of type double.

Implements casa::TBArrayData.

bool casa::TBArrayDataDouble::containsLessThan ( TBData data)
virtual

See TBArrayData::containsLessThan().

Returns false if either data is not of type double.

Implements casa::TBArrayData.

casacore::Array<casacore::Double>& casa::TBArrayDataDouble::data ( )
inline

Returns the value.

Definition at line 1187 of file TBData.h.

References value.

TBData* casa::TBArrayDataDouble::dataAt ( std::vector< int >  d)
virtual

See TBArrayData::dataAt().

Returns data of type double.

Implements casa::TBArrayData.

casacore::String casa::TBArrayDataDouble::getType ( )
inlinevirtual

Returns the double array type.

Implements casa::TBData.

Definition at line 1207 of file TBData.h.

References casa::TBConstants::TYPE_ARRAY_DOUBLE.

void casa::TBArrayDataDouble::load ( const casacore::Array< casacore::Double > &  value)

Loads the given data into the array.

bool casa::TBArrayDataDouble::release ( )
virtual

Releases the loaded data, if any.

Returns whether the release was successful or not.

Implements casa::TBArrayData.

void casa::TBArrayDataDouble::setDataAt ( std::vector< int >  d,
TBData value 
)
virtual

If the array is loaded, sets the value at the given coordinates (if valid) to the given data.

This method is not defined if the given value is not of the correct type.

Implements casa::TBArrayData.

casacore::String casa::TBArrayDataDouble::to1DString ( )
virtual

Member Data Documentation

casacore::Array<casacore::Double> casa::TBArrayDataDouble::value
private

Value.

Definition at line 1230 of file TBData.h.

Referenced by data().


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