Classes |
Public Types |
Public Member Functions |
Protected Types |
Protected Member Functions |
Protected Attributes |
Static Protected Attributes |
Private Attributes |
Friends |
List of all members
faudes::TBaseSet< T, Cmp > Class Template Reference STL style set template. More...
Detailed Descriptiontemplate<class T, class Cmp = std::less<T>>
|
|
protected |
STL attribute iterator, non-const version.
Definition at line 926 of file cfl_baseset.h.
|
protected |
STL attribute iterator, const version.
Definition at line 929 of file cfl_baseset.h.
|
protected |
STL iterator, const version.
Definition at line 912 of file cfl_baseset.h.
|
protected |
STL iterator, non-const version.
Definition at line 909 of file cfl_baseset.h.
enum faudes::TBaseSet::DetachMode |
Detach from extern storage (incl allocation and true copy)
Definition at line 360 of file cfl_baseset.h.
faudes::TBaseSet< T, Cmp >::TBaseSet | ( | void | ) |
Constructor.
Definition at line 1169 of file cfl_baseset.h.
faudes::TBaseSet< T, Cmp >::TBaseSet | ( | const TBaseSet< T, Cmp > & | rOtherSet | ) |
Copy-constructor.
rOtherSet | Source to copy from |
Definition at line 1209 of file cfl_baseset.h.
faudes::TBaseSet< T, Cmp >::TBaseSet | ( | const std::string & | rFilename, |
const std::string & | rLabel = "BaseSet" |
||
) |
Constructor from file.
This constructor indicates the intended interface for derived classes. The base set itself cannot read from token streams.
rFilename | Name of File |
rLabel | Section for the set in the file; |
Definition at line 1188 of file cfl_baseset.h.
|
virtual |
Virtual destructor.
Definition at line 1231 of file cfl_baseset.h.
|
virtual |
Attribute access.
This virtual function provides an interface for derived classes with attributes eg TaIndexSet. The current implementation uses the DoAssign method and clears any attributes afterwards. Future implementations may be more efficient.
rSourceSet | Set to copy from |
Definition at line 2210 of file cfl_baseset.h.
|
inlineprotected |
Record that we provide contents to some other BaseSet.
Definition at line 1536 of file cfl_baseset.h.
|
inlineprotected |
Record that an iterator refers to this TBaseSet.
Definition at line 1586 of file cfl_baseset.h.
|
virtual |
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.
rElem | Element of which the attribute is requested |
Reimplemented in faudes::TaTransSet< Attr >, faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, faudes::TaNameSet< AttributeSimplenetEvent >, faudes::TaIndexSet< Attr >, and faudes::TaIndexSet< StateAttr >.
Definition at line 2263 of file cfl_baseset.h.
|
virtual |
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.
rElem | Element of which the attribute is to be set |
rAttr | Attribute value to set. |
Exception |
|
Reimplemented in faudes::TaTransSet< Attr >, faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, faudes::TaNameSet< AttributeSimplenetEvent >, faudes::TaIndexSet< Attr >, and faudes::TaIndexSet< StateAttr >.
Definition at line 2270 of file cfl_baseset.h.
|
virtual |
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.
rElem | Element of which the attribute is requested |
Exception |
|
Reimplemented in faudes::TaTransSet< Attr >, faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, faudes::TaNameSet< AttributeSimplenetEvent >, faudes::TaIndexSet< Attr >, and faudes::TaIndexSet< StateAttr >.
Definition at line 2252 of file cfl_baseset.h.
|
virtual |
Attributes access.
This virtual function provides an interface for derived classes with attributes eg TaIndexSet. It copies attributes from the specified set, provided that they can be casted appropriately. Elements of this set which are not in rOtherSet maintain their attribute.
rOtherSet | Other BaseSet |
Exception |
|
Definition at line 2219 of file cfl_baseset.h.
Idx faudes::TBaseSet< T, Cmp >::AttributesSize | ( | void | ) | const |
Attribute access.
This virtual function provides an interface for derived classes with attributes eg TaIndexSet. Provide the number of explicit attributes. The TBaseSet itself has no attributes and thus this function returns 0.
Definition at line 2155 of file cfl_baseset.h.
|
virtual |
Attribute typeinfo.
This virtual function provides an interface for derived classes with attributes eg TaIndexSet. It tests whether this set accepts the specified attribute type ie whether it can be casted. The test is performned by the Cast function of the attribute type returned by AttributeType().
rAttr | Attribute type to test. |
Definition at line 2150 of file cfl_baseset.h.
|
inlinevirtual |
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.
rElem | Element of which the attribute is to be set |
rAttr | Attribute value to set. |
Reimplemented in faudes::TaTransSet< Attr >, faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, faudes::TaNameSet< AttributeSimplenetEvent >, faudes::TaIndexSet< Attr >, and faudes::TaIndexSet< StateAttr >.
Definition at line 771 of file cfl_baseset.h.
|
virtual |
Attribute typeinfo.
This virtual function provides an interface for derived container classes with attributes eg TaIndexSet. When not re-implemented, it returns an attribute with type AttributeVoid to indicate the absence of nontrivial attributes
Reimplemented in faudes::TaTransSet< Attr >, faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, faudes::TaNameSet< AttributeSimplenetEvent >, faudes::TaIndexSet< Attr >, and faudes::TaIndexSet< StateAttr >.
Definition at line 2144 of file cfl_baseset.h.
|
inline |
Iterator to the begin of set.
Reimplemented in faudes::TTransSet< Cmp >, and faudes::TTransSet< TransSort::X1EvX2 >.
Definition at line 1885 of file cfl_baseset.h.
|
virtual |
void faudes::TBaseSet< T, Cmp >::ClearAttributes | ( | void | ) |
Attribute access.
This virtual function provides an interface for derived classes with attributes eg TaIndexSet. The TBaseSet itself has no attributes and thus this function does nothing.
Definition at line 2160 of file cfl_baseset.h.
|
virtual |
Attribute access.
Cleras an explicit attribute associated with the specified element if sucht attribute exists. The TBaseSet itself has no attributes and thus this function will do nothing.
rElem | Element of which the attribute is to be cleared |
Definition at line 2290 of file cfl_baseset.h.
void faudes::TBaseSet< T, Cmp >::Detach | ( | DetachMode | flag = AttrIncl | ) | const |
Definition at line 1325 of file cfl_baseset.h.
|
inlineprotected |
Record that we stop providing data for some TBaseSet.
Definition at line 1544 of file cfl_baseset.h.
|
inlineprotected |
Record that an iterator stops to refer to this TBaseSet.
Definition at line 1593 of file cfl_baseset.h.
|
protected |
assign my members
Definition at line 1255 of file cfl_baseset.h.
|
protected |
set attribute in map (assume elem exists in set, NULL <=> set to default)
Definition at line 2325 of file cfl_baseset.h.
|
protected |
get attribute from map (return null if elem does not exist in map)
Definition at line 2297 of file cfl_baseset.h.
|
protected |
get attribute from map (insert explicit default if elem does not exist in map)
Definition at line 2305 of file cfl_baseset.h.
|
protectedvirtual |
Token output, debugging see Type::DWrite for public wrappers.
Reimplement this function in derived classes for specific specific template parameters.
rTw | Reference to TokenWriter |
rLabel | Label of section to write, defaults to name of set |
pContext | Write context to provide contextual information |
Reimplemented from faudes::Type.
Reimplemented in faudes::NameSet.
Definition at line 1836 of file cfl_baseset.h.
|
protected |
test equality
Definition at line 2117 of file cfl_baseset.h.
|
protectedvirtual |
Token input, see Type::Read for public wrappers.
Reimplement this function in derived classes for specific specific template parameters. By convention, the default label "" should be translated to some meaningful default, eg "IndexSet" for a set of indices". The pContext pointer can de type-checked and interpreted, ie as a symboltable to provide symbolic names. It is also passed on to attributes.
rTr | Reference to TokenReader |
rLabel | Label of section to read, defaults to name of set |
pContext | Read context to provide contextual information |
Reimplemented from faudes::Type.
Reimplemented in faudes::NameSet, faudes::IndexSet, and faudes::SymbolSet.
Definition at line 1869 of file cfl_baseset.h.
|
protectedvirtual |
Token output, see Type::SWrite for public wrappers.
Statistics include size, name and attributey type. The latter is retrieved from the RTI, if initialized. Dereived sets may reimplement this method.
rTw | Reference to TokenWriter |
Reimplemented from faudes::Type.
Definition at line 1854 of file cfl_baseset.h.
|
protectedvirtual |
Token output, see Type::DWrite for public wrappers.
Reimplement this function in derived classes for specific specific template parameters. By convention, the default label "" should be translated to a) the name of the set or b) some meaningful default, eg "IndexSet" for a set of indices. The pContext pointer can de type-checked and interpreted, ie as a symboltable to provide symbolic names. It is also passed on to attributes.
rTw | Reference to TokenWriter |
rLabel | Label of section to write, defaults to name of set |
pContext | Write context to provide contextual information |
Reimplemented from faudes::Type.
Reimplemented in faudes::TTransSet< Cmp >, faudes::TTransSet< TransSort::X1EvX2 >, faudes::NameSet, faudes::IndexSet, and faudes::SymbolSet.
Definition at line 1824 of file cfl_baseset.h.
void faudes::TBaseSet< T, Cmp >::DValid | ( | const std::string & | rMessage = "" | ) | const |
Some validation of deferred copy mechanism (provoke abort)
Definition at line 1600 of file cfl_baseset.h.
bool faudes::TBaseSet< T, Cmp >::Empty | ( | void | ) | const |
Test whether if the TBaseSet is Empty.
Definition at line 1818 of file cfl_baseset.h.
|
inline |
Iterator to the end of set.
Reimplemented in faudes::TTransSet< Cmp >, and faudes::TTransSet< TransSort::X1EvX2 >.
Definition at line 1890 of file cfl_baseset.h.
bool faudes::TBaseSet< T, Cmp >::EqualAttributes | ( | const TBaseSet< T, Cmp > & | rOtherSet | ) | const |
Attribute access.
Test whether attributes match with other set, and return true if attributes match for shared elements. It uses the equality test of individual attributes and, hence, requires the attribute type match too.
rOtherSet | Other set to compare with. |
Definition at line 2169 of file cfl_baseset.h.
|
virtual |
Erase element by reference.
rElem | Element to erase |
Reimplemented in faudes::TaTransSet< Attr >, faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, faudes::TaNameSet< AttributeSimplenetEvent >, faudes::TaIndexSet< Attr >, faudes::TaIndexSet< StateAttr >, faudes::TTransSet< Cmp >, faudes::TTransSet< TransSort::X1EvX2 >, and faudes::NameSet.
Definition at line 2013 of file cfl_baseset.h.
|
virtual |
Erase element by iterator.
pos | Iterator to specify element |
Reimplemented in faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, faudes::TaNameSet< AttributeSimplenetEvent >, faudes::TaIndexSet< Attr >, faudes::TaIndexSet< StateAttr >, and faudes::NameSet.
Definition at line 2020 of file cfl_baseset.h.
|
virtual |
Erase elements given by other set.
rOtherSet | Set of elements to erase |
Definition at line 2036 of file cfl_baseset.h.
bool faudes::TBaseSet< T, Cmp >::Exists | ( | const T & | rElem | ) | const |
Test existence of element.
rElem | Element to test |
Reimplemented in faudes::TTransSet< Cmp >, faudes::TTransSet< TransSort::X1EvX2 >, and faudes::NameSet.
Definition at line 2088 of file cfl_baseset.h.
TBaseSet< T, Cmp >::Iterator faudes::TBaseSet< T, Cmp >::Find | ( | const T & | rElem | ) | const |
Find element and return iterator.
rElem | Element to find |
Reimplemented in faudes::TTransSet< Cmp >, faudes::TTransSet< TransSort::X1EvX2 >, and faudes::NameSet.
Definition at line 2083 of file cfl_baseset.h.
|
virtual |
Insert specified element.
pos | Insertion hint passed to STL |
rElem | Element to insert |
Definition at line 1967 of file cfl_baseset.h.
|
virtual |
Insert specified element.
rElem | Element to insert |
Reimplemented in faudes::TTransSet< Cmp >, and faudes::TTransSet< TransSort::X1EvX2 >.
Definition at line 1975 of file cfl_baseset.h.
|
virtual |
Insert specified element.
rElem | Element to insert |
Reimplemented in faudes::TaTransSet< Attr >, faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, faudes::TaNameSet< AttributeSimplenetEvent >, faudes::TaIndexSet< Attr >, faudes::TaIndexSet< StateAttr >, faudes::TTransSet< Cmp >, faudes::TTransSet< TransSort::X1EvX2 >, faudes::IndexSet, faudes::NameSet, and faudes::SymbolSet.
Definition at line 1954 of file cfl_baseset.h.
|
virtual |
Insert elements given by rOtherSet.
rOtherSet | Set of elements to insert |
Definition at line 1981 of file cfl_baseset.h.
void faudes::TBaseSet< T, Cmp >::Lock | ( | void | ) | const |
Detach and lock any further reallocation.
Definition at line 1456 of file cfl_baseset.h.
|
virtual |
Return name of TBaseSet.
Reimplemented from faudes::Type.
Definition at line 1749 of file cfl_baseset.h.
|
virtual |
Set name of TBaseSet.
rName | Name to set |
Reimplemented from faudes::Type.
Definition at line 1754 of file cfl_baseset.h.
TBaseSet< T, Cmp > faudes::TBaseSet< T, Cmp >::operator* | ( | const TBaseSet< T, Cmp > & | rOtherSet | ) | const |
TBaseSet< T, Cmp > faudes::TBaseSet< T, Cmp >::operator+ | ( | const TBaseSet< T, Cmp > & | rOtherSet | ) | const |
TBaseSet< T, Cmp > faudes::TBaseSet< T, Cmp >::operator- | ( | const TBaseSet< T, Cmp > & | rOtherSet | ) | const |
bool faudes::TBaseSet< T, Cmp >::operator< | ( | const TBaseSet< T, Cmp > & | rOtherSet | ) | const |
Order for sorting containers of TBaseSet.
Definition at line 2138 of file cfl_baseset.h.
bool faudes::TBaseSet< T, Cmp >::operator<= | ( | const TBaseSet< T, Cmp > & | rOtherSet | ) | const |
Test for subset.
Definition at line 2126 of file cfl_baseset.h.
bool faudes::TBaseSet< T, Cmp >::operator>= | ( | const TBaseSet< T, Cmp > & | rOtherSet | ) | const |
Test for superset.
Definition at line 2132 of file cfl_baseset.h.
|
inlineprotected |
Ensure that we do not host contents to anyone else.
Definition at line 1487 of file cfl_baseset.h.
|
virtual |
Restrict elements given by other set.
rOtherSet | Set of elements to keep |
Definition at line 2058 of file cfl_baseset.h.
Idx faudes::TBaseSet< T, Cmp >::Size | ( | void | ) | const |
Get Size of TBaseSet.
Definition at line 1813 of file cfl_baseset.h.
|
virtual |
Return pretty printable element.
Reimplement this method for derived classes.
rElem | Element to print |
Reimplemented in faudes::TTransSet< Cmp >, faudes::TTransSet< TransSort::X1EvX2 >, faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< AttributeSignalEvent >, faudes::TaNameSet< SimEventAttribute >, faudes::TaNameSet< AttributeSimplenetEvent >, faudes::NameSet, faudes::IndexSet, and faudes::SymbolSet.
Definition at line 1806 of file cfl_baseset.h.
|
protected |
Convert STL iterator to API iterator.
Definition at line 1880 of file cfl_baseset.h.
|
protectedvirtual |
Reimplment from type to use chache.
Reimplemented from faudes::Type.
Definition at line 1761 of file cfl_baseset.h.
|
virtual |
Get objects's type name.
Retrieve the faudes-type name from the type registry. Sets allow to overwrite the faudes-type identifier. This is allows for light-weight derived classes that do not need to be registered.
Reimplemented from faudes::Type.
Definition at line 1789 of file cfl_baseset.h.
|
virtual |
Overwrite faudes-type name.
This method is used to overwrite the faudes-type identifyer.
rType | Faudes-type name to set |
Definition at line 1800 of file cfl_baseset.h.
|
inlinevirtual |
Test validty of candidate element.
Reimplement this function for particular type T of elements, eg for an index set with T=Idx indicate 0 an invalid index.
rElem | Candidate to test |
Reimplemented in faudes::IndexSet, and faudes::SymbolSet.
Definition at line 1948 of file cfl_baseset.h.
|
virtual |
Configure the element name tag.
This method allows to overwrite the tag used for elements in XML IO. For usual, you will register derived class with the run-time-interface and set the elemen tag for XML IO.
rTag | Name to set |
Definition at line 1783 of file cfl_baseset.h.
|
protectedvirtual |
Get name of elements (used for XML IO)
Definition at line 1771 of file cfl_baseset.h.
|
friend |
allow access to attribute interface class
Definition at line 100 of file cfl_baseset.h.
|
protected |
Iterator to the client list that hosts our data (maintained by host)
Definition at line 938 of file cfl_baseset.h.
|
protected |
Indicate "hosts data to myself only".
Definition at line 944 of file cfl_baseset.h.
|
private |
Current/cached faudes type-name.
Definition at line 993 of file cfl_baseset.h.
|
protected |
Iterators that refer to this TBaseSet.
Definition at line 959 of file cfl_baseset.h.
|
protected |
Indicate "dont re-allocate the STL set ever again".
Definition at line 947 of file cfl_baseset.h.
|
protected |
Name of this BaseSet.
Definition at line 900 of file cfl_baseset.h.
|
protected |
Attribute map, if this object hosts data (else NULL).
Definition at line 923 of file cfl_baseset.h.
|
protected |
BaseSets, that use data hosted by us (NULL if we dont host data, emptyset if we host to ourself excl.)
Definition at line 941 of file cfl_baseset.h.
|
protected |
STL set, if this object hosts data (else NULL)
Definition at line 906 of file cfl_baseset.h.
|
staticprotected |
static empty STL map for default constructor
Definition at line 979 of file cfl_baseset.h.
|
staticprotected |
static empty STL set for default constructor
Definition at line 976 of file cfl_baseset.h.
|
private |
Current/cached name of elements (used protected accessor method)
Definition at line 990 of file cfl_baseset.h.
|
protected |
Pointer to attribute map to operate on.
Definition at line 920 of file cfl_baseset.h.
|
protected |
Pointer on BaseSet that hosts our data (THIS if we host)
Definition at line 935 of file cfl_baseset.h.
|
protected |
Pointer on STL set to operate on.
Definition at line 903 of file cfl_baseset.h.
|
private |
static empty STL client list
TypeDefinition cache (should use guarded pointer here)
Definition at line 987 of file cfl_baseset.h.
libFAUDES 2.28a --- 2016.09.13 --- c++ api documentaion by doxygen