| |
|
||||||
|
|
|||||||
|
faudes::TaIndexSet< Attr > Class Template Reference Detailed Descriptiontemplate<class Attr> class faudes::TaIndexSet< Attr > Set of indices with attributes. A TaIndexSet<Attr> is a template derived from IndexSet, such that each set element has an Attribute of class Attr. The template parameter Attr must provide basic functions for file IO and must define a default value, see AttributeVoid and AttributeFlags for an examples. Attributes are maintained by an STL map to associate indices with attributes different from the default value. Thus, attributes with default value do not take up any memeory.
The copy constructor copies attributes; the methods InsertSet(), EraseSet() and RestrictSet() maintain attributes; all other set operations derived from IndexSet The format for token IO is demonstrated by the following example of a set with name "MySet" consisting of indices 17, 25, 40, where index 25 has a nontrivial attribute attached: <Myset>
17
25 <AValue> "Some Value" </AValue>
40
</MySet>
Note that attributes may be either subsections or tokens of type different from integer and string. This is to allow reading a token stream to a class with incompatible (or no) attributes. Definition at line 351 of file cfl_indexset.h.
Constructor & Destructor Documentation◆ TaIndexSet() [1/4]
template<class Attr >
Constructor. Definition at line 611 of file cfl_indexset.h. ◆ TaIndexSet() [2/4]
template<class Attr >
Copy-constructor (from TaIndexSet, incl attributes) Definition at line 620 of file cfl_indexset.h. ◆ TaIndexSet() [3/4]
template<class Attr >
Copy-constructor (from IndexSet, sets attributes to default) Definition at line 631 of file cfl_indexset.h. ◆ TaIndexSet() [4/4]
template<class Attr >
Construct from file. This constructor uses the Read(TokenReader&, const std::string&) function to read.
Definition at line 643 of file cfl_indexset.h. ◆ ~TaIndexSet()
template<class Attr >
Virtual destructor Definition at line 402 of file cfl_indexset.h. Member Function Documentation◆ Attribute() [1/3]
template<class Attr >
Attribute access. This virtual function provides an interface for derived classes with attributes eg TaIndexSet. The TBaseSet has no attributes and thus returns a void attribute. Derived classes that provide attributes are meant to return the attribute specified by rElem.
Reimplemented from faudes::TBaseSet< Idx >. Definition at line 568 of file cfl_indexset.h. ◆ Attribute() [2/3]
template<class Attr >
Definition at line 569 of file cfl_indexset.h. ◆ Attribute() [3/3]
template<class Attr >
Attribute access. This virtual function provides an interface for derived classes with attributes eg TaIndexSet. The TBaseSet itself has void attributes and thus formally accepts any nontrivial attribute, however, ignoring any value. Derived classes that provide attributes are meant to set the attribute as specified. Only if the required cast to the actual attribute type fails an exception is thrown.
Reimplemented from faudes::TBaseSet< Idx >. Definition at line 570 of file cfl_indexset.h. ◆ Attributep()
template<class Attr >
Attribute access. This virtual function provides an interface for derived classes with attributes eg TaIndexSet. The TBaseSet has no attributes and thus throws an exception. Derived classes that provide attributes are meant to return a pointer to the attribute specified by rElem.
Reimplemented from faudes::TBaseSet< Idx >. Definition at line 567 of file cfl_indexset.h. ◆ AttributeTry()
template<class Attr >
Attribute access. This virtual function provides an interface for derived classes with attributes eg TaIndexSet. It is meant to try to set the attribute as specified if the type can be casted. Otherwise it does nothing.
Reimplemented from faudes::TBaseSet< Idx >. Definition at line 571 of file cfl_indexset.h. ◆ AttributeType()
template<class Attr >
resolve ambiguities from attribute interface ("using" wont do the job) Reimplemented from faudes::TBaseSet< Idx >. Definition at line 566 of file cfl_indexset.h. ◆ Copy()
template<class Attr >
Relaxed assignment method. Maintain attributes provided they can be casted.
Definition at line 662 of file cfl_indexset.h. ◆ DoCopy()
template<class Attr >
Copy my members. This method maintains attributes.
Definition at line 654 of file cfl_indexset.h. ◆ Erase() [1/2]
template<class Attr >
Erase Element (incl its attribute)
Definition at line 741 of file cfl_indexset.h. ◆ Erase() [2/2]
template<class Attr >
Erase element by iterator (incl attribute)
Definition at line 747 of file cfl_indexset.h. ◆ EraseSet() [1/2]
template<class Attr >
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.
Definition at line 754 of file cfl_indexset.h. ◆ EraseSet() [2/2]
template<class Attr >
Erase elements given by other set. This variant uses a runtime cast to access attributes.
Definition at line 761 of file cfl_indexset.h. ◆ Insert() [1/4]
template<class Attr >
Insert new index with attribute. If the index allready exists, the attribute is overwritten by rAttr.
Definition at line 700 of file cfl_indexset.h. ◆ Insert() [2/4]
template<class Attr >
Insert element. If the element exists, the attribute is maintained. If the element does not exist, it is inserted with default attribute.
Definition at line 693 of file cfl_indexset.h. ◆ Insert() [3/4]
template<class Attr >
Insert element with attribute.
Definition at line 711 of file cfl_indexset.h. ◆ Insert() [4/4]
template<class Attr >
Insert new index to set using default attribute.
Definition at line 684 of file cfl_indexset.h. ◆ InsertSet() [1/2]
template<class Attr >
Inserts elements of rOtherSet. Attributes of this set are maintained, newly inserted elements attain the attribute from rOtherSet if it can be casted appropriately.
Definition at line 719 of file cfl_indexset.h. ◆ InsertSet() [2/2]
template<class Attr >
Inserts elements of rOtherSet. This variant uses a runtime cast to access attributes.
Definition at line 726 of file cfl_indexset.h. ◆ operator=()
template<class Attr >
Relaxed assignment operator. Maintain attributes provided they can be casted.
Definition at line 420 of file cfl_indexset.h. ◆ RestrictSet() [1/2]
template<class Attr >
Restrict to specified subset. Erases any elements no in the specified set. This function ignores the attributes of the other set and maintains the attributes of the remaining elements in this set.
Definition at line 776 of file cfl_indexset.h. ◆ RestrictSet() [2/2]
template<class Attr >
Restrict to specified subset. This variant uses a runtime cast to access attributes.
Definition at line 783 of file cfl_indexset.h. Friends And Related Symbol Documentation◆ IndexSet
template<class Attr >
We implement "protected privacy for template classes" by friendship. This is used for the pragmatic implemention conversion constructors. Definition at line 366 of file cfl_indexset.h. The documentation for this class was generated from the following file: libFAUDES 2.34d --- 2026.03.11 --- c++ api documentaion by doxygen |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||