Class: TDictionaryOfIterator

Declaration: DictionaryIterator.h

Taxonomy Categories:

Member Functions:


Interface Category:

API.

Inherits From:

TIteratorOver

Inherited By:

None.

Purpose:

TDictionaryOfIterator allows you to iterate over the objects in a TDictionaryOf collection.

Instantiation:

Allocate on the heap or the stack.

Deriving Classes:

Do not derive any classes from TDictionaryOfIterator.

Concurrency:

Not multithread safe.

Resource Use:

No special requirements.

Other Considerations:

The objects returned by the operators First and Next must not be deleted and should only be used to retrieve the key and value of the object. In future releases these operators will replaced by operators that take a reference to a TKeyValuePair to be filled in.

Member Function: TDictionaryOfIterator::TDictionaryOfIterator

  1. TDictionaryOfIterator (const TDictionaryOf < AKey, AValue >* h)
  2. TDictionaryOfIterator ()
  3. TDictionaryOfIterator (const TDictionaryOfIterator < AKey, AValue >& iterator)

Interface Category:

API.

Purpose:

  1. Copies the collection.
  2. Default constructor.
  3. Creates a TDictionaryOfIterator with a NIL implementation.

Calling Context:

  1. Call this function directly to copy an object.
  2. Call this function directly anywhere the creation of a TDictionaryOfIterator is desired.
  3. Call this function directly to create a TDictionaryOfIterator with its implementation set to the specified iterator.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

Do not use TDictionaryOfIterator(3) as it is not yet fully implemented.

Member Function: TDictionaryOfIterator::~TDictionaryOfIterator

virtual ~ TDictionaryOfIterator ()

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: TDictionaryOfIterator::First

virtual TKeyValuePair < AKey , AValue >* First ()

Interface Category:

API.

Purpose:

Retrieves the first key-value pair. This call resynchronizes the iterator to the dictionary, if the two are no longer synchronized.

Calling Context:

Call this function directly to retrieve the first key-value pair.

Parameters:

Return Value:

A reference to the first key-value pair in the collection.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The object returned by this operator must not be deleted and should only be used to retrieve the key and value of the object. In future releases this operator will replaced by an operator that takes a reference to a TKeyValuePair to be filled in.

Member Function: TDictionaryOfIterator::Next

virtual TKeyValuePair < AKey , AValue >* Next ()

Interface Category:

API.

Purpose:

Returns the next key-value pair in the collection after the current pair.

Calling Context:

Call this function directly to retrieve the key-value pair in the collection.

Parameters:

Return Value:

A reference to the next key-value pair in the collection. A NIL reference is returned if there are no more objects in the collection.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

The object returned by this operator must not be deleted and should only be used to retrieve the key and value of the object. In future releases this operator will replaced by an operator that takes a reference to a TKeyValuePair to be filled in.

Member Function: TDictionaryOfIterator::Remove

virtual void Remove ()

Interface Category:

API.

Purpose:

Removes the current key-value pair from the collection.

Calling Context:

Call this function directly to remove an object from the collection.

Parameters:

Return Value:

None.

Exceptions:

Throws no exceptions, passes all exceptions through.

Concurrency:

Not multithread safe.

Other Considerations:

None.

Member Function: TDictionaryOfIterator::operator=

const TDictionaryOfIterator < AKey , AValue >& operator =(const TDictionaryOfIterator < AKey, AValue >&)

Interface Category:

API.

Purpose:

Assignment operator.

Calling Context:

Call this function directly when an object is assigned to another compatible object.

Parameters:

Return Value:

A reference to the left-hand 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.