Taxonomy Categories:
Member Functions:
Interface Category:
API.
Inherits From:
TCollectionOf
Inherited By:
TIndexedSequenceOf
TDequeOf
TSortedSequenceOf
Purpose:
TSequenceOf is an abstract base class you can use to create collections of ordered objects. TSequenceOf defines several operators for retrieving the first or last object as well as operators for retrieving the object before or after the current element. The collection automatically grows in size, as needed, when objects are added.
Instantiation:
Allocate on the heap or the stack.
Deriving Classes:
Do not derive classes from TSequenceOf.
Concurrency:
Not multithread safe.
Resource Use:
No special requirements.
Other Considerations:
None.
virtual ~ TSequenceOf ()
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: TSequenceOf::After
AType * After (const AType & obj) const
Interface Category:
API.
Purpose:
Returns the object found after the specified object.
Calling Context:
Call this function directly when you want to retrieve the object in the collection that occurs after the object to which you already have a reference.
Parameters:
- const AType & obj -The object to which you already have a reference.
Return Value:
A pointer to the object found after the object specified. A NIL reference is returned if the object you specified is the last object in the collection.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSequenceOf::Before
AType * Before (const AType & obj) const
Interface Category:
API.
Purpose:
Returns the object found before the specified object.
Calling Context:
Call this function directly when you want to retrieve the object in the collection that occurs before the object to which you already have a reference.
Parameters:
- const AType & obj -The object to which you already have a reference.
Return Value:
A pointer to the object found before the object specified. A NIL pointer is returned if the object you specified is the first object in the collection.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSequenceOf::Last
AType * Last () const
Interface Category:
API.
Purpose:
Finds the last object in the collection.
Calling Context:
Call this function directly to find the last object in the collection.
Parameters:
Return Value:
A pointer to the last object in the collection. A NIL pointer is returned if the collection is empty.
Exceptions:
After 1.0 it will throw kIndexOutOfBounds exception if collection is empty.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSequenceOf::First
AType * First () const
Interface Category:
API.
Purpose:
Returns a reference to the first object in the collection.
Calling Context:
Call this function directly to find the first object in the collection.
Parameters:
Return Value:
A pointer to the first object in the collection. A NIL pointer is returned if the collection is empty.
Exceptions:
After 1.0 it will throw kIndexOutOfBounds exception if collection is empty.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSequenceOf::OccurrencesOf
CollectionCount OccurrencesOf (const AType & obj) const
Interface Category:
API.
Purpose:
Counts the number of objects in the collection that match the specified object.
Calling Context:
Call this function directly to determine the number of objects in the collection that match the object you specify.
Parameters:
- const AType & obj -The object to be searched for.
Return Value:
The number of matching objects found in the collection.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSequenceOf::CreateSequenceIterator
TSequenceOfIterator < AType > * CreateSequenceIterator () const
Interface Category:
API.
Purpose:
Creates an iterator for this collection.
Calling Context:
Call this function directly to create an iterator for this collection. The iterator allows you to iterate over elements in the collection.
Parameters:
Return Value:
A pointer to the iterator.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSequenceOf::operator==
bool operator ==(const TSequenceOf < AType > & sequenceOf) const
Interface Category:
API.
Purpose:
Tests whether this collection's contents differ from those of the argument.
Calling Context:
Call this function directly to test the equivalence of two objects on either side of the ==symbol.
Parameters:
- const TSequenceOf < AType > & sequenceOf -The object to be compared to this object.
Return Value:
Returns true if the contents of each collection are equivalent.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSequenceOf::operator!=
bool operator != (const TSequenceOf < AType > & sequenceOf) const
Interface Category:
API.
Purpose:
Tests whether this collection's contents differ from those of the argument.
Calling Context:
Call this function directly to test the equivalence of two objects on either side of the != symbol.
Parameters:
- const TSequenceOf < AType > & sequenceOf -The object to be compared to this object.
Return Value:
Returns true if the contents of each collection are not equivalent.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
- TSequenceOf (const TSequenceOf < AType > & that)
- TSequenceOf ()
Interface Category:
API.
Purpose:
- Copy constructor.
- Default constructor.
Calling Context:
- Call this function directly to copy an object.
- Call this function directly anywhere the creation of an empty TSequenceOf is desired.
Parameters:
- const TSequenceOf < AType > & that -The object to be copied.
- Takes no parameters.
Return Value:
None.
Exceptions:
Throws no exceptions, passes all exceptions through.
Concurrency:
Not multithread safe.
Other Considerations:
None.
Member Function: TSequenceOf::operator=
const TSequenceOf < AType > & operator =(const TSequenceOf < AType > & that)
Interface Category:
API.
Purpose:
Assignment operator.
Calling Context:
Call this function directly when an object is assigned to another compatible object.
Parameters:
- const TSequenceOf < AType > & that -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.
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.