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

Templated class for aliased, tolerant AttributeValues. More...

#include <AttValPoiTol.h>

Inheritance diagram for casa::AttributeValuePoiTol< T >:
casa::AttributeValueTol< T > casa::AttributeValue< T > casa::AttributeValueBase

Public Member Functions

 AttributeValuePoiTol (T *value, const T &tolerance, const casacore::Bool strict)
 Constructor for a pointer to a scalar, and a tolerance. More...
 
 AttributeValuePoiTol (casacore::Vector< T > *value, const T &tolerance, const casacore::Bool strict)
 Constructor for a pointer to a casacore::Vector, and a scalar tolerance. More...
 
 AttributeValuePoiTol (const AttributeValuePoiTol< T > &other)
 Copy constructor. More...
 
virtual ~AttributeValuePoiTol ()
 Destructor. More...
 
const AttributeValuePoiTol< T > & operator= (const AttributeValuePoiTol< T > &other)
 Assignment operator. More...
 
virtual AttributeValueBaseclone () const
 Return a new copy of the AttributeValuePoiTol (virtual constructor). More...
 
virtual void operator+= (const AttributeValueBase &other)
 Add other to *this. More...
 
virtual void setValue (const T &value)
 Change the value of the AttributeValue. More...
 
virtual void setValue (const casacore::Vector< T > &value)
 
virtual casacore::DataType getPointerType () const
 Get the DataType of the aliased variable. More...
 
virtual casacore::String className () const
 Return class name. More...
 
- Public Member Functions inherited from casa::AttributeValueTol< T >
 AttributeValueTol (const T &value, const T &tolerance, const casacore::Bool strict)
 Constructor for a scalar, with specified scalar tolerance and strictness. More...
 
 AttributeValueTol (const casacore::Vector< T > &value, const T &tolerance, const casacore::Bool strict)
 Constructor for a casacore::Vector value, with specified scalar tolerance and strictness. More...
 
 AttributeValueTol (const AttributeValueTol< T > &other)
 Copy contructor. More...
 
virtual ~AttributeValueTol ()
 Destructor. More...
 
const AttributeValueTol< T > & operator= (const AttributeValueTol< T > &other)
 Assignment operator. More...
 
virtual void setTolerance (T value)
 Change or retrieve the scalar tolerance. More...
 
virtual T getTolerance () const
 
- Public Member Functions inherited from casa::AttributeValue< T >
 AttributeValue (const T &value, const casacore::Bool strict)
 Construct from a scalar value. More...
 
 AttributeValue (const casacore::Vector< T > &value, const casacore::Bool strict)
 Construct from a casacore::Vector. More...
 
virtual ~AttributeValue ()
 Destructor. More...
 
 AttributeValue (const AttributeValue< T > &other)
 Copy constructor. More...
 
const AttributeValue< T > & operator= (const AttributeValue< T > &other)
 Assignment (copy semantics) More...
 
virtual casacore::Vector< T > getValue () const
 
virtual void print (std::ostream &os)
 
- Public Member Functions inherited from casa::AttributeValueBase
 AttributeValueBase (AttValue::ValueType type, casacore::Bool strict)
 Constructor. More...
 
 AttributeValueBase (const AttributeValueBase &other)
 Copy constructor. More...
 
virtual ~AttributeValueBase ()
 Destructor. More...
 
const AttributeValueBaseoperator= (const AttributeValueBase &other)
 Copy assignment. More...
 
AttValue::ValueType getType () const
 Get the type of the value stored. More...
 
casacore::Bool operator== (const AttributeValueBase &other) const
 Check for equality (and inequality) of two objects derived from AttributeValueBase. More...
 
casacore::Bool operator!= (const AttributeValueBase &other) const
 
virtual void setStrictness (const casacore::Bool &newStrict)
 Set/get the strictness state of this AttributeValue. More...
 
virtual casacore::Bool getStrictness () const
 

Private Member Functions

void updatePointerValue () const
 Update the variable that is aliased to the AttributeValuePoiTol. More...
 
const AttributeValuePoiTol< T > & myCast (const AttributeValueBase &other) const
 Cast from Base class. More...
 
 AttributeValuePoiTol ()
 Default constructor. More...
 

Private Attributes

casacore::Vector< T > * itsVectorPointerPtr
 Pointer to the aliased variable. More...
 
T * itsScalarPointerPtr
 
casacore::DataType itsPointerType
 The pointer DataType. More...
 

Additional Inherited Members

- Protected Member Functions inherited from casa::AttributeValueTol< T >
virtual casacore::Bool matches (const AttributeValueBase &other) const
 Implements when the values of two Attributes match, taking note of tolerance in this particular implementation. More...
 
- Protected Member Functions inherited from casa::AttributeValue< T >
const AttributeValue< T > & myCast (const AttributeValueBase &other) const
 Cast from Base class. More...
 
