Public Member Functions |
Protected Member Functions |
Protected Attributes |
Friends |
List of all members
faudes::NameSet Class Reference Set of indices with symbolic names. More...
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": 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
Constructor for NameSet referring to the static SymbolTable. Definition at line 48 of file cfl_nameset.cpp.
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.
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.
Virtual destructor. Definition at line 70 of file cfl_nameset.cpp. Member Function Documentation
Set attributes. This virtual interface function is overloaded by the derived class TaNameSet to set attributes by the specified set. Since the plain NameSet has no attributes, this function does nothing.
Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< AttributeFailureEvents >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< HioEventFlags >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, and faudes::TaNameSet< AttributeSimplenetEvent >. Definition at line 348 of file cfl_nameset.h.
Assign from other name set. Performs a fake copy, see TBaseSet.
Definition at line 89 of file cfl_nameset.cpp.
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 148 of file cfl_nameset.cpp.
Test equality of configuration data. Ignore name of the set, insist in matching symboltables.
Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< AttributeFailureEvents >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< HioEventFlags >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, and faudes::TaNameSet< AttributeSimplenetEvent >. Definition at line 98 of file cfl_nameset.cpp.
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 194 of file cfl_nameset.cpp.
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 125 of file cfl_nameset.cpp.
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 164 of file cfl_nameset.cpp.
Delete element by index. The symbolic name is not removed from the SymbolTable.
Reimplemented from faudes::TBaseSet< Idx >. Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< AttributeFailureEvents >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< HioEventFlags >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, and faudes::TaNameSet< AttributeSimplenetEvent >. Definition at line 295 of file cfl_nameset.cpp.
Delete element by symbolic name. The symbolic name is not removed from the SymbolTable
Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< AttributeFailureEvents >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< HioEventFlags >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, and faudes::TaNameSet< AttributeSimplenetEvent >. Definition at line 301 of file cfl_nameset.cpp.
Delete element by iterator. Symbolic nam is not removed from SymbolTable.
Reimplemented from faudes::TBaseSet< Idx >. Definition at line 315 of file cfl_nameset.cpp.
Erase elements specified by rOtherSet.
Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< AttributeFailureEvents >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< HioEventFlags >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, and faudes::TaNameSet< AttributeSimplenetEvent >. Definition at line 320 of file cfl_nameset.cpp.
Test existence of index.
Reimplemented from faudes::TBaseSet< Idx >. Definition at line 382 of file cfl_nameset.cpp.
Test existence of name.
Definition at line 387 of file cfl_nameset.cpp.
Find iterator for index. Returns either a valid iterator or End() for non-existent.
Reimplemented from faudes::TBaseSet< Idx >. Definition at line 392 of file cfl_nameset.cpp.
Find iterator for name. Returns either a valid iterator or End() for non-existent.
Definition at line 397 of file cfl_nameset.cpp.
Index lookup.
Definition at line 377 of file cfl_nameset.cpp.
Add an element by index. Index must be already known to the global SymbolTable.
Reimplemented from faudes::TBaseSet< Idx >. Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< AttributeFailureEvents >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< HioEventFlags >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, and faudes::TaNameSet< AttributeSimplenetEvent >. Definition at line 262 of file cfl_nameset.cpp.
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.
Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< AttributeFailureEvents >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< HioEventFlags >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, and faudes::TaNameSet< AttributeSimplenetEvent >. Definition at line 274 of file cfl_nameset.cpp.
Inserts elements of rOtherSet.
Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< AttributeFailureEvents >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< HioEventFlags >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, and faudes::TaNameSet< AttributeSimplenetEvent >. Definition at line 282 of file cfl_nameset.cpp.
Return an empty NameSet with same SymbolTable as this set.
Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< AttributeFailureEvents >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< HioEventFlags >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, and faudes::TaNameSet< AttributeSimplenetEvent >. Definition at line 82 of file cfl_nameset.cpp. Set intersection operator.
Definition at line 433 of file cfl_nameset.cpp. Set union operator.
Definition at line 403 of file cfl_nameset.cpp. Set difference operator.
Definition at line 418 of file cfl_nameset.cpp.
Test for subset. Definition at line 448 of file cfl_nameset.cpp.
Test for superset. Definition at line 460 of file cfl_nameset.cpp.
Restrict elements specified by rOtherSet.
Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< AttributeFailureEvents >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< HioEventFlags >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, and faudes::TaNameSet< AttributeSimplenetEvent >. Definition at line 332 of file cfl_nameset.cpp.
Return pretty printable symbolic name for index. Primary meant for debugging messages.
Reimplemented from faudes::TBaseSet< Idx >. Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< AttributeFailureEvents >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< HioEventFlags >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, and faudes::TaNameSet< AttributeSimplenetEvent >. Definition at line 472 of file cfl_nameset.cpp.
Set new name for existing index. FAUDES_CHECKED checks if index exists in NameSet.
Definition at line 349 of file cfl_nameset.cpp.
Set new name for existing name FAUDES_CHECKED checks if the specified name exists in NameSet.
Definition at line 362 of file cfl_nameset.cpp.
Name lookup.
Definition at line 344 of file cfl_nameset.cpp.
Get Pointer mpSymbolTable.
Definition at line 111 of file cfl_nameset.cpp.
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 116 of file cfl_nameset.cpp. Friends And Related Function Documentation
We implement "protected privacy for template classes" by friendship. This is used for the pragmatic implemention of conversion constructors. Definition at line 79 of file cfl_nameset.h. Member Data Documentation
Pointer to local SymbolTable. Definition at line 408 of file cfl_nameset.h. The documentation for this class was generated from the following files: libFAUDES 2.26g --- 2015.08.17 --- c++ api documentaion by doxygen |