AttValPoiTol.h
Classes
- AttributeValuePoiTol -- Templated class for aliased, tolerant AttributeValues. (full description)
Interface
- Public Members
- AttributeValuePoiTol(T* value, const T &tolerance, const Bool strict)
- AttributeValuePoiTol(Vector<T>* value, const T &tolerance, const Bool strict)
- AttributeValuePoiTol(const AttributeValuePoiTol<T> &other)
- virtual ~AttributeValuePoiTol()
- const AttributeValuePoiTol<T>& operator=(const AttributeValuePoiTol<T> &other)
- virtual AttributeValueBase *clone() const
- virtual void operator+=(const AttributeValueBase &other)
- virtual void setValue(const T& value)
- virtual void setValue(const Vector<T>& value)
- virtual DataType getPointerType() const
- virtual String className() const
- Private Members
- void updatePointerValue() const
- const AttributeValuePoiTol<T>& myCast (const AttributeValueBase& other) const
- AttributeValuePoiTol()
Review Status
- Date Reviewed:
- yyyy/mm/dd
- Programs:
- Tests:
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
Member Description
AttributeValuePoiTol(T* value, const T &tolerance, const Bool strict)
Constructor for a pointer to a scalar, and a tolerance.
Constructor for a pointer to a Vector, and a scalar
tolerance.
Copy constructor.
Destructor.
const AttributeValuePoiTol<T>& operator=(const AttributeValuePoiTol<T> &other)
Assignment operator.
Return a new copy of the AttributeValuePoiTol (virtual constructor).
Add other to *this. Needs to over-ride
base class definition because the pointers need to be
dereferenced prior to addition.
virtual void setValue(const T& value)
virtual void setValue(const Vector<T>& value)
Change the value of the AttributeValue.
Get the DataType of the aliased variable.
Return class name
Update the variable that is aliased to the AttributeValuePoiTol.
const AttributeValuePoiTol<T>& myCast (const AttributeValueBase& other) const
Cast from Base class
Default constructor