Set with nontrivial attributes. More...

#include <cfl_abaseset.h>

Public Member Functions

 TaBaseSet (void)
 Constructor.
 TaBaseSet (const TaBaseSet &rOtherSet)
 Copy-constructor.
 TaBaseSet (const TBaseSet< T, Cmp > &rOtherSet)
 Copy-constructor.
 TaBaseSet (const std::string &rFilename, const std::string &rLabel="BaseSet")
 Constructor from file.
virtual ~TaBaseSet (void)
 Virtual destructor.
virtual TaBaseSetAssign (const TaBaseSet &rSourceSet)
 Faudes Type interface.
virtual TaBaseSetAssign (const TBaseSet< T, Cmp > &rSourceSet)
 Copy from a TBaseSet with attributes, provided that they can be casted acciordingly.
virtual TaBaseSetAssignWithoutAttributes (const TBaseSet< T, Cmp > &rSourceSet)
 Copy from a TBaseSet without attributes.
virtual TaBaseSetoperator= (const TaBaseSet &rSource)
 Faudes Type interface.
virtual TaBaseSetoperator= (const TBaseSet< T, Cmp > &rSource)
 Faudes Type interface (extension).
virtual void Clear (void)
 Clear all set.
const Attr * Attributep (void) const
 Attribute typeinfo.
const Attr & Attribute (void) const
 Attribute typeinfo.
virtual bool AttributeTry (const Type &rAttr) const
 Attribute typeinfo.
virtual Idx AttributesSize (void) const
 Get number of explicit (aka non-default) attributes.
virtual void ClearAttributes (void)
 Clear all attributes to default value.
virtual bool EqualAttributes (const TBaseSet< T, Cmp > &rOtherSet) const
 Test whether attributes match with other set, Return true if attributes match for shared elements.
virtual bool operator== (const TBaseSet< T, Cmp > &rOtherSet) const
 Test set equality.
virtual bool EqualAttributes (const TaBaseSet &rOtherSet) const
 Test whether attributes match with other set, Return true if attributes match for shared elements.
virtual Attr * Attributep (const T &rElem)
 Get attribute reference by element.
virtual const Attr & Attribute (const T &rElem) const
 Get attribute by element.
virtual void Attribute (const T &rElem, const Type &attr)
 Set attribute.
virtual void Attribute (const T &rElem, const Attr &attr)
 Set attribute.
virtual void AttributeTry (const T &rElem, const Type &attr)
 Set attribute.
virtual void Attributes (const TBaseSet< T, Cmp > &rOtherSet)
 Set attributes.
virtual void Attributes (const TaBaseSet &rOtherSet)
 Set attributes.
virtual void ClrAttribute (const T &rElem)
 Clear attribute to default value.
bool Insert (const T &rElem)
 Insert element.
bool Insert (const T &rElem, const Attr &attr)
 Insert element with attribute.
void InsertSet (const TBaseSet< T, Cmp > &rOtherSet)
 Inserts elements of rOtherSet.
void InsertSet (const TaBaseSet &rOtherSet)
 Inserts elements of rOtherSet.
bool Erase (const T &rElem)
 Erase Element (incl its attribute)
TBaseSet< T, Cmp >::Iterator Erase (const typename TBaseSet< T, Cmp >::Iterator &pos)
 Erase element by iterator (incl attribute)
void EraseSet (const TBaseSet< T, Cmp > &rOtherSet)
 Erase elements given by other set.
void RestrictSet (const TBaseSet< T, Cmp > &rOtherSet)
 Restrict to specified subset.
void SetUnion (const TBaseSet< T, Cmp > &rOtherSet)
 Set union.
void SetIntersection (const TBaseSet< T, Cmp > &rOtherSet)
 Set intersection.
virtual void Detach (void) const
 Detach from extern storage (reimplement base)
- Public Member Functions inherited from faudes::TBaseSet< T, Cmp >
 TBaseSet (void)
 Constructor.
 TBaseSet (const TBaseSet &rOtherSet)
 Copy-constructor.
 TBaseSet (const std::string &rFilename, const std::string &rLabel="BaseSet")
 Constructor from file.
virtual ~TBaseSet (void)
 Virtual destructor.
const std::string & Name (void) const
 Return name of TBaseSet.
