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