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::TBArrayDataFloat Class Reference

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

#include <TBData.h>

Inheritance diagram for casa::TBArrayDataFloat:
casa::TBArrayData casa::TBData

Public Member Functions

 TBArrayDataFloat ()
 Default constructor. More...
 
 TBArrayDataFloat (const casacore::Array< casacore::Float > &value, bool full=false)
 Constructor that takes the value and whether or not to load (copy) the given data or not. More...
 
 TBArrayDataFloat (TBData &data)
 Constructor that copies the given data if it is the correct type. More...
 
 ~TBArrayDataFloat ()
 
TBDatadataAt (std::vector< int > d)
 See TBArrayData::dataAt(). More...
 
casacore::Array
< casacore::Float > & 
data ()
 Returns the value. More...
 
casacore::String asString ()
 Returns the casacore::String representation of this array. More...
 
void load (const casacore::Array< casacore::Float > &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 float 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::Floatvalue
 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 float array data.

Definition at line 1238 of file TBData.h.

Constructor & Destructor Documentation

casa::TBArrayDataFloat::TBArrayDataFloat ( )

Default constructor.

Builds an empty, unloaded array.

casa::TBArrayDataFloat::TBArrayDataFloat ( const casacore::Array< casacore::Float > &  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::TBArrayDataFloat::TBArrayDataFloat ( TBData data)

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

casa::TBArrayDataFloat::~TBArrayDataFloat ( )

Member Function Documentation

casacore::String casa::TBArrayDataFloat::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::TBArrayDataFloat::contains ( TBData data)
virtual

See TBArrayData::contains().

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

Implements casa::TBArrayData.

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

See TBArrayData::containsBetween().

Returns false if either data is not of type float.

Implements casa::TBArrayData.

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

See TBArrayData::containsGreaterThan().

Returns false if either data is not of type float.

Implements casa::TBArrayData.

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

See TBArrayData::containsLessThan().

Returns false if either data is not of type float.

Implements casa::TBArrayData.

casacore::Array<casacore::Float>& casa::TBArrayDataFloat::data ( )
inline

Returns the value.

Definition at line 1258 of file TBData.h.

References value.

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

See TBArrayData::dataAt().

Returns data of type float.

Implements casa::TBArrayData.

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

Returns the float array type.

Implements casa::TBData.

Definition at line 1278 of file TBData.h.

References casa::TBConstants::TYPE_ARRAY_FLOAT.

void casa::TBArrayDataFloat::load ( const casacore::Array< casacore::Float > &  value)

Loads the given data into the array.

bool casa::TBArrayDataFloat::release ( )
virtual

Releases the loaded data, if any.

Returns whether the release was successful or not.

Implements casa::TBArrayData.

void casa::TBArrayDataFloat::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::TBArrayDataFloat::to1DString ( )
virtual

Member Data Documentation

casacore::Array<casacore::Float> casa::TBArrayDataFloat::value
private

Value.

Definition at line 1301 of file TBData.h.

Referenced by data().


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