casa  $Rev:20696$
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines
Public Member Functions | Private Member Functions | Private Attributes
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

List of all members.

Public Member Functions

 AttributeValuePoiTol (T *value, const T &tolerance, const Bool strict)
 Constructor for a pointer to a scalar, and a tolerance.
 AttributeValuePoiTol (Vector< T > *value, const T &tolerance, const Bool strict)
 Constructor for a pointer to a Vector, and a scalar tolerance.
 AttributeValuePoiTol (const AttributeValuePoiTol< T > &other)
 Copy constructor.
virtual ~AttributeValuePoiTol ()
 Destructor.
const AttributeValuePoiTol< T > & operator= (const AttributeValuePoiTol< T > &other)
 Assignment operator.
virtual AttributeValueBaseclone () const
 Return a new copy of the AttributeValuePoiTol (virtual constructor).
virtual void operator+= (const AttributeValueBase &other)
 Add other to *this.
virtual void setValue (const T &value)
 Change the value of the AttributeValue.
virtual void setValue (const Vector< T > &value)
virtual DataType getPointerType () const
 Get the DataType of the aliased variable.
virtual String className () const
 Return class name.

Private Member Functions

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

Private Attributes

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

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 Bool  strict 
)

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

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

Constructor for a pointer to a 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 String casa::AttributeValuePoiTol< T >::className ( ) const [inline, virtual]

Return class name.

Reimplemented from casa::AttributeValueTol< T >.

Definition at line 113 of file AttValPoiTol.h.

References String.

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 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.

Reimplemented from casa::AttributeValue< T >.

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 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>
DataType casa::AttributeValuePoiTol< T >::itsPointerType [private]

The pointer DataType.

Definition at line 129 of file AttValPoiTol.h.

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

Definition at line 125 of file AttValPoiTol.h.

template<class T>
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 124 of file AttValPoiTol.h.


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