sipxportlib  Version 3.3
UtlListIterator.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 _UtlListIterator_h_
12 #define _UtlListIterator_h_
13 
14 // SYSTEM INCLUDES
15 // APPLICATION INCLUDES
16 #include "utl/UtlDefs.h"
17 #include "utl/UtlLink.h"
18 #include "utl/UtlIterator.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 UtlList ;
30 
38 {
39 /* //////////////////////////// PUBLIC //////////////////////////////////// */
40 public:
41 
42 /* ============================ CREATORS ================================== */
43 
47  UtlListIterator(const UtlList& list) ;
48 
52  virtual ~UtlListIterator();
53 
54 /* ============================ MANIPULATORS ============================== */
55 
61  virtual UtlContainable* operator()() ;
62 
67  virtual void reset() ;
68 
74  virtual UtlContainable* findNext(const UtlContainable* objectToFind) = 0;
75 
79  virtual UtlContainable* toLast() ;
80 
81 /* ============================ ACCESSORS ================================= */
82 
86  UtlContainable* item() const;
87 
88 /* ============================ INQUIRY =================================== */
89 
93  UtlBoolean atLast() const ;
94 
95 /* //////////////////////////// PROTECTED ///////////////////////////////// */
96 protected:
98 
99  friend class UtlList;
100  friend class UtlInit;
101 
107  virtual void removing(const UtlLink* node);
108 
109 
110  static UtlLink const* OFF_LIST_END;
111 
112 /* //////////////////////////// PRIVATE /////////////////////////////////// */
113 private:
114 
115  static OsBSem sIteratorListLock;
116 } ;
117 
118 /* ============================ INLINE METHODS ============================ */
119 
120 #endif // _UtlListIterator_h_
static UtlLink const * OFF_LIST_END
Definition: UtlListIterator.h:110
virtual void reset()
Definition: UtlListIterator.cpp:111
virtual UtlContainable * operator()()
Definition: UtlListIterator.cpp:80
virtual ~UtlListIterator()
Definition: UtlListIterator.cpp:54
Definition: UtlList.h:59
Definition: UtlListIterator.h:37
virtual UtlContainable * findNext(const UtlContainable *objectToFind)=0
Definition: UtlIterator.h:57
Definition: UtlContainable.h:37
UtlContainable * item() const
Definition: UtlListIterator.cpp:143
UtlListIterator(const UtlList &list)
Definition: UtlListIterator.cpp:43
UtlLink * mpCurrentNode
Definition: UtlListIterator.h:97
virtual UtlContainable * toLast()
Definition: UtlListIterator.cpp:123
Utl initializer class. Solves the problem with ordering of constructors & destructors.
Definition: UtlInit.h:40
int UtlBoolean
Definition: UtlDefs.h:41
virtual void removing(const UtlLink *node)
Definition: UtlListIterator.cpp:186
UtlBoolean atLast() const
Definition: UtlListIterator.cpp:162