|
|
||||||
|
Public Member Functions |
Protected Member Functions |
Protected Attributes |
Friends |
List of all members
faudes::NameSet Class Reference Detailed DescriptionSet of indices with symbolic names. In a NameSet, symbolic names are mandatory. The class is derived from IndexSet and uses a pointer to a SymbolTable to maintain the symbolic names. The static SymbolTable is used as default, which in the context of libfaudes becomes the global event symbol table. It is an error to refer to an unknown symbolic name or to an index with no name associated. When FAUDES_CHECKED is defined, an exception will be thrown. It is also considered an error to relate two NameSets that refer to different SymbolTables (using e.g. SetUnion). Since symbolic names are mandatory, file IO uses names rather than indices. Technically, file IO is done by TaNameSet functions. This requires a copy and for that reason may be reimplemented in a future versions. The format is demonstrated by the following example of a set with name "Alphabet" consisting of events "alpha", "beta" and "gamma": <Alphabet>
"alpha" "beta" "gamma"
TaNameSet< AttributeCFlags > Alphabet Convenience typedef for event sets with controllability attributes. Definition: cfl_cgenerator.h:245 Note that when reading a file, indices will be associated with the symbolic names based on availability. Within one libfaudes session, each individual event will be referred to by a unique index. Definition at line 69 of file cfl_nameset.h.
Constructor & Destructor Documentation◆ NameSet() [1/3]
Constructor for NameSet referring to the static SymbolTable. Definition at line 48 of file cfl_nameset.cpp. ◆ NameSet() [2/3]
Copy-constructor from other NameSet. This also copies the SymbolTable reference, hence the new NameSet will use the same SymbolTable as rOtherSet.
Definition at line 55 of file cfl_nameset.cpp. ◆ NameSet() [3/3]
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.
Definition at line 63 of file cfl_nameset.cpp. ◆ ~NameSet()
Virtual destructor. Definition at line 70 of file cfl_nameset.cpp. Member Function Documentation◆ DoAssign()
Assign from other name set. Performs a fake copy, see TBaseSet.
Definition at line 83 of file cfl_nameset.cpp. ◆ DoDWrite()
Write debug info to TokenWriter, see Type::DWrite for public wrapper. The debug version writes a format that includes symbolic names and indices.
Reimplemented from faudes::TBaseSet< Idx >. Definition at line 142 of file cfl_nameset.cpp. ◆ DoEqual()
Test equality of configuration data. Ignore name of the set, insist in matching symboltables.
Definition at line 92 of file cfl_nameset.cpp. ◆ DoRead()
Read from TokenReader, see Type::Read for public wrappers. It is an error if the file contains a plain index (id 52). The method invokes TokenReader::ReadBegin() to seek the specified section, reads subsequent symbols, and calls matching TokenReader::ReadEnd(). If no section is specified, the section is assumed to start at the current position of the token stream. If the current position is no begin token, the section "NameSet" is read. When used by a derived class with attributes, attributes are read, too.
Reimplemented from faudes::TBaseSet< Idx >. Definition at line 188 of file cfl_nameset.cpp. ◆ DoWrite()
Write to TokenWriter, see Type::Write for public wrappers This function will also do the token IO of attributes in derived classes.
Reimplemented from faudes::TBaseSet< Idx >. Definition at line 119 of file cfl_nameset.cpp. ◆ DoXWrite()
Write to TokenWriter XML format, see Type::XWrite for public wrappers This function will also do the token IO of attributes in derived classes.
Reimplemented from faudes::Type. Definition at line 158 of file cfl_nameset.cpp. ◆ Erase() [1/3]
Delete element by index. The symbolic name is not removed from the SymbolTable.
Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< faudes::AttributeFailureEvents >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< faudes::AttributeSignalEvent >, faudes::TaNameSet< faudes::AttributeSimplenetEvent >, faudes::TaNameSet< EventAttr >, and faudes::TaNameSet< SimEventAttribute >. Definition at line 308 of file cfl_nameset.cpp. ◆ Erase() [2/3]
Delete element by iterator. Symbolic nam is not removed from SymbolTable.
Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< faudes::AttributeFailureEvents >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< faudes::AttributeSignalEvent >, faudes::TaNameSet< faudes::AttributeSimplenetEvent >, faudes::TaNameSet< EventAttr >, and faudes::TaNameSet< SimEventAttribute >. Definition at line 328 of file cfl_nameset.cpp. ◆ Erase() [3/3]
Delete element by symbolic name. The symbolic name is not removed from the SymbolTable
Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< faudes::AttributeFailureEvents >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< faudes::AttributeSignalEvent >, faudes::TaNameSet< faudes::AttributeSimplenetEvent >, faudes::TaNameSet< EventAttr >, and faudes::TaNameSet< SimEventAttribute >. Definition at line 314 of file cfl_nameset.cpp. ◆ EraseSet() [1/2]
Erase elements specified by rOtherSet.
Definition at line 352 of file cfl_nameset.cpp. ◆ EraseSet() [2/2]Erase elements specified by rOtherSet. This function requires a runtime cast to access the synboltable. An expection is thrown if the cast fails.
Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< faudes::AttributeFailureEvents >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< faudes::AttributeSignalEvent >, faudes::TaNameSet< faudes::AttributeSimplenetEvent >, faudes::TaNameSet< EventAttr >, and faudes::TaNameSet< SimEventAttribute >. Definition at line 333 of file cfl_nameset.cpp. ◆ Exists() [1/2]
Test existence of index.
Definition at line 433 of file cfl_nameset.cpp. ◆ Exists() [2/2]
Test existence of name.
Definition at line 438 of file cfl_nameset.cpp. ◆ Find() [1/2]
Find iterator for index. Returns either a valid iterator or End() for non-existent.
Definition at line 443 of file cfl_nameset.cpp. ◆ Find() [2/2]
Find iterator for name. Returns either a valid iterator or End() for non-existent.
Definition at line 448 of file cfl_nameset.cpp. ◆ Index()
Index lookup.
Definition at line 428 of file cfl_nameset.cpp. ◆ Insert() [1/2]
Add an element by index. Index must be already known to the global SymbolTable.
Definition at line 256 of file cfl_nameset.cpp. ◆ Insert() [2/2]
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.
Definition at line 268 of file cfl_nameset.cpp. ◆ InsertSet() [1/2]
Inserts all elements of rOtherSet.
Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< faudes::AttributeFailureEvents >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< faudes::AttributeSignalEvent >, faudes::TaNameSet< faudes::AttributeSimplenetEvent >, faudes::TaNameSet< EventAttr >, and faudes::TaNameSet< SimEventAttribute >. Definition at line 295 of file cfl_nameset.cpp. ◆ InsertSet() [2/2]Inserts all elements of rOtherSet. This variant requires a runtime cast to access the synboltable. An expection is thrown if the cast fails.
Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< faudes::AttributeFailureEvents >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< faudes::AttributeSignalEvent >, faudes::TaNameSet< faudes::AttributeSimplenetEvent >, faudes::TaNameSet< EventAttr >, and faudes::TaNameSet< SimEventAttribute >. Definition at line 276 of file cfl_nameset.cpp. ◆ operator*()Set intersection operator.
Definition at line 489 of file cfl_nameset.cpp. ◆ operator+()Set union operator.
Definition at line 454 of file cfl_nameset.cpp. ◆ operator-()Set difference operator.
Definition at line 471 of file cfl_nameset.cpp. ◆ operator<=()
Test for subset Definition at line 506 of file cfl_nameset.cpp. ◆ operator>=()
Test for superset. Definition at line 518 of file cfl_nameset.cpp. ◆ RestrictSet() [1/2]
Restrict to elements specified by rOtherSet.
Definition at line 383 of file cfl_nameset.cpp. ◆ RestrictSet() [2/2]Restrict to elements specified by rOtherSet. This function requires a runtime cast to access the synboltable. An expection is thrown if the cast fails.
Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< faudes::AttributeFailureEvents >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< faudes::AttributeSignalEvent >, faudes::TaNameSet< faudes::AttributeSimplenetEvent >, faudes::TaNameSet< EventAttr >, and faudes::TaNameSet< SimEventAttribute >. Definition at line 365 of file cfl_nameset.cpp. ◆ Str()
Return pretty printable symbolic name for index. Primary meant for debugging messages.
Definition at line 530 of file cfl_nameset.cpp. ◆ SymbolicName() [1/3]
Set new name for existing name FAUDES_CHECKED checks if the specified name exists in NameSet.
Definition at line 413 of file cfl_nameset.cpp. ◆ SymbolicName() [2/3]
Name lookup.
Definition at line 395 of file cfl_nameset.cpp. ◆ SymbolicName() [3/3]
Set new name for existing index. FAUDES_CHECKED checks if index exists in NameSet.
Definition at line 400 of file cfl_nameset.cpp. ◆ SymbolTablep() [1/2]
Set SymbolTable reference. This function sets the reference to the SymbolTable. The current implementation clears the set, future versions may implement a re-indexing.
Definition at line 110 of file cfl_nameset.cpp. ◆ SymbolTablep() [2/2]
Get Pointer mpSymbolTable.
Definition at line 105 of file cfl_nameset.cpp. Friends And Related Function Documentation◆ TaNameSet
template<class Attr >
We implement "protected privacy for template classes" by friendship. This is used for the pragmatic implemention of conversion constructors. Definition at line 83 of file cfl_nameset.h. Member Data Documentation◆ mpSymbolTable
Pointer to local SymbolTable. Definition at line 432 of file cfl_nameset.h. The documentation for this class was generated from the following files: libFAUDES 2.32f --- 2024.12.22 --- c++ api documentaion by doxygen |