void Name (const std::string &rName)
 Set name of TBaseSet.
Idx Size (void) const
 Get Size of TBaseSet.
bool Empty (void) const
 Test whether if the TBaseSet is Empty.
virtual std::string Str (const T &rElem) const
 Return pretty printable element.
Iterator Begin (void) const
 Iterator to the begin of set.
Iterator End (void) const
 Iterator to the end of set.
virtual bool Valid (const T &rElem) const
 Test validty of candidate element.
virtual Iterator Erase (const Iterator &pos)
 Erase element by iterator.
virtual Iterator Inject (const Iterator &pos, const T &rElem)
 Insert specified element.
virtual void Inject (const T &rElem)
 Insert specified element.
bool Exists (const T &rElem) const
 Test existence of element.
Iterator Find (const T &rElem) const
 Find element and return iterator.
TBaseSet operator+ (const TBaseSet &rOtherSet) const
 Set union operator.
TBaseSet operator- (const TBaseSet &rOtherSet) const
 Set difference operator.
TBaseSet operator* (const TBaseSet &rOtherSet) const
 Set intersection operator.
bool operator<= (const TBaseSet &rOtherSet) const
 Test for subset.
bool operator>= (const TBaseSet &rOtherSet) const
 Test for superset.
bool operator< (const TBaseSet &rOtherSet) const
 Order for sorting containers of TBaseSet.
void DValid (const std::string &rMessage="") const
 Some validation of deferred copy mechanism (provoke abort)
virtual void Lock (void) const
 Detach and lock any further reallocation.
virtual void XElementTag (const std::string &rTag)
 Configure the element name tag.
virtual const std::string & TypeName (void) const
 Get objects's type name.
virtual void TypeName (const std::string &rType)
 Overwrite faudes-type name.
- Public Member Functions inherited from faudes::Type
 Type (void)
 Constructor.
 Type (const Type &rType)
 Copy constructor.
virtual ~Type (void)
 Destructor.
virtual TypeNew (void) const
 Construct on heap.
virtual TypeCopy (void) const
 Construct on heap.
virtual const TypeCast (const Type *pOther) const
 Cast other object to this type.
virtual TypeAssign (const Type &rSrc)
 Assign configuration data from other object.
virtual Typeoperator= (const Type &rSrc)
 Assign configurationdata from other object.
virtual bool Equal (const Type &rOther) const
 Test equality of configuration data.
virtual bool operator== (const Type &rOther) const
 Test equality of configuration data.
virtual bool operator!= (const Type &rOther) const
 Test equality of configuration data.
void Write (const Type *pContext=0) const
 Write configuration data to console.
