|
Classes |
Public Types |
Public Member Functions |
Protected Types |
Protected Member Functions |
Static Protected Member Functions |
Protected Attributes |
Friends |
List of all members
faudes::TBaseSet< T, Cmp > Class Template Reference Detailed Descriptiontemplate<class T, class Cmp = std::less<T>> class faudes::TBaseSet< T, Cmp > STL style set template. This class template is built on top of the STL set template. It provides essentials of the STL interface relevant to libFAUDES plus a deferred copy mechanism, aka copy-on-write. TBaseSet serves as a base class for all libFaudes containers:
The public functions of a TBaseSet provide the high-level api, with the intention to organize the deferred copy machanism in a transparent manner. Since STL iterators refer to a particular STL container, they become invalid when the internal container is copied. Therefor, TBaseSet tracks iterators and fixes them when the actual copy takes place. This introduces some runtime overhead, in particular when your application represents subsets as sets of iterators. You may use the public method Lock() to enforce a full copy and to prevent any further re-allocation. Alternatively to the high-level api, a protected low-level api is provided with direct access to the internal STL set. When using this api, it is up to the derived class to ensure that the BaseSet gets detached from its refernces befor write operations can take place. The virtual function TBaseSet<T>::Valid() is used to indicate whether a candidate element is valid as a set member. If the macro FAUDES_CHECKED is defined, the attempt to insert an invalid element triggers an exception (id 61). Invalid iterators throw an exception (id 62) when used as an argument to a BaseSet function. The TBaseSet also hosts a container to associate an attribute with each set element. However, in the plain TBaseSet the attribute type is set to void and member methods only deal with attributes when this does not involve too much overhead. To make effective use of attributes, one is meant to derive a class from TBaseSet that encodes the actual attribute type and that provides appropriate access methods. This is facilitated by the class TAttrMap. Note on a boring technical detail: since STL sets are sorted, effectively all set iterators should be const. However, there is a minor issue whether or not the erase function should use a const iterator as argument. SGI derived STL implementations (as used on most GNU systems) avoid this issue by defining const and non-const iterators on sets as identical types. MS implementation (used in VS C++ by default, as of 2006) differ in this aspect. The class TBaseSet::Iterator hides the issue from the faudes API but it is still present internaly. Definition at line 101 of file cfl_baseset.h.
Member Typedef Documentation◆ aiterator
template<class T , class Cmp = std::less<T>>
STL attribute iterator, non-const version Definition at line 1021 of file cfl_baseset.h. ◆ CIterator
template<class T , class Cmp = std::less<T>>
Iterator class for high-level api to TBaseSet. This is a convenoience typedef — faudes set iterators are const anyway. Definition at line 208 of file cfl_baseset.h. ◆ const_aiterator
template<class T , class Cmp = std::less<T>>
STL attribute iterator, const version Definition at line 1024 of file cfl_baseset.h. ◆ const_iterator
template<class T , class Cmp = std::less<T>>
STL iterator, const version Definition at line 1007 of file cfl_baseset.h. ◆ iterator
template<class T , class Cmp = std::less<T>>
STL iterator, non-const version Definition at line 1004 of file cfl_baseset.h. Member Enumeration Documentation◆ DetachMode
template<class T , class Cmp = std::less<T>>
Detach from extern storage (incl allocation and true copy)
Definition at line 390 of file cfl_baseset.h. Member Function Documentation◆ AttributeTry()
template<class T , class Cmp = std::less<T>>
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 in faudes::TaIndexSet< Attr >, faudes::TaIndexSet< faudes::DiagLabelSet >, faudes::TaIndexSet< faudes::NameSet >, faudes::TaIndexSet< HioStateFlags >, faudes::TaIndexSet< StateAttr >, faudes::TaIndexSet< StateRef >, faudes::TaNameSet< Attr >, faudes::TaNameSet< AttributeSimCondition >, faudes::TaNameSet< AttributeVoid >, faudes::TaNameSet< EventAttr >, faudes::TaNameSet< faudes::AttributeFailureEvents >, faudes::TaNameSet< faudes::AttributeSignalEvent >, faudes::TaNameSet< faudes::AttributeSimplenetEvent >, faudes::TaNameSet< HioEventFlags >, faudes::TaNameSet< NameSet >, faudes::TaNameSet< SimEventAttribute >, and faudes::TaTransSet< Attr >. Definition at line 801 of file cfl_baseset.h. Friends And Related Symbol Documentation◆ TAttrMap
template<class T , class Cmp = std::less<T>>
template<class TP , class AP , class CP >
allow access to attribute interface class Definition at line 112 of file cfl_baseset.h. Member Data Documentation◆ mClientRecord
template<class T , class Cmp = std::less<T>>
Iterator to the client list that hosts our data (maintained by host) Definition at line 1033 of file cfl_baseset.h. ◆ mDetached
template<class T , class Cmp = std::less<T>>
Indicate "hosts data to myself only" Definition at line 1039 of file cfl_baseset.h. ◆ mIterators
template<class T , class Cmp = std::less<T>>
Iterators that refer to this TBaseSet Definition at line 1054 of file cfl_baseset.h. ◆ mLocked
template<class T , class Cmp = std::less<T>>
Indicate "dont re-allocate the STL set ever again" Definition at line 1042 of file cfl_baseset.h. ◆ mpAttributes
template<class T , class Cmp = std::less<T>>
Attribute map, if this object hosts data (else NULL). Definition at line 1018 of file cfl_baseset.h. ◆ mpClients
template<class T , class Cmp = std::less<T>>
BaseSets, that use data hosted by us (NULL if we dont host data, emptyset if we host to ourself excl.) Definition at line 1036 of file cfl_baseset.h. ◆ mpSet
template<class T , class Cmp = std::less<T>>
STL set, if this object hosts data (else NULL) Definition at line 1001 of file cfl_baseset.h. ◆ pAttributes
template<class T , class Cmp = std::less<T>>
Pointer to attribute map to operate on Definition at line 1015 of file cfl_baseset.h. ◆ pGea
template<class T , class Cmp = std::less<T>>
construct and record static members (the fiasco) Definition at line 1072 of file cfl_baseset.h. ◆ pGes
template<class T , class Cmp = std::less<T>>
construct and record static members (the fiasco) Definition at line 1069 of file cfl_baseset.h. ◆ pHostSet
template<class T , class Cmp = std::less<T>>
Pointer on BaseSet that hosts our data (THIS if we host) Definition at line 1030 of file cfl_baseset.h. ◆ pSet
template<class T , class Cmp = std::less<T>>
Pointer on STL set to operate on Definition at line 998 of file cfl_baseset.h. The documentation for this class was generated from the following file: libFAUDES 2.33k --- 2025.09.16 --- c++ api documentaion by doxygen |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||