![]() ![]() |
![]() |
1 karl 1.5 //%2004//////////////////////////////////////////////////////////////////////// | ||
2 tony 1.1 // | ||
3 karl 1.5 // Copyright (c) 2000, 2001, 2002 BMC Software; Hewlett-Packard Development 4 // Company, L.P.; IBM Corp.; The Open Group; Tivoli Systems. 5 // Copyright (c) 2003 BMC Software; Hewlett-Packard Development Company, L.P.; | ||
6 karl 1.2 // IBM Corp.; EMC Corporation, The Open Group. | ||
7 karl 1.5 // Copyright (c) 2004 BMC Software; Hewlett-Packard Development Company, L.P.; 8 // IBM Corp.; EMC Corporation; VERITAS Software Corporation; The Open Group. | ||
9 tony 1.1 // 10 // Permission is hereby granted, free of charge, to any person obtaining a copy 11 // of this software and associated documentation files (the "Software"), to 12 // deal in the Software without restriction, including without limitation the 13 // rights to use, copy, modify, merge, publish, distribute, sublicense, and/or 14 // sell copies of the Software, and to permit persons to whom the Software is 15 // furnished to do so, subject to the following conditions: 16 // 17 // THE ABOVE COPYRIGHT NOTICE AND THIS PERMISSION NOTICE SHALL BE INCLUDED IN 18 // ALL COPIES OR SUBSTANTIAL PORTIONS OF THE SOFTWARE. THE SOFTWARE IS PROVIDED 19 // "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT 20 // LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 21 // PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT 22 // HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN 23 // ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION 24 // WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. 25 // 26 //============================================================================== 27 // 28 // Author: Dong Xiang, EMC Corporation (xiang_dong@emc.com) 29 // | ||
30 a.arora 1.4 // Modified By: Amit K Arora, IBM (amita@in.ibm.com) for Bug#1811 | ||
31 tony 1.1 // 32 //%///////////////////////////////////////////////////////////////////////////// 33 34 #ifndef Pegasus_List_h 35 #define Pegasus_List_h 36 37 #include <Pegasus/Common/Config.h> 38 #include <Pegasus/Listener/Linkage.h> 39 40 PEGASUS_NAMESPACE_BEGIN 41 42 /** 43 * Iterator 44 */ 45 class Iterator 46 { 47 public: | ||
48 david.dillard 1.3 /** 49 * Destroys the object. This is needed so that an object of a 50 * subclass can be correctly destroyed thru an Iterator pointer. 51 */ | ||
52 a.arora 1.4 virtual ~Iterator() {}; | ||
53 david.dillard 1.3 | ||
54 tony 1.1 /** 55 * Returns <tt>true</tt> if the iteration has more elements. (In other 56 * words, returns <tt>true</tt> if <tt>next</tt> would return an element 57 * rather than throwing an exception.) 58 * 59 * @return <tt>true</tt> if the iterator has more elements. 60 */ 61 virtual Boolean hasNext() = 0; 62 63 /** 64 * Returns the next element in the interation. 65 * 66 * @returns the next element in the interation. 67 * @exception NoSuchElementException iteration has no more elements. 68 */ 69 virtual void* next() = 0; 70 71 /** 72 * 73 * Removes from the underlying collection the last element returned by the 74 * iterator (optional operation). This method can be called only once per 75 tony 1.1 * call to <tt>next</tt>. The behavior of an iterator is unspecified if 76 * the underlying collection is modified while the iteration is in 77 * progress in any way other than by calling this method. 78 * 79 * @exception UnsupportedOperationException if the <tt>remove</tt> 80 * operation is not supported by this Iterator. 81 */ 82 virtual void remove() = 0; 83 }; 84 85 /** 86 * PtrList 87 */ 88 class PtrList 89 { 90 public: 91 /** 92 * Constructs a PtrList object. 93 * 94 * @param portNumber the specified socket port the listener will listen to 95 * @param sslContext the specifed SSL context 96 tony 1.1 */ 97 PtrList(); 98 /** 99 * Destructor of a PtrList object. 100 */ 101 ~PtrList(); 102 103 /** 104 * Adds an element into the list 105 * 106 * @param the element to add. 107 */ 108 void add(void* element); 109 110 /** 111 * Removes an element from the list 112 * 113 * @param the element to remove. 114 */ 115 void remove(void* element); 116 117 tony 1.1 /** 118 * Returns an iterator over the elements in this list in proper sequence. 119 * 120 * @return an iterator over the elements in this list in proper sequence. 121 */ 122 Iterator* iterator(); 123 124 private: 125 void* _rep; 126 }; 127 128 PEGASUS_NAMESPACE_END 129 130 #endif /* Pegasus_List_h */ 131 |
No CVS admin address has been configured |
Powered by ViewCVS 0.9.2 |