|
|
||||||
|
faudes::TAttrMap< T, Attr, Cmp > Class Template Reference Detailed Descriptiontemplate<class T, class Attr, class Cmp = std::less<T>>
|
Public Member Functions | |
TAttrMap (TBaseSet< T, Cmp > *pBaseSetRef) | |
Constructor. More... | |
virtual | ~TAttrMap (void) |
Virtual destructor. More... | |
void | AssignWithAttributes (const TBaseSet< T, Cmp > &rSourceSet) |
Copy from a TBaseSet to the associated TBaseSet, with attributes, provided that they can be casted accordingly. More... | |
const Attr * | AttributeType (void) const |
Attribute typeinfo. More... | |
Attr * | Attributep (const T &rElem) |
Get attribute reference by element. More... | |
const Attr & | Attribute (const T &rElem) const |
Get attribute by element. More... | |
void | Attribute (const T &rElem, const Type &attr) |
Set attribute. More... | |
void | Attribute (const T &rElem, const Attr &attr) |
Set attribute. More... | |
void | AttributeTry (const T &rElem, const Type &attr) |
Set attribute. More... | |
bool | Insert (const T &rElem) |
Insert element. More... | |
bool | Insert (const T &rElem, const Attr &attr) |
Insert element with attribute. More... | |
void | InsertSet (const TBaseSet< T, Cmp > &rOtherSet) |
Inserts elements from rOtherSet. More... | |
bool | Erase (const T &rElem) |
Erase Element (incl its attribute) More... | |
TBaseSet< T, Cmp >::Iterator | Erase (const typename TBaseSet< T, Cmp >::Iterator &pos) |
Erase element by iterator (incl attribute) More... | |
void | EraseSet (const TBaseSet< T, Cmp > &rOtherSet) |
Erase elements given by other set. More... | |
void | RestrictSet (const TBaseSet< T, Cmp > &rOtherSet) |
Restrict to specified subset. More... | |
Protected Types | |
typedef TBaseSet< T, Cmp >::iterator | iterator |
use TBaseSet STL iterators More... | |
typedef TBaseSet< T, Cmp >::const_iterator | const_iterator |
use TBaseSet STL iterators More... | |
typedef TBaseSet< T, Cmp >::aiterator | aiterator |
use TBaseSet STL iterators More... | |
typedef TBaseSet< T, Cmp >::const_aiterator | const_aiterator |
use TBaseSet STL iterators More... | |
Protected Attributes | |
TBaseSet< T, Cmp > * | pBaseSet |
reference to associated TBaseSet More... | |
|
protected |
use TBaseSet STL iterators
Definition at line 244 of file cfl_attrmap.h.
|
protected |
use TBaseSet STL iterators
Definition at line 247 of file cfl_attrmap.h.
|
protected |
use TBaseSet STL iterators
Definition at line 241 of file cfl_attrmap.h.
|
protected |
use TBaseSet STL iterators
Definition at line 238 of file cfl_attrmap.h.
faudes::TAttrMap< T, Attr, Cmp >::TAttrMap | ( | TBaseSet< T, Cmp > * | pBaseSetRef | ) |
|
virtual |
Virtual destructor.
Definition at line 285 of file cfl_attrmap.h.
void faudes::TAttrMap< T, Attr, Cmp >::AssignWithAttributes | ( | const TBaseSet< T, Cmp > & | rSourceSet | ) |
Copy from a TBaseSet to the associated TBaseSet, with attributes, provided that they can be casted accordingly.
rSourceSet | Set to copy from |
Definition at line 292 of file cfl_attrmap.h.
const Attr & faudes::TAttrMap< T, Attr, Cmp >::Attribute | ( | const T & | rElem | ) | const |
Get attribute by element.
This function returns a const reference to the attribute of the specified element.
rElem | Specify element |
Exception |
|
Definition at line 464 of file cfl_attrmap.h.
void faudes::TAttrMap< T, Attr, Cmp >::Attribute | ( | const T & | rElem, |
const Attr & | attr | ||
) |
Set attribute.
This method sets the attribute of the sepcified element to the given value.
rElem | Specify element |
attr | Attribute value. |
Exception |
|
Definition at line 514 of file cfl_attrmap.h.
void faudes::TAttrMap< T, Attr, Cmp >::Attribute | ( | const T & | rElem, |
const Type & | attr | ||
) |
Set attribute.
Provided that the attribute can be casted to the appropriate type, this method sets the attribute of the sepcified element to the given value.
rElem | Specify element |
attr | Attribute value. |
Exception |
|
Definition at line 481 of file cfl_attrmap.h.
Attr * faudes::TAttrMap< T, Attr, Cmp >::Attributep | ( | const T & | rElem | ) |
Get attribute reference by element.
Note that in order to produce a non-const reference this method will insert an explicit default attribute if necessary. If a const reference is sufficient, you should use Attribute(rElem) const instead.
rElem | Specify element |
Exception |
|
Definition at line 446 of file cfl_attrmap.h.
void faudes::TAttrMap< T, Attr, Cmp >::AttributeTry | ( | const T & | rElem, |
const Type & | attr | ||
) |
Set attribute.
Provided that the attribute can be casted to the appropriate type, this method sets the attribute of the sepcified element to the given value. If the cast fails, this method does nothing.
rElem | Specify element |
attr | Attribute value. |
Exception |
|
Definition at line 499 of file cfl_attrmap.h.
const Attr * faudes::TAttrMap< T, Attr, Cmp >::AttributeType | ( | void | ) | const |
Attribute typeinfo.
Definition at line 438 of file cfl_attrmap.h.
bool faudes::TAttrMap< T, Attr, Cmp >::Erase | ( | const T & | rElem | ) |
Erase Element (incl its attribute)
rElem | Specify element |
Definition at line 369 of file cfl_attrmap.h.
TBaseSet< T, Cmp >::Iterator faudes::TAttrMap< T, Attr, Cmp >::Erase | ( | const typename TBaseSet< T, Cmp >::Iterator & | pos | ) |
Erase element by iterator (incl attribute)
pos | Iterator to specify element |
Definition at line 376 of file cfl_attrmap.h.
void faudes::TAttrMap< T, Attr, Cmp >::EraseSet | ( | const TBaseSet< T, Cmp > & | rOtherSet | ) |
Erase elements given by other set.
This function ignores the attributes of the other set and maintains the attributes of the remaining elements in this set.
rOtherSet | Elements to erase |
Definition at line 386 of file cfl_attrmap.h.
bool faudes::TAttrMap< T, Attr, Cmp >::Insert | ( | const T & | rElem | ) |
Insert element.
If the element exists, the attribute is maintained. If the element does not exist, it is inserted with default attribute.
rElem | Specify element |
Definition at line 323 of file cfl_attrmap.h.
bool faudes::TAttrMap< T, Attr, Cmp >::Insert | ( | const T & | rElem, |
const Attr & | attr | ||
) |
Insert element with attribute.
rElem | Specify element |
attr | Specify attribute of (new) element |
Definition at line 331 of file cfl_attrmap.h.
void faudes::TAttrMap< T, Attr, Cmp >::InsertSet | ( | const TBaseSet< T, Cmp > & | rOtherSet | ) |
Inserts elements from rOtherSet.
Attributes of this set are maintained, newly inserted elements receive attributes from rOtherSet, provided that can be casted appropriately.
rOtherSet | Other BaseSet |
Definition at line 340 of file cfl_attrmap.h.
void faudes::TAttrMap< T, Attr, Cmp >::RestrictSet | ( | const TBaseSet< T, Cmp > & | rOtherSet | ) |
Restrict to specified subset.
Erases any elements not in the specified set. This function ignores the attributes of the other set and maintains the attributes of the remaining elements in this set.
rOtherSet | Elements to erase |
Definition at line 409 of file cfl_attrmap.h.
|
protected |
reference to associated TBaseSet
Definition at line 250 of file cfl_attrmap.h.
libFAUDES 2.32b --- 2024.03.01 --- c++ api documentaion by doxygen