void Write (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 Write configuration data to a file.
void Write (const std::string &pFileName, std::ios::openmode openmode) const
 Write configuration data to a file.
void Write (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to TokenWriter.
virtual void XWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to an XML file.
void XWrite (const Type *pContext=0) const
 Write configuration data in XML format to concole Note: this write function uses the virtual function DoXWrite(), to be reimplemented by derived classes.
void XWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in XML format to TokenWriter.
std::string ToString (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a string.
std::string ToText (const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data to a formated string.
void DWrite (const Type *pContext=0) const
 Write configuration data to console, debugging format.
void DWrite (const std::string &pFileName, const std::string &rLabel="", const Type *pContext=0, std::ios::openmode openmode=std::ios::out|std::ios::trunc) const
 Write configuration data to a file, debugging format.
void DWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data in debug format to TokenWriter.
void SWrite (TokenWriter &rTw) const
 Write statistics comment to TokenWriter.
void SWrite (void) const
 Write statistics comment to console.
std::string ToSText (void) const
 Write statistics to a string.
void Read (const std::string &rFileName, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from file with label specified.
void FromString (const std::string &rString, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from a string.
void Read (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Read configuration data from TokenReader with label sepcified.

Protected Types

typedef TBaseSet< T, Cmp >
::iterator 
iterator
 use TBaseSet STL iterators
typedef TBaseSet< T, Cmp >
::const_iterator 
const_iterator
 use TBaseSet STL iterators
typedef TBaseSet< T, Cmp >
::aiterator 
aiterator
 use TBaseSet STL iterators
typedef TBaseSet< T, Cmp >
::const_aiterator 
const_aiterator
 use TBaseSet STL iterators
- Protected Types inherited from faudes::TBaseSet< T, Cmp >
typedef std::set< T, Cmp >
::iterator 
iterator
 STL iterator, non-const version.
typedef std::set< T, Cmp >
::const_iterator 
const_iterator
 STL iterator, const version.
typedef std::map< T,
AttributeVoid * >::iterator 
aiterator
 STL attribute iterator, non-const version.
typedef std::map< T,
AttributeVoid * >
::const_iterator 
const_aiterator
 STL attribute iterator, const version.

Protected Member Functions

virtual void DoAssign (const TaBaseSet &rSourceSet)
 assignment from source with matching attributes
virtual bool DoEqual (const TBaseSet< T, Cmp > &rOtherSet) const
 test equality, ignore attributes
virtual void DoAttributep (const T &rElem, const Type *pAttr)
 set attribute in map (assume elem exists in set, NULL <=> set to default)
virtual void DoAttributep (const T &rElem, const Attr *pAttr)
 set attribute in map (assume elem exists in set, NULL <=> set to default)
virtual const Attr * DoAttributep (const T &rElem) const
 get attribute from map (return null if elem does not exist in map)
virtual Attr * DoAttributep (const T &rElem)
 get attribute from map (insert explicit default if elem does not exist in map)
- Protected Member Functions inherited from faudes::TBaseSet< T, Cmp >
virtual void DoWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Token output, see Type::DWrite for public wrappers.
virtual void DoDWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Token output, debugging see Type::DWrite for public wrappers.
virtual void DoSWrite (TokenWriter &rTw) const
 Token output, see Type::SWrite for public wrappers.
virtual void DoRead (TokenReader &rTr, const std::string &rLabel="", const Type *pContext=0)
 Token input, see Type::Read for public wrappers.
virtual void DoAssign (const TBaseSet &rSourceSet)
 assign my members
TBaseSet< T, Cmp >::Iterator ThisIterator (const typename std::set< T, Cmp >::const_iterator &sit) const
 Convert STL iterator to API iterator.
void RelinkClients (void)
 Ensure that we do not host contents to anyone else.
void AttachClient (TBaseSet *pRef) const
 Record that we provide contents to some other BaseSet.
void DetachClient (TBaseSet *pRef) const
 Record that we stop providing data for some TBaseSet.
void AttachIterator (Iterator *pFit) const
 Record that an iterator refers to this TBaseSet.
void DetachIterator (Iterator *pFit) const
 Record that an iterator stops to refer to this TBaseSet.
virtual const TypeDefinitionTypeDefinitionp (void) const
 Reimplment from type to use chache.
virtual const std::string & XElementTag (void) const
 Get name of elements (used for XML IO)
void FnctUnion (const TBaseSet &rOtherSet, TBaseSet &rRes) const
 static empty STL client list
void FnctDifference (const TBaseSet &rOtherSet, TBaseSet &rRes) const
 Implementation of difference.
void FnctIntersection (const TBaseSet &rOtherSet, TBaseSet &rRes) const
 Implementation of intersection.
- Protected Member Functions inherited from faudes::Type
virtual void DoAssign (const Type &rSrc)
 Assign configuration data from other object.
virtual bool DoEqual (const Type &rOther) const
 Test equality of configuration data.
virtual void DoXWrite (TokenWriter &rTw, const std::string &rLabel="", const Type *pContext=0) const
 Write configuration data of this object to TokenWriter in XML format.
virtual Token XBeginTag (const std::string &rLabel="", const std::string &rFallbackLabel="") const

Protected Attributes

Attr * mpDefAttribute
 default attribute
- Protected Attributes inherited from faudes::TBaseSet< T, Cmp >
std::string mMyName
 Name of this BaseSet.
std::set< T, Cmp > * pSet
 Pointer on STL set to operate on.
std::set< T, Cmp > * mpSet
 STL set, if this object hosts data (else NULL)
std::map< T, AttributeVoid * > * pAttributes
 Pointer to attribute map to operate on.
std::map< T, AttributeVoid * > * mpAttributes
 Attribute map, if this object hosts data (else NULL).
TBaseSet< T, Cmp > * pHostSet
 Pointer on BaseSet that hosts our data (THIS if we host)
std::list< TBaseSet< T, Cmp >
* >::iterator 
mClientRecord
 Iterator to the client list that hosts our data (maintained by host)
std::list< TBaseSet< T, Cmp > * > * mpClients
 BaseSets, that use data hosted by us (NULL if we dont host data, emptyset if we host to ourself excl.)
bool mDetached
 Indicate "hosts data to myself only".
bool mLocked
 Indicate "dont re-allocate the STL set ever again".
std::set< Iterator * > mIterators
 Iterators that refer to this TBaseSet.

Additional Inherited Members

- Static Protected Attributes inherited from faudes::TBaseSet< T, Cmp >
static std::set< T, Cmp > msEmptySet = std::set<T,Cmp>()
 static empty STL set for default constructor
static std::map< T,
AttributeVoid * > 
msEmptyAttributes = std::map<T,AttributeVoid*>()
 static empty STL map for default constructor

Detailed Description

template<class T, class Attr, class Cmp = std::less<T>>
class faudes::TaBaseSet< T, Attr, Cmp >

Set with nontrivial attributes.

The TaBaseSet implements the attribute interface introduced in TBaseSet.

Note: while TaBaseSet is indirectly derived from Type, we avoid the FAUDES_TYPE_DECLARATION macro and define the Type interface explicitely. This is for cosmetic reasons only.

Definition at line 47 of file cfl_abaseset.h.

Member Typedef Documentation

template<class T, class Attr, class Cmp = std::less<T>>
typedef TBaseSet<T,Cmp>::aiterator faudes::TaBaseSet< T, Attr, Cmp >::aiterator
protected

use TBaseSet STL iterators

Definition at line 449 of file cfl_abaseset.h.

template<class T, class Attr, class Cmp = std::less<T>>
typedef TBaseSet<T,Cmp>::const_aiterator faudes::TaBaseSet< T, Attr, Cmp >::const_aiterator
protected

use TBaseSet STL iterators

Definition at line 452 of file cfl_abaseset.h.

template<class T, class Attr, class Cmp = std::less<T>>
typedef TBaseSet<T,Cmp>::const_iterator faudes::TaBaseSet< T, Attr, Cmp >::const_iterator
protected

use TBaseSet STL iterators

Definition at line 446 of file cfl_abaseset.h.

template<class T, class Attr, class Cmp = std::less<T>>
typedef TBaseSet<T,Cmp>::iterator faudes::TaBaseSet< T, Attr, Cmp >::iterator
protected

use TBaseSet STL iterators

Definition at line 443 of file cfl_abaseset.h.

Constructor & Destructor Documentation

template<class T , class Attr , class Cmp >
faudes::TaBaseSet< T, Attr, Cmp >::TaBaseSet ( void  )

Constructor.

Definition at line 503 of file cfl_abaseset.h.

template<class T , class Attr , class Cmp >
faudes::TaBaseSet< T, Attr, Cmp >::TaBaseSet ( const TaBaseSet< T, Attr, Cmp > &  rOtherSet)

Copy-constructor.

Uses DoAssign copy the set incl attributes.

Parameters
rOtherSetSource to copy from

Definition at line 512 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp>
faudes::TaBaseSet< T, Attr, Cmp >::TaBaseSet ( const TBaseSet< T, Cmp > &  rOtherSet)

Copy-constructor.

Sets attributes to default. Uses the DoAssign method to convert attributes if possible.

Parameters
rOtherSetSource to copy from

Definition at line 521 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp>
faudes::TaBaseSet< T, Attr, Cmp >::TaBaseSet ( 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.

Parameters
rFilenameName of File
rLabelSection for the set in the file;

Definition at line 530 of file cfl_abaseset.h.

template<class T , class Attr , class Cmp >
faudes::TaBaseSet< T, Attr, Cmp >::~TaBaseSet ( void  )
virtual

Virtual destructor.

Definition at line 540 of file cfl_abaseset.h.

Member Function Documentation

template<class T , class Attr , class Cmp >
TaBaseSet< T, Attr, Cmp > & faudes::TaBaseSet< T, Attr, Cmp >::Assign ( const TaBaseSet< T, Attr, Cmp > &  rSourceSet)
virtual

Faudes Type interface.

Construct object of same type on heap. Faudes Type interface. Construct copy on heap. Faudes Type interface. Cast object to my type. Copy from a TaBaseSet with matching attributes.

Parameters
rSourceSetSet to copy from

Definition at line 562 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp>
TaBaseSet< T, Attr, Cmp > & faudes::TaBaseSet< T, Attr, Cmp >::Assign ( const TBaseSet< T, Cmp > &  rSourceSet)
virtual

Copy from a TBaseSet with attributes, provided that they can be casted acciordingly.

Parameters
rSourceSetSet to copy from

Definition at line 568 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp>
TaBaseSet< T, Attr, Cmp > & faudes::TaBaseSet< T, Attr, Cmp >::AssignWithoutAttributes ( const TBaseSet< T, Cmp > &  rSourceSet)
virtual

Copy from a TBaseSet without attributes.

This method clears all attributes even if they cound be casted.

Parameters
rSourceSetSet to copy from

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 605 of file cfl_abaseset.h.

template<class T , class Attr , class Cmp >
const Attr & faudes::TaBaseSet< T, Attr, Cmp >::Attribute ( void  ) const
virtual

Attribute typeinfo.

Returns
Reference to some attribute of this sets attribute type

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 873 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp >
const Attr & faudes::TaBaseSet< T, Attr, Cmp >::Attribute ( const T &  rElem) const
virtual

Get attribute by element.

This function returns a const reference to the attribute of the specified element.

Parameters
rElemSpecify element
Exceptions
Exception
  • Element does not exist (63)
Returns
Reference to attribute

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 901 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp >
void faudes::TaBaseSet< T, Attr, Cmp >::Attribute ( const T &  rElem,
const Type attr 
)
virtual

Set attribute.

Provided that the attribute can be casted to the appropriate type, this method sets the attribute of the sepcified element to the given value.

Parameters
rElemSpecify element
attrAttribute value.
Exceptions
Exception
  • Element does not exist (60)
  • Cannot cast attribute type (63)

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 918 of file cfl_abaseset.h.

template<class T, class Attr, class Cmp >
void faudes::TaBaseSet< T, Attr, Cmp >::Attribute ( const T &  rElem,
const Attr &  attr 
)
virtual

Set attribute.

This method sets the attribute of the sepcified element to the given value.

Parameters
rElemSpecify element
attrAttribute value.
Exceptions
Exception
  • Element does not exist (60)
  • Cannot cast attribute type (63)

Definition at line 950 of file cfl_abaseset.h.

template<class T , class Attr , class Cmp >
const Attr * faudes::TaBaseSet< T, Attr, Cmp >::Attributep ( void  ) const
virtual

Attribute typeinfo.

Returns
Pointer to some attribute of this sets attribute type.

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 868 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp >
Attr * faudes::TaBaseSet< T, Attr, Cmp >::Attributep ( const T &  rElem)
virtual

Get attribute reference by element.

Note that in order to produce a non-const reference this method will insert an explicit default attribute if necessary. If a const reference is sufficient, you should use Attribute(rElem) const instead.

Parameters
rElemSpecify element
Exceptions
Exception
  • Element does not exist (60)
Returns
Pointer to attribute

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 884 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp>
void faudes::TaBaseSet< T, Attr, Cmp >::Attributes ( const TBaseSet< T, Cmp > &  rOtherSet)
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.

Parameters
rOtherSetOther BaseSet
Exceptions
Exception
  • Cannot cast attribute type (63)

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 964 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp>
void faudes::TaBaseSet< T, Attr, Cmp >::Attributes ( const TaBaseSet< T, Attr, Cmp > &  rOtherSet)
virtual

Set attributes.

Attributes are copied per element from rOtherSet. Elements of this set which are not in rOtherSet maintain their attribute.

Parameters
rOtherSetOther BaseSet

Definition at line 989 of file cfl_abaseset.h.

template<class T , class Attr , class Cmp >
Idx faudes::TaBaseSet< T, Attr, Cmp >::AttributesSize ( void  ) const
virtual

Get number of explicit (aka non-default) attributes.

Returns
Number of entries in mAttributeMap

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 1213 of file cfl_abaseset.h.

template<class T , class Attr , class Cmp >
bool faudes::TaBaseSet< T, Attr, Cmp >::AttributeTry ( const Type rAttr) const
virtual

Attribute typeinfo.

An TaBaseSet accepts all attributes that we can cast to our default attribute's type. The implementation uses the virtual function Cast of the default attribute to perform the test. Thus, it is crucial that Cast is re-implemented for attribute classes.

Parameters
rAttrAttribute type to test.
Returns
True, if attribute type is accepted.

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 878 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp >
void faudes::TaBaseSet< T, Attr, Cmp >::AttributeTry ( const T &  rElem,
const Type attr 
)
virtual

Set attribute.

Provided that the attribute can be casted to the appropriate type, this method sets the attribute of the sepcified element to the given value. If the cast fails, this method does nothing.

Parameters
rElemSpecify element
attrAttribute value.
Exceptions
Exception
  • Element does not exist (60)

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 936 of file cfl_abaseset.h.

template<class T , class Attr , class Cmp >
void faudes::TaBaseSet< T, Attr, Cmp >::Clear ( void  )
virtual
template<class T , class Attr , class Cmp >
void faudes::TaBaseSet< T, Attr, Cmp >::ClearAttributes ( void  )
virtual

Clear all attributes to default value.

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 1015 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp >
void faudes::TaBaseSet< T, Attr, Cmp >::ClrAttribute ( const T &  rElem)
virtual

Clear attribute to default value.

Parameters
rElemSpecify element

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 1009 of file cfl_abaseset.h.

template<class T , class Attr , class Cmp >
void faudes::TaBaseSet< T, Attr, Cmp >::Detach ( void  ) const
virtual

Detach from extern storage (reimplement base)

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 666 of file cfl_abaseset.h.

template<class T , class Attr , class Cmp >
void faudes::TaBaseSet< T, Attr, Cmp >::DoAssign ( const TaBaseSet< T, Attr, Cmp > &  rSourceSet)
protectedvirtual

assignment from source with matching attributes

Definition at line 549 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp >
void faudes::TaBaseSet< T, Attr, Cmp >::DoAttributep ( const T &  rElem,
const Type pAttr 
)
protectedvirtual

set attribute in map (assume elem exists in set, NULL <=> set to default)

Definition at line 1129 of file cfl_abaseset.h.

template<class T, class Attr, class Cmp >
void faudes::TaBaseSet< T, Attr, Cmp >::DoAttributep ( const T &  rElem,
const Attr *  pAttr 
)
protectedvirtual

set attribute in map (assume elem exists in set, NULL <=> set to default)

Definition at line 1173 of file cfl_abaseset.h.

template<class T, class Attr, class Cmp >
const Attr * faudes::TaBaseSet< T, Attr, Cmp >::DoAttributep ( const T &  rElem) const
protectedvirtual

get attribute from map (return null if elem does not exist in map)

Definition at line 1100 of file cfl_abaseset.h.

template<class T, class Attr, class Cmp >
Attr * faudes::TaBaseSet< T, Attr, Cmp >::DoAttributep ( const T &  rElem)
protectedvirtual

get attribute from map (insert explicit default if elem does not exist in map)

Definition at line 1108 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp>
bool faudes::TaBaseSet< T, Attr, Cmp >::DoEqual ( const TBaseSet< T, Cmp > &  rOtherSet) const
protectedvirtual

test equality, ignore attributes

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 615 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp>
bool faudes::TaBaseSet< T, Attr, Cmp >::EqualAttributes ( const TBaseSet< T, Cmp > &  rOtherSet) const
virtual

Test whether attributes match with other set, Return true if attributes match for shared elements.

It uses the equality test of individual attributes and, hence, requires the type match too.

Parameters
rOtherSetOther set to compare with.
Returns
True on match.

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 1030 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp>
bool faudes::TaBaseSet< T, Attr, Cmp >::EqualAttributes ( const TaBaseSet< T, Attr, Cmp > &  rOtherSet) const
virtual

Test whether attributes match with other set, Return true if attributes match for shared elements.

It uses the equality test of individual attributes and, hence, requires the type match too.

Parameters
rOtherSetOther set to compare with.
Returns
True on match.

Definition at line 1069 of file cfl_abaseset.h.

template<class T, class Attr, class Cmp = std::less<T>>
TBaseSet<T,Cmp>::Iterator faudes::TaBaseSet< T, Attr, Cmp >::Erase ( const typename TBaseSet< T, Cmp >::Iterator pos)
inline

Erase element by iterator (incl attribute)

Parameters
posIterator to specify element
Returns
Iterator to next element or End()

Definition at line 390 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp>
void faudes::TaBaseSet< T, Attr, Cmp >::EraseSet ( const TBaseSet< T, Cmp > &  rOtherSet)
virtual

Erase elements given by other set.

This function ignores the attributes of the other set and maintains the attributes of the remaining elements in this set.

Parameters
rOtherSetElements to erase

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 796 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp >
bool faudes::TaBaseSet< T, Attr, Cmp >::Insert ( const T &  rElem)
virtual
template<class T, class Attr, class Cmp >
bool faudes::TaBaseSet< T, Attr, Cmp >::Insert ( const T &  rElem,
const Attr &  attr 
)
template<class T, class Attr , class Cmp>
void faudes::TaBaseSet< T, Attr, Cmp >::InsertSet ( const TBaseSet< T, Cmp > &  rOtherSet)
virtual

Inserts elements of rOtherSet.

Attributes of this set are maintained, newly inserted elements have default attribute.

Parameters
rOtherSetOther BaseSet

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 718 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp>
void faudes::TaBaseSet< T, Attr, Cmp >::InsertSet ( const TaBaseSet< T, Attr, Cmp > &  rOtherSet)

Inserts elements of rOtherSet.

Attributes of this set are maintained, new elements are inserted with attribute.

Parameters
rOtherSetOther BaseSet

Definition at line 746 of file cfl_abaseset.h.

template<class T, class Attr, class Cmp = std::less<T>>
virtual TaBaseSet& faudes::TaBaseSet< T, Attr, Cmp >::operator= ( const TaBaseSet< T, Attr, Cmp > &  rSource)
inlinevirtual

Faudes Type interface.

Assignment operator with strict type matching.

Parameters
rSourceObject to assign from

Definition at line 138 of file cfl_abaseset.h.

template<class T, class Attr, class Cmp = std::less<T>>
virtual TaBaseSet& faudes::TaBaseSet< T, Attr, Cmp >::operator= ( const TBaseSet< T, Cmp > &  rSource)
inlinevirtual

Faudes Type interface (extension).

Assignment operator incl attribute cast.

Parameters
rSourceObject to assign from

Definition at line 145 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp>
bool faudes::TaBaseSet< T, Attr, Cmp >::operator== ( const TBaseSet< T, Cmp > &  rOtherSet) const
virtual

Test set equality.

The test ignores attributes. It is implemented by the virtual method DoEqual().

Parameters
rOtherSetOther set to compare with.
Returns
True on match.

Definition at line 661 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp>
void faudes::TaBaseSet< T, Attr, Cmp >::RestrictSet ( const TBaseSet< T, Cmp > &  rOtherSet)
virtual

Restrict to specified subset.

Erases any elements no in the specified set. This function ignores the attributes of the other set and maintains the attributes of the remaining elements in this set.

Parameters
rOtherSetElements to erase

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 822 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp>
void faudes::TaBaseSet< T, Attr, Cmp >::SetIntersection ( const TBaseSet< T, Cmp > &  rOtherSet)
virtual

Set intersection.

The intersection is wrt set of indices, the result is stored in this set. Attributes are set to default.

Parameters
rOtherSetOther BaseSet

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 861 of file cfl_abaseset.h.

template<class T, class Attr , class Cmp>
void faudes::TaBaseSet< T, Attr, Cmp >::SetUnion ( const TBaseSet< T, Cmp > &  rOtherSet)
virtual

Set union.

The union is wrt the set of indices, the result is accumulated in this set. Attributes are set to default. See also InsertSet(const TaBaseSet&).

Parameters
rOtherSetOther BaseSet

Reimplemented from faudes::TBaseSet< T, Cmp >.

Definition at line 855 of file cfl_abaseset.h.

Member Data Documentation

template<class T, class Attr, class Cmp = std::less<T>>
Attr* faudes::TaBaseSet< T, Attr, Cmp >::mpDefAttribute
protected

default attribute

Definition at line 456 of file cfl_abaseset.h.


The documentation for this class was generated from the following file:

libFAUDES 2.26g --- 2015.08.17 --- c++ api documentaion by doxygen