Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TCollectionOf
Inherited By:
None.
Purpose:
TSetOf is a template class that you can use to create unordered collections of objects. Operators are provided for modifying a TSetOf object base on the contents of another TSetOf object. TSetOf also inherits operators for adding, removing, querying, counting and iterating the objects it contains.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
You should not derive any classes from TSetOf.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
- TSetOf ()
2 TSetOf (const TSetOf < AType > & s)
- TSetOf (TComparator < AType > * adoptedComparator, TStreamer < AType > * adoptedStreamer, CollectionCount setSizeHint =kCollectionSizeHint)
Interface Category:
API.
Purpose:
- Default constructor.
- Copy constructor.
- Creates a TSetOf with the comparator and streamer intialized to the specified objects.
Calling Context:
- Call this function directly anywhere the creation of a TSetOf is desired.
- Call this function directly to copy an object.
- Call this function directly to create an object with the specified comparator and streamer objects.
Parameters:
- Takes no parameters.
- const TSetOf < AType > * s -The object to be copied.
- TComparator < AType > * adoptedComparator -The comparator object to use.
- TStreamer < AType > * adoptedStreamer -The streamer object to use.
- CollectionCount setSizeHint =kCollectionSizeHint -The recommemded initial size for this collection.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
virtual ~ TSetOf ()
Interface Category:
API.
Purpose:
Destructor.
Calling Context:
Call this function directly to destroy an object.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSetOf::operator=
const TSetOf < AType > & operator =(const TSetOf < AType > &)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Call this function directly when an object is assigned to another compatible object.
Parameters:
- const TSetOf < AType > & -The object to be copied.
Return Value:
A reference to the left-hand side object.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSetOf::Difference
- void Difference (const TSetOf < AType > & set1)
- void Difference (const TSetOf < AType > & set1, TSetOf < AType > & resulTSetOf) const
Interface Category:
API.
Purpose:
- Compares this set to set1 then modifies this set to contain only those objects that do not appear in set1.
- Compares this set to set1. Then modifies resultSet to contain only those objects that appear in this set but do not appear in set1.
Calling Context:
- Call this function directly to modify this set or that it contains only those objects that do not appear in the other set.
- Call this function directly to modify resultSet so that it contains only those objects that appear in this set and not in set1.
Parameters:
- const TSetOf < AType > & set1 -The set to compare this set to.
- const TSetOf < AType > & set1 -The set to compare this set to.
- TSetOf < AType > & resulTSetOf -The set which will hold the resulting set.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSetOf::Intersection
- void Intersection (const TSetOf < AType > & set1)
- void Intersection (const TSetOf < AType > & set1, TSetOf < AType > & resulTSetOf) const
Interface Category:
API.
Purpose:
- Compares this set to set1 then modifies this set to contain only those objects that appear in this set and set1.
- Compares this set to set1. Then modifies resultSet to contain only those objects that appear in this set and in set1.
Calling Context:
- Call this function directly to modify this set or that it contains the intersection of this set and set1.
- Call this function directly to modify resultSet so that it contains the intersection of this set and set1.
Parameters:
- const TSetOf < AType > & set1 -The set to compare this set to.
- const TSetOf < AType > & set1 -The set to compare this set to.
- TSetOf < AType > & resulTSetOf -The set which will hold the resulting set.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSetOf::Union
- void Union (const TSetOf < AType > & set1)
- void Union (const TSetOf < AType > & set1, TSetOf < AType > & resulTSetOf) const
Interface Category:
API.
Purpose:
- Compares this set to set1 then modifies this set to contain those objects that appear in both this set and set1.
- Compares this set to set1. Then modifies resultSet to contain those objects that appear in both this set and in set1.
Calling Context:
- Call this function directly to modify this set so that it contains the union of this set and set1.
- Call this function directly to modify resultSet so that it contains the union of this set and set1.
Parameters:
- const TSetOf < AType > & set1 -The set to compare this set to.
- const TSetOf < AType > & set1 -The set to compare this set to.
- TSetOf < AType > & resulTSetOf -The set which will hold the resulting set.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSetOf::Xor
- void Xor (const TSetOf < AType > & set1)
- void Xor (const TSetOf < AType > & set1, TSetOf < AType > & resulTSetOf) const
Interface Category:
API.
Purpose:
- Compares this set to set1 then modifies this set to contain those objects that appear in this set or set1, but not both.
- Compares this set to set1. Then modifies resultSet to contain those objects that appear in this set or set1, but not both.
Calling Context:
- Call this function directly to modify this set so that it contains the exclusive OR of this set and set1.
- Call this function directly to modify resultSet so that it contains the exclusive OR of this set and set1.
Parameters:
- const TSetOf < AType > & set1 -The set to compare this set to.
- const TSetOf < AType > & set1 -The set to compare this set to.
- TSetOf < AType > & resulTSetOf -The set which will hold the resulting set.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSetOf::Rehash
void Rehash ()
Interface Category:
API.
Purpose:
Rehashes this set.
Calling Context:
Call this function directly to rehash this set.
Parameters:
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSetOf::operator==
bool operator ==(const TSetOf < AType > & setOf) const
Interface Category:
API.
Purpose:
Tests whether this set is equivalent to another set.
Calling Context:
Call this function directly to test the equivalence of the two objects on either side of the == symbol.
Parameters:
- const TSetOf < AType > & setOf -The object to be compared to this set.
Return Value:
Returns true if this set is equivalent to the other set.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSetOf::operator!=
bool operator != (const TSetOf < AType > & setOf) const
Interface Category:
API.
Purpose:
Tests whether this set is equivalent to another set.
Calling Context:
Call this function directly to test the equivalence of the two objects on either side of the != symbol.
Parameters:
- const TSetOf < AType > & setOf -The object to be compared to this set.
Return Value:
Returns true if this set is not equivalent to the other set.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.