casa::AttributeValuePoiTol< T > Class Template Reference
[Display_internal_classes]

#include <AttValPoiTol.h>

Inheritance diagram for casa::AttributeValuePoiTol< T >:

Inheritance graph
[legend]
Collaboration diagram for casa::AttributeValuePoiTol< T >:

Collaboration graph
[legend]
List of all members.

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.

To Do

Definition at line 73 of file AttValPoiTol.h.

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 DataType getPointerType () const
 Get the DataType of the aliased variable.
virtual String className () const
 Return class name.
virtual void setValue (const T &value)
 Change the value of the AttributeValue.
virtual void setValue (const Vector< T > &value)

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

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


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>
const AttributeValuePoiTol<T>& casa::AttributeValuePoiTol< T >::operator= ( const AttributeValuePoiTol< T > &  other  ) 

Assignment operator.

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 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>
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>
virtual DataType casa::AttributeValuePoiTol< T >::getPointerType (  )  const [virtual]

Get the DataType of the aliased variable.

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>
void casa::AttributeValuePoiTol< T >::updatePointerValue (  )  const [private]

Update the variable that is aliased to the AttributeValuePoiTol.

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

Cast from Base class.

Reimplemented from casa::AttributeValue< T >.


Member Data Documentation

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.

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

Definition at line 125 of file AttValPoiTol.h.

template<class T>
DataType casa::AttributeValuePoiTol< T >::itsPointerType [private]

The pointer DataType.

Definition at line 129 of file AttValPoiTol.h.


The documentation for this class was generated from the following file:
Generated on Thu Aug 27 21:35:18 2009 for NRAOCASA by  doxygen 1.5.1