faudes::TaNameSet< Attr > Class Template Reference
|
Public Member Functions | |
TaNameSet (void) | |
Constructor for NameSet referring to the static SymbolTable. | |
TaNameSet (const TaNameSet &rOtherSet) | |
Copy-constructor from other TaNameSet (incl attributes and symboltable). | |
TaNameSet (const NameSet &rOtherSet) | |
Constructor from NameSet (sets default attributes, same symboltable). | |
TaNameSet (const std::string &rFilename, const std::string &rLabel="") | |
Constructor from file. | |
virtual | ~TaNameSet (void) |
Virtual destructor. | |
TaNameSet | NewN () const |
Return a NameSet with same symboltable as this set. | |
virtual TaNameSet & | Assign (const NameSet &rSrc) |
Relaxed assignment method (uses base class to maintain attributes). | |
virtual TaNameSet & | operator= (const NameSet &rSrc) |
Relaxed assignment operator (uses base class to maintain attributes). | |
bool | Insert (const Idx &rIndex) |
Add an element by index. | |
bool | Insert (const Idx &rIndex, const Attr &rAttr) |
Add an element by index incl. | |
Idx | Insert (const std::string &rName) |
Add an element by its symbolic name. | |
Idx | Insert (const std::string &rName, const Attr &rAttr) |
Add an element by its symbolic name. | |
void | InsertSet (const NameSet &rOtherSet) |
Inserts elements of rOtherSet. | |
void | InsertSet (const TaNameSet &rOtherSet) |
Inserts elements of rOtherSet incl attributes Attributes of this set are maintained, new elements are inserted with attribute. | |
virtual bool | Erase (const Idx &rIndex) |
Delete element by index. | |
virtual bool | Erase (const std::string &rName) |
Delete element by symbolic name. | |
virtual Iterator | Erase (const Iterator &pos) |
Delete element by iterator. | |
void | EraseSet (const NameSet &rOtherSet) |
Erase elements indicated by rOtherSet. | |
void | EraseSet (const TaNameSet &rOtherSet) |
Erase elements indicated by rOtherSet. | |
void | RestrictSet (const NameSet &rOtherSet) |
Restrict elements indicated by rOtherSet. | |
void | RestrictSet (const TaNameSet &rOtherSet) |
Restrict elements indicated by rOtherSet. | |
virtual void | Attributes (const NameSet &rOtherSet) |
Set attributes. | |
virtual void | Attributes (const TaNameSet &rOtherSet) |
Set attributes. | |
std::string | Str (const Idx &rIndex) const |
Return pretty printable symbolic name for index. | |
Protected Member Functions | |
virtual void | DoAssign (const TaNameSet &rSourceSet) |
Assign to other name set. | |
virtual bool | DoEqual (const NameSet &rOtherSet) const |
Test equality of configuration data, ignore attributes Ignore name of the set, insist in matching symboltables. | |
Friends | |
class | NameSet |
We implement "protected privacy for template classes" by friendship. |
Set of indices with symbolic names and attributes.
This class is derived from NameSet and TaBaseSet.
The file format is demonstrated by the following example of a set "Alphabet" consisting of events "alpha", "beta" and "gamma" with "gamma" having some attribute (see eg AtributeFlags)
As with TaBaseSet, reading a file ignores unknown attributes. Thus, the above example may also be read as NameSet.
Definition at line 539 of file cfl_nameset.h.
faudes::TaNameSet< Attr >::TaNameSet | ( | void | ) | [inline] |
Constructor for NameSet referring to the static SymbolTable.
Definition at line 861 of file cfl_nameset.h.
faudes::TaNameSet< Attr >::TaNameSet | ( | const TaNameSet< Attr > & | rOtherSet | ) | [inline] |
Copy-constructor from other TaNameSet (incl attributes and symboltable).
rOtherSet | Set to copy |
Definition at line 873 of file cfl_nameset.h.
faudes::TaNameSet< Attr >::TaNameSet | ( | const NameSet & | rOtherSet | ) | [inline] |
Constructor from NameSet (sets default attributes, same symboltable).
rOtherSet | Set to copy |
Definition at line 885 of file cfl_nameset.h.
faudes::TaNameSet< Attr >::TaNameSet | ( | const std::string & | rFilename, | |
const std::string & | rLabel = "" | |||
) | [inline] |
Constructor from file.
This constructor reads a NameSet from a file using the DoRead(TokenReader&, const std::String&) function. The section is specified by rLabel and the static SymbolTable is used.
rFilename | Name of File | |
rLabel | Section for the set in the file; |
Definition at line 897 of file cfl_nameset.h.
virtual faudes::TaNameSet< Attr >::~TaNameSet | ( | void | ) | [inline, virtual] |
Virtual destructor.
Definition at line 587 of file cfl_nameset.h.
TaNameSet< Attr > & faudes::TaNameSet< Attr >::Assign | ( | const NameSet & | rSrc | ) | [inline, virtual] |
Relaxed assignment method (uses base class to maintain attributes).
rSrc | Source from which to assign |
Definition at line 945 of file cfl_nameset.h.
void faudes::TaNameSet< Attr >::Attributes | ( | const TaNameSet< Attr > & | rOtherSet | ) | [inline, virtual] |
Set attributes.
Attributes are copied per element from rOtherSet. Elements of this set which are not in rOtherSet maintain their attribute.
rOtherSet | Other IndexSet |
Definition at line 1114 of file cfl_nameset.h.
void faudes::TaNameSet< Attr >::Attributes | ( | const NameSet & | rOtherSet | ) | [inline, virtual] |
Set attributes.
Provided that rOtherSet has attributes that can be casted to the appropriate type, attributes are copied per element from rOtherSet. Elements of this set which are not in rOtherSet maintain their attribute.
rOtherSet | Other IndexSet |
Exception |
|
Reimplemented from faudes::NameSet.
Definition at line 1128 of file cfl_nameset.h.
void faudes::TaNameSet< Attr >::DoAssign | ( | const TaNameSet< Attr > & | rSourceSet | ) | [inline, protected, virtual] |
Assign to other name set.
Performs a fake copy, see TBaseSet. This function maintains attributes.
rSourceSet | Destination to copy from |
Definition at line 925 of file cfl_nameset.h.
bool faudes::TaNameSet< Attr >::DoEqual | ( | const NameSet & | rOtherSet | ) | const [inline, protected, virtual] |
Test equality of configuration data, ignore attributes Ignore name of the set, insist in matching symboltables.
rOtherSet | Other object to compare with. |
Reimplemented from faudes::NameSet.
Definition at line 935 of file cfl_nameset.h.
TaNameSet< Attr >::Iterator faudes::TaNameSet< Attr >::Erase | ( | const Iterator & | pos | ) | [inline, virtual] |
Delete element by iterator.
Symbolic nam is not removed from SymbolTable.
pos | TaNameSet::iterator |
Exception |
|
Reimplemented from faudes::TaBaseSet< Idx, Attr >.
Definition at line 1052 of file cfl_nameset.h.
bool faudes::TaNameSet< Attr >::Erase | ( | const std::string & | rName | ) | [inline, virtual] |
Delete element by symbolic name.
Symbolic name is not removed from SymbolTable
rName | Symbolic name of element to dlete |
Exception |
|
Reimplemented from faudes::NameSet.
Definition at line 1037 of file cfl_nameset.h.
bool faudes::TaNameSet< Attr >::Erase | ( | const Idx & | rIndex | ) | [inline, virtual] |
Delete element by index.
Symbolic name is not removed from SymbolTable.
rIndex | Index to delete |
Reimplemented from faudes::NameSet.
Definition at line 1030 of file cfl_nameset.h.
void faudes::TaNameSet< Attr >::EraseSet | ( | const TaNameSet< Attr > & | rOtherSet | ) | [inline] |
Erase elements indicated by rOtherSet.
Exception |
|
rOtherSet | Other StateSet |
Definition at line 1072 of file cfl_nameset.h.
void faudes::TaNameSet< Attr >::EraseSet | ( | const NameSet & | rOtherSet | ) | [inline] |
Erase elements indicated by rOtherSet.
Exception |
|
rOtherSet | Other StateSet |
Reimplemented from faudes::NameSet.
Definition at line 1058 of file cfl_nameset.h.
Idx faudes::TaNameSet< Attr >::Insert | ( | const std::string & | rName, | |
const Attr & | rAttr | |||
) | [inline] |
Add an element by its symbolic name.
If the name is unknown, a new index will be generated and recorded in the symboltable. If the name is known, the corresponding index will be added to the set.
rName | symbolic name of element to add | |
rAttr | Attribute |
Definition at line 993 of file cfl_nameset.h.
Idx faudes::TaNameSet< Attr >::Insert | ( | const std::string & | rName | ) | [inline] |
Add an element by its symbolic name.
If the name is unknown, a new index will be generated and recorded in the symboltable. If the name is known, the corresponding index will be added to the set. If the element already exists in the set, the attribute is maintained. Otherwise, the element is inserted with default attribute.
rName | symbolic name of element to add |
Reimplemented from faudes::NameSet.
Definition at line 985 of file cfl_nameset.h.
bool faudes::TaNameSet< Attr >::Insert | ( | const Idx & | rIndex, | |
const Attr & | rAttr | |||
) | [inline] |
Add an element by index incl.
attribute
rIndex | Index to add | |
rAttr | Attribute to add |
Exception |
|
Reimplemented from faudes::TaBaseSet< Idx, Attr >.
Definition at line 971 of file cfl_nameset.h.
bool faudes::TaNameSet< Attr >::Insert | ( | const Idx & | rIndex | ) | [inline, virtual] |
Add an element by index.
Index must be already known to the global SymbolTable. If the element already exists in the set, the attribute is maintained. Otherwise, the element is inserted with default attribute.
rIndex | Index to add |
Exception |
|
Reimplemented from faudes::NameSet.
Definition at line 957 of file cfl_nameset.h.
void faudes::TaNameSet< Attr >::InsertSet | ( | const TaNameSet< Attr > & | rOtherSet | ) | [inline] |
Inserts elements of rOtherSet incl attributes Attributes of this set are maintained, new elements are inserted with attribute.
rOtherSet | Other StateSet |
Definition at line 1016 of file cfl_nameset.h.
void faudes::TaNameSet< Attr >::InsertSet | ( | const NameSet & | rOtherSet | ) | [inline, virtual] |
Inserts elements of rOtherSet.
Attributes of this set are maintained, newly inserted elements have default attribute.
rOtherSet | Other StateSet |
Exception |
|
Reimplemented from faudes::NameSet.
Definition at line 1002 of file cfl_nameset.h.
TaNameSet< Attr > faudes::TaNameSet< Attr >::NewN | ( | void | ) | const [inline] |
Return a NameSet with same symboltable as this set.
Reimplemented from faudes::NameSet.
Definition at line 917 of file cfl_nameset.h.
virtual TaNameSet& faudes::TaNameSet< Attr >::operator= | ( | const NameSet & | rSrc | ) | [inline, virtual] |
Relaxed assignment operator (uses base class to maintain attributes).
rSrc | Source from which to assign |
Definition at line 613 of file cfl_nameset.h.
void faudes::TaNameSet< Attr >::RestrictSet | ( | const TaNameSet< Attr > & | rOtherSet | ) | [inline] |
Restrict elements indicated by rOtherSet.
Exception |
|
rOtherSet | Other StateSet |
Definition at line 1100 of file cfl_nameset.h.
void faudes::TaNameSet< Attr >::RestrictSet | ( | const NameSet & | rOtherSet | ) | [inline] |
Restrict elements indicated by rOtherSet.
Exception |
|
rOtherSet | Other EventSet |
Reimplemented from faudes::NameSet.
Definition at line 1086 of file cfl_nameset.h.
std::string faudes::TaNameSet< Attr >::Str | ( | const Idx & | rIndex | ) | const [inline, virtual] |
Return pretty printable symbolic name for index.
Primary meant for debugging messages.
rIndex | Index to print |
Reimplemented from faudes::NameSet.
Definition at line 1143 of file cfl_nameset.h.
friend class NameSet [friend] |
We implement "protected privacy for template classes" by friendship.
This is used for the pragmatic implemention conversion constructors.
Definition at line 547 of file cfl_nameset.h.
libFAUDES 2.23h --- 2014.04.03 --- c++ api documentaion by doxygen