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

Implementation of TBArrayData for unsigned character array data. More...

#include <TBData.h>

Inheritance diagram for casa::TBArrayDataUChar:
casa::TBArrayData casa::TBData

Public Member Functions

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

Definition at line 1593 of file TBData.h.

Constructor & Destructor Documentation

casa::TBArrayDataUChar::TBArrayDataUChar ( )

Default constructor.

Builds an empty, unloaded array.

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

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

casa::TBArrayDataUChar::~TBArrayDataUChar ( )

Member Function Documentation

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

See TBArrayData::contains().

Returns false if the given data is not of type unsigned char.

Implements casa::TBArrayData.

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

See TBArrayData::containsBetween().

Returns false if either data is not of type unsigned character.

Implements casa::TBArrayData.

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

See TBArrayData::containsGreaterThan().

Returns false if either data is not of type unsigned character.

Implements casa::TBArrayData.

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

See TBArrayData::containsLessThan().

Returns false if either data is not of type unsigned character.

Implements casa::TBArrayData.

casacore::Array<casacore::uChar>& casa::TBArrayDataUChar::data ( )
inline

Returns the value.

Definition at line 1613 of file TBData.h.

References value.

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

See TBArrayData::dataAt().

Returns data of type unsigned character.

Implements casa::TBArrayData.

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

Returns the unsigned character array type.

Implements casa::TBData.

Definition at line 1633 of file TBData.h.

References casa::TBConstants::TYPE_ARRAY_UCHAR.

void casa::TBArrayDataUChar::load ( const casacore::Array< casacore::uChar > &  value)

Loads the given data into the array.

bool casa::TBArrayDataUChar::release ( )
virtual

Releases the loaded data, if any.

Returns whether the release was successful or not.

Implements casa::TBArrayData.

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

Member Data Documentation

casacore::Array<casacore::uChar> casa::TBArrayDataUChar::value
private

Value.

Definition at line 1656 of file TBData.h.

Referenced by data().


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