- Protected Member Functions inherited from casa::AttributeValueBase
virtual void setType (const AttValue::ValueType &newType)
 Set the type of the value stored. More...
 
casacore::Bool myMatch (const AttributeValueBase &other) const
 Check that private data match. More...
 
- Protected Attributes inherited from casa::AttributeValueBase
AttValue::ValueType itsValueType
 The type of what is stored. More...
 
casacore::Bool itsStrictness
 Whether the match is strict or not. More...
 

Detailed Description

template<class T>
class casa::AttributeValuePoiTol< T >

Templated class for aliased, tolerant AttributeValues.

Intended use:

Internal

Review Status

Date Reviewed:
yyyy/mm/dd
Test programs:
tAttribute

Prerequisite

Etymology

"AttributeValuePoiTol" is a contraction of "Attribute Value", "Pointer" and "Tolerance", and stores an Attribute by aliasing it with a pointer and associating it with some tolerance.

Synopsis

An AttributeValuePoiTol combines the aliasing (via a pointer) provided by the AttributeValuePoi class, and the tolerance provided by the AttributeValueTol class. See these classes for examples.

Motivation

The motivation for this class is to be able to provide in-built tolerance and aliasing for AttributeValues.

Definition at line 73 of file AttValPoiTol.h.

Constructor & Destructor Documentation

template<class T>
casa::AttributeValuePoiTol< T >::AttributeValuePoiTol ( T *  value,
const T &  tolerance,
const casacore::Bool  strict 
)

Constructor for a pointer to a scalar, and a tolerance.

template<class T>
casa::AttributeValuePoiTol< T >::AttributeValuePoiTol ( casacore::Vector< T > *  value,
const T &  tolerance,
const casacore::Bool  strict 
)

Constructor for a pointer to a casacore::Vector, and a scalar tolerance.

template<class T>
casa::AttributeValuePoiTol< T >::AttributeValuePoiTol ( const AttributeValuePoiTol< T > &  other)

Copy constructor.

template<class T>
virtual casa::AttributeValuePoiTol< T >::~AttributeValuePoiTol ( )
virtual

Destructor.

template<class T>
casa::AttributeValuePoiTol< T >::AttributeValuePoiTol ( )
private

Default constructor.

Member Function Documentation

template<class T>
virtual casacore::String casa::AttributeValuePoiTol< T >::className ( ) const
inlinevirtual

Return class name.

Reimplemented from casa::AttributeValueTol< T >.

Definition at line 113 of file AttValPoiTol.h.

template<class T>
virtual AttributeValueBase* casa::AttributeValuePoiTol< T >::clone ( ) const
virtual

Return a new copy of the AttributeValuePoiTol (virtual constructor).

Reimplemented from casa::AttributeValueTol< T >.

template<class T>
virtual casacore::DataType casa::AttributeValuePoiTol< T >::getPointerType ( ) const
virtual

Get the DataType of the aliased variable.

template<class T>
const AttributeValuePoiTol<T>& casa::AttributeValuePoiTol< T >::myCast ( const AttributeValueBase other) const
private

Cast from Base class.

template<class T>
virtual void casa::AttributeValuePoiTol< T >::operator+= ( const AttributeValueBase other)
virtual

Add other to *this.

Needs to over-ride base class definition because the pointers need to be dereferenced prior to addition.

Reimplemented from casa::AttributeValue< T >.

template<class T>
const AttributeValuePoiTol<T>& casa::AttributeValuePoiTol< T >::operator= ( const AttributeValuePoiTol< T > &  other)

Assignment operator.

template<class T>
virtual void casa::AttributeValuePoiTol< T >::setValue ( const T &  value)
virtual

Change the value of the AttributeValue.

Reimplemented from casa::AttributeValue< T >.

template<class T>
virtual void casa::AttributeValuePoiTol< T >::setValue ( const casacore::Vector< T > &  value)
virtual

Reimplemented from casa::AttributeValue< T >.

template<class T>
void casa::AttributeValuePoiTol< T >::updatePointerValue ( ) const
private

Update the variable that is aliased to the AttributeValuePoiTol.

Member Data Documentation

template<class T>
casacore::DataType casa::AttributeValuePoiTol< T >::itsPointerType
private

The pointer DataType.

Definition at line 131 of file AttValPoiTol.h.

template<class T>
T* casa::AttributeValuePoiTol< T >::itsScalarPointerPtr
private

Definition at line 127 of file AttValPoiTol.h.

template<class T>
casacore::Vector<T>* casa::AttributeValuePoiTol< T >::itsVectorPointerPtr
private

Pointer to the aliased variable.

Only one is ever active depending upon how the object was constructed. The memory allocated to these pointers does not belong to this object.

Definition at line 126 of file AttValPoiTol.h.


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