Home Libraries Author Links

Abstract Set Types ElemTypeStmSet and ElemTypeStmMultiSet
[Dset: Associative Set and Map Containers]

Collaboration diagram for Abstract Set Types ElemTypeStmSet and ElemTypeStmMultiSet:

Detailed Description

Abstract set and multiset types modelling associative set and multiset containers holding objects of the configurable element type ElemType.


Modules

 Abstract Set Type Example
 intStmSet is an example of an abstract set type with int elements and the element comparison function elemCmp().
 Abstract Multiset Type Example
 intStmMultiSet is an example of an abstract multiset type with int elements and the element comparison function elemCmp().

Defines

#define StmSetTypeDefine(ElemType, elemCmpFct)
 Definition of the abstract set type ElemTypeStmSet of associative set containers holding elements of type ElemType ordered by the function elemCmpFct and definition of its abstract iterator type ElemTypeStmSetIterator.
#define StmMultiSetTypeDefine(ElemType, elemCmpFct)
 Definition of the abstract multiset type ElemTypeStmMultiSet of associative multiset containers holding elements of type ElemType ordered by the function elemCmpFct and definition of its abstract iterator type ElemTypeStmMultiSetIterator.


Define Documentation

#define StmSetTypeDefine ( ElemType,
elemCmpFct   ) 

Value:

StmSetAcTypeImpl_ (StmSet, ElemType, elemCmpFct, 0)                            \
StmSetAcIteratorImpl_(StmSet, ElemType)                                        \
StmUniqAcImpl_ (StmSet, ElemType)
Definition of the abstract set type ElemTypeStmSet of associative set containers holding elements of type ElemType ordered by the function elemCmpFct and definition of its abstract iterator type ElemTypeStmSetIterator.

Parameters:
[in] ElemType The element type of the set container.
[in] elemCmpFct The element comparison function of the set container.
Requires:
ElemType is a type name designating an existing type.
elemCmpFct shall have the signature
           int elemCmpFct (const ElemType *pEl1, const ElemType *pEl2);
and return a value less than, equal to or greater than null, if the ElemType object pointed to by pEl1 is less than, equal to or greater than the one pointed to by pEl2, respectively, thus inducing an equivalence relation on the set of objects of type ElemType.
Effects:
The macro defines the abstract set type ElemTypeStmSet of associative set containers holding elements of type ElemType which are stored in ascending order according to the element comparison function elemCmpFct.
Moreover, the macro defines the abstract iterator type ElemTypeStmSetIterator by means of which elements contained in a set container object can be referenced.
Abstract set types have the element uniqueness property, meaning that an associative set container cannot hold any two different elements being equivalent with respect to the equivalence relation induced by elemCmpFct.
Note:
For an example documenting all method functions of an abstract set type and its iterator type see Abstract Set Type Example.
See also:
StmMultiSetTypeDefine, StmMapTypeDefine, StmMultiMapTypeDefine
Examples:
dsettst.c.

Definition at line 149 of file dset.h.

#define StmMultiSetTypeDefine ( ElemType,
elemCmpFct   ) 

Value:

StmSetAcTypeImpl_ (StmMultiSet, ElemType, elemCmpFct, 1)                      \
StmSetAcIteratorImpl_(StmMultiSet, ElemType)                                  \
StmMultAcImpl_ (StmMultiSet, ElemType)
Definition of the abstract multiset type ElemTypeStmMultiSet of associative multiset containers holding elements of type ElemType ordered by the function elemCmpFct and definition of its abstract iterator type ElemTypeStmMultiSetIterator.

Parameters:
[in] ElemType The element type of the multiset container.
[in] elemCmpFct The element comparison function of the multiset container.
Requires:
ElemType is a type name designating an existing type.
elemCmpFct shall have the signature
           int elemCmpFct (const ElemType *pEl1, const ElemType *pEl2);
and return a value less than, equal to or greater than null, if the ElemType object pointed to by pEl1 is less than, equal to or greater than the one pointed to by pEl2, respectively, thus inducing an equivalence relation on the set of objects of type ElemType.
Effects:
The macro defines the abstract multiset type ElemTypeStmMultiSet of associative multiset containers holding elements of type ElemType which are stored in ascending order according to the element comparison function elemCmpFct.
Moreover, the macro defines the abstract iterator type ElemTypeStmMultiSetIterator by means of which elements contained in a multiset container object can be referenced.
Abstract multiset types do not have the element uniqueness property, meaning that an associative multiset container can hold several elements being equivalent with respect to the equivalence relation induced by elemCmpFct.
Note:
For an example documenting all method functions of an abstract multiset type and its iterator type see Abstract Multiset Type Example.
See also:
StmSetTypeDefine, StmMapTypeDefine, StmMultiMapTypeDefine
Examples:
dsettst.c.

Definition at line 195 of file dset.h.


© Copyright Tom Michaelis 2002-2007

Distributed under the SysToMath Software License (See the accompanying file license.txt or a copy at www.SysToMath.com).