casa
5.7.0-16
|
Implementation of TBArrayData for int array data. More...
#include <TBData.h>
Public Member Functions | |
TBArrayDataInt () | |
Default constructor. More... | |
TBArrayDataInt (const casacore::Array< casacore::Int > &value, bool full=false) | |
Constructor that takes the value and whether or not to load (copy) the given data or not. More... | |
TBArrayDataInt (TBData &data) | |
Constructor that copies the given data if it is the correct type. More... | |
~TBArrayDataInt () | |
TBData * | dataAt (std::vector< int > d) |
See TBArrayData::dataAt(). More... | |
casacore::Array< casacore::Int > & | data () |
Returns the value. More... | |
casacore::String | asString () |
Returns the casacore::String representation of this array. More... | |
void | load (const casacore::Array< casacore::Int > &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 int 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... | |
TBData * | firstItem () |
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::Record * | asRecord () |
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::Int > | value |
Value. More... | |
Additional Inherited Members | |
Static Public Member Functions inherited from casa::TBData | |
static TBData * | create (casacore::String value, casacore::String type) |
Creates and returns a TBData object representing the given value and type. More... | |
static TBData * | create (TBArray *array, casacore::String type) |
Creates a TBArrayData object containing the data in the given TBArray object with the given type. More... | |
static TBData * | create (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... | |
Implementation of TBArrayData for int array data.
casa::TBArrayDataInt::TBArrayDataInt | ( | ) |
Default constructor.
Builds an empty, unloaded array.
casa::TBArrayDataInt::TBArrayDataInt | ( | const casacore::Array< casacore::Int > & | 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::TBArrayDataInt::TBArrayDataInt | ( | TBData & | data | ) |
Constructor that copies the given data if it is the correct type.
casa::TBArrayDataInt::~TBArrayDataInt | ( | ) |
|
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.
|
virtual |
Returns false if the given data is not of type int.
Implements casa::TBArrayData.
See TBArrayData::containsBetween().
Returns false if either data is not of type int.
Implements casa::TBArrayData.
|
virtual |
See TBArrayData::containsGreaterThan().
Returns false if either data is not of type int.
Implements casa::TBArrayData.
|
virtual |
See TBArrayData::containsLessThan().
Returns false if either data is not of type int.
Implements casa::TBArrayData.
|
inline |
|
virtual |
|
inlinevirtual |
Returns the int array type.
Implements casa::TBData.
Definition at line 1349 of file TBData.h.
References casa::TBConstants::TYPE_ARRAY_INT.
void casa::TBArrayDataInt::load | ( | const casacore::Array< casacore::Int > & | value | ) |
Loads the given data into the array.
|
virtual |
Releases the loaded data, if any.
Returns whether the release was successful or not.
Implements casa::TBArrayData.
|
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.
|
virtual |
See TBArrayData::to1DString().
Implements casa::TBArrayData.
|
private |