sipxportlib  Version 3.3
Public Member Functions | Protected Member Functions | Friends | List of all members
UtlHashMapIterator Class Reference

#include <UtlHashMapIterator.h>

Inheritance diagram for UtlHashMapIterator:
Inheritance graph
[legend]
Collaboration diagram for UtlHashMapIterator:
Collaboration graph
[legend]

Public Member Functions

 UtlHashMapIterator (const UtlHashMap &hashMap)
 
virtual ~UtlHashMapIterator ()
 
virtual UtlContainableoperator() ()
 
virtual void reset ()
 
UtlContainablekey () const
 
UtlContainablevalue () const
 
- Public Member Functions inherited from UtlIterator
 UtlIterator (const UtlContainer &container)
 
virtual ~UtlIterator ()=0
 

Protected Member Functions

virtual void removing (const UtlPair *key)
 
- Protected Member Functions inherited from UtlIterator
void addToContainer (const UtlContainer *container)
 
virtual void invalidate ()
 

Friends

class UtlHashMap
 

Additional Inherited Members

- Protected Attributes inherited from UtlIterator
OsBSem mContainerRefLock
 
UtlContainermpMyContainer
 

Detailed Description

UtlHashMapIterator allows developers to iterate (walks through) the objects in a UtlHashMap.

See also
UtlIterator
UtlHashMap

Constructor & Destructor Documentation

UtlHashMapIterator ( const UtlHashMap hashMap)

Constructor accepting a source UtlHashMap

~UtlHashMapIterator ( )
virtual

Destructor

Member Function Documentation

UtlContainable * operator() ( )
virtual

Return the key for the next element.

Returns
The next element key or NULL if no more elements are available.

Implements UtlIterator.

void reset ( void  )
virtual

Reset the list by moving the iterator cursor to the location before the first element.

Implements UtlIterator.

UtlContainable * key ( ) const

Gets the key of the current element

This method is undefined if the next element has not been called (e.g. immediately after construction or after calling reset()). If the current element has been removed from the hash (either through the remove method on the iterator or directly on the UtlHashMap), this method returns NULL. The remaining values in the iteration sequence are not affected (the next call to () will return the next key).

UtlContainable * value ( ) const

Gets the value of the current element

This method is undefined if the next element has not been called (e.g. immediately after construction or after calling reset()). If the current element has been removed from the hash (either through the remove method on the iterator or directly on the UtlHashMap), this method returns NULL. The remaining values in the iteration sequence are not affected (the next call to () will return the next key).

void removing ( const UtlPair key)
protectedvirtual

removing is called by the UtlHashMap when an element is about to be removed from the container. The iterator must ensure that the element for the removed node is not returned by any subsequent call.

Friends And Related Function Documentation

friend class UtlHashMap
friend