#include <attribute.h>
Inheritance diagram for attribute:
Public Member Functions | |
attribute (TIndex _size, const T &_defaultValue) throw () | |
attribute (const attribute< T > &dupAttr) throw () | |
size_t | Size () const throw () |
T | GetValue (TIndex index) throw () |
void | SetValue (TIndex index, const T newValue) throw () |
void | SetDefaultValue (const T _defaultValue) throw () |
void | SetConstant (const T _defaultValue) throw () |
void | Assign (const T _defaultValue) throw () |
vector< T > * | GetVector () throw () |
T * | GetArray () throw () |
TIndex | MinIndex () throw () |
TIndex | MaxIndex () throw () |
T | MinValue () throw () |
T | MaxValue () throw () |
T | DefaultValue () throw () |
bool | IsConstant () throw () |
void | ComputeBounds () throw () |
void | ReleaseBounds () throw () |
Protected Member Functions | |
void | IncreaseSize (TIndex _size) throw (ERRange) |
void | SetCapacity (TIndex capacity) throw (ERRange) |
void | ReserveItems (TIndex capacity) throw (ERRange) |
void | AppendItems (TIndex numItems) throw () |
void | EraseItems (TIndex numItems) throw (ERRange) |
void | SwapItems (TIndex index1, TIndex index2) throw (ERRange) |
This class extends the STL vector functionality as follows:
|
Create a new attribute.
|
|
Clone an existing attribute.
|
|
Insert trailing items to this attribute, but only if the attribute size is > 0.
|
|
Set the default attribute value and apply it to all indices.
|
|
Determine minimal and maximal indices. This is executed with the first call to MinValue(), MaxValue(), MinIndex(), MaxIndex() and, occasionally, when attribute values are updated. |
|
Return the default value.
|
|
Erase trailing items from this attribute.
|
|
Export the encapsulated array.
|
|
Return the attribute value for a given index.
|
|
Export the encapsulated vector.
|
|
Increase the attribute size to a given value.
|
|
Check if a vector representation is present and needed.
|
|
Return the maximum index which achieves the maximal value.
|
|
Return the maximal represented attribute value.
|
|
Return the minimum index which achieves the minimal value.
|
|
Return the minimal represented attribute value.
|
|
Invalidate the minimal and maximal indices. This is occasionally called by SetValue() and EraseItems(). It needs to be called explicitly when a vector or array is exported and values are manipulated |
|
Set the attribute capacity, but only if the attribute size is > 0.
|
|
Set the attribute capacity, even if the attribute size is == 0.
|
|
Set the default attribute value and apply it to all indices.
|
|
Set the default attribute value.
|
|
Set the attribute value for a given index.
|
|
Return the size of the encapsulated vector.
|
|
Swap two attribute values represented by the encapsulated vector.
|