sipxportlib  Version 3.3
UtlHashMapIterator.h
Go to the documentation of this file.
1 //
2 // Copyright (C) 2004-2006 SIPfoundry Inc.
3 // Licensed by SIPfoundry under the LGPL license.
4 //
5 // Copyright (C) 2004-2006 Pingtel Corp. All rights reserved.
6 // Licensed to SIPfoundry under a Contributor Agreement.
7 //
8 // $$
10 
11 #ifndef _UtlHashMapIterator_h_
12 #define _UtlHashMapIterator_h_
13 
14 // SYSTEM INCLUDES
15 // APPLICATION INCLUDES
16 #include "utl/UtlDefs.h"
17 #include "utl/UtlIterator.h"
18 #include "utl/UtlHashMap.h"
19 
20 // DEFINES
21 // MACROS
22 // EXTERNAL FUNCTIONS
23 // EXTERNAL VARIABLES
24 // CONSTANTS
25 // STRUCTS
26 // TYPEDEFS
27 // FORWARD DECLARATIONS
28 class UtlContainable;
29 class UtlPair;
30 
39 {
40 /* //////////////////////////// PUBLIC //////////////////////////////////// */
41  public:
42 
43 /* ============================ CREATORS ================================== */
44 
48  UtlHashMapIterator(const UtlHashMap& hashMap);
49 
50 
54  virtual ~UtlHashMapIterator();
55 
56 /* ============================ MANIPULATORS ============================== */
57 
63  virtual UtlContainable* operator()();
64 
65 
70  virtual void reset();
71 
72 
73 /* ============================ ACCESSORS ================================= */
74 
85  UtlContainable* key() const;
86 
87 
98  UtlContainable* value() const;
99 
100 /* ============================ INQUIRY =================================== */
101 
102 /* //////////////////////////// PROTECTED ///////////////////////////////// */
103  protected:
104  friend class UtlHashMap;
105 
111  virtual void removing(const UtlPair* key);
112 
113 
114 /* //////////////////////////// PRIVATE /////////////////////////////////// */
115  private:
116 
117  void init();
118 
119  size_t mPosition;
120  UtlPair* mpCurrentPair;
121  bool mPairIsValid;
125  // no copy constructor
127 
128 };
129 
130 /* ============================ INLINE METHODS ============================ */
131 
132 #endif // _UtlHashMapIterator_h_
133 
UtlHashMapIterator(const UtlHashMap &hashMap)
Definition: UtlHashMapIterator.cpp:33
virtual void reset()
Definition: UtlHashMapIterator.cpp:115
virtual ~UtlHashMapIterator()
Definition: UtlHashMapIterator.cpp:44
virtual UtlContainable * operator()()
Definition: UtlHashMapIterator.cpp:76
UtlContainable * value() const
Definition: UtlHashMapIterator.cpp:152
Definition: UtlHashMapIterator.h:38
Definition: UtlIterator.h:57
Definition: UtlContainable.h:37
Definition: UtlHashMap.h:46
Associate a key object (the parent UtlLink data) with its value object.
Definition: UtlLink.h:457
virtual void removing(const UtlPair *key)
Definition: UtlHashMapIterator.cpp:181
UtlContainable * key() const
Definition: UtlHashMapIterator.cpp:130