2 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
4 template <class T> ACE_INLINE int
5 ACE_Bounded_Stack<T>::is_empty () const
7 ACE_TRACE ("ACE_Bounded_Stack<T>::is_empty");
8 return this->top_ == 0;
11 template <class T> ACE_INLINE int
12 ACE_Bounded_Stack<T>::is_full () const
14 ACE_TRACE ("ACE_Bounded_Stack<T>::is_full");
15 return this->top_ >= this->size_;
18 template <class T> ACE_INLINE int
19 ACE_Bounded_Stack<T>::push (const T &new_item)
21 ACE_TRACE ("ACE_Bounded_Stack<T>::push");
22 if (this->is_full () == 0)
24 this->stack_[this->top_++] = new_item;
31 template <class T> ACE_INLINE int
32 ACE_Bounded_Stack<T>::pop (T &item)
34 ACE_TRACE ("ACE_Bounded_Stack<T>::pop");
35 if (this->is_empty () == 0)
37 item = this->stack_[--this->top_];
44 template <class T> ACE_INLINE int
45 ACE_Bounded_Stack<T>::top (T &item) const
47 ACE_TRACE ("ACE_Bounded_Stack<T>::top");
48 if (this->is_empty () == 0)
50 item = this->stack_[this->top_ - 1];
57 template <class T> ACE_INLINE size_t
58 ACE_Bounded_Stack<T>::size () const
63 //----------------------------------------
65 template <class T, size_t ACE_SIZE> ACE_INLINE int
66 ACE_Fixed_Stack<T, ACE_SIZE>::is_empty () const
68 ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::is_empty");
69 return this->top_ == 0;
72 template <class T, size_t ACE_SIZE> ACE_INLINE int
73 ACE_Fixed_Stack<T, ACE_SIZE>::is_full () const
75 ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::is_full");
76 return this->top_ >= this->size_;
79 template <class T, size_t ACE_SIZE> ACE_INLINE int
80 ACE_Fixed_Stack<T, ACE_SIZE>::push (const T &new_item)
82 ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::push");
83 if (this->is_full () == 0)
85 this->stack_[this->top_++] = new_item;
92 template <class T, size_t ACE_SIZE> ACE_INLINE int
93 ACE_Fixed_Stack<T, ACE_SIZE>::pop (T &item)
95 ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::pop");
96 if (this->is_empty () == 0)
98 item = this->stack_[--this->top_];
105 template <class T, size_t ACE_SIZE> ACE_INLINE int
106 ACE_Fixed_Stack<T, ACE_SIZE>::top (T &item) const
108 ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::top");
109 if (this->is_empty () == 0)
111 item = this->stack_[this->top_ - 1];
118 template <class T, size_t ACE_SIZE> ACE_INLINE size_t
119 ACE_Fixed_Stack<T, ACE_SIZE>::size () const
124 template <class T> ACE_INLINE int
125 ACE_Unbounded_Stack<T>::is_empty () const
127 // ACE_TRACE ("ACE_Unbounded_Stack<T>::is_empty");
128 return this->head_ == this->head_->next_;
131 template <class T> ACE_INLINE int
132 ACE_Unbounded_Stack<T>::top (T &item) const
134 ACE_TRACE ("ACE_Unbounded_Stack<T>::top");
135 if (this->is_empty () == 0)
137 item = this->head_->next_->item_;
144 template <class T> ACE_INLINE int
145 ACE_Unbounded_Stack<T>::is_full () const
147 ACE_TRACE ("ACE_Unbounded_Stack<T>::is_full");
151 template <class T> ACE_INLINE size_t
152 ACE_Unbounded_Stack<T>::size () const
154 return this->cur_size_;
159 template <class T, size_t ACE_SIZE> ACE_INLINE int
160 ACE_Fixed_Set<T, ACE_SIZE>::is_empty () const
162 ACE_TRACE ("ACE_Fixed_Set<T>::is_empty");
163 return this->cur_size_ == 0;
166 template <class T, size_t ACE_SIZE> ACE_INLINE int
167 ACE_Fixed_Set<T, ACE_SIZE>::is_full () const
169 ACE_TRACE ("ACE_Fixed_Set<T, ACE_SIZE>::is_full");
170 return this->cur_size_ == this->max_size_;
175 template <class T> ACE_INLINE int
176 ACE_Bounded_Set<T>::is_empty () const
178 ACE_TRACE ("ACE_Bounded_Set<T>::is_empty");
179 return this->cur_size_ == 0;
182 template <class T> ACE_INLINE int
183 ACE_Bounded_Set<T>::is_full () const
185 ACE_TRACE ("ACE_Bounded_Set<T>::is_full");
186 return this->cur_size_ == this->max_size_;
191 template <class T> ACE_INLINE int
192 ACE_Ordered_MultiSet_Iterator<T>::first ()
194 ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::first");
195 current_ = set_.head_;
197 return (current_ ? 1 : 0);
200 template <class T> ACE_INLINE int
201 ACE_Ordered_MultiSet_Iterator<T>::last ()
203 ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::last");
204 current_ = set_.tail_;
206 return (current_ ? 1 : 0);
209 template <class T> ACE_INLINE int
210 ACE_Ordered_MultiSet_Iterator<T>::advance ()
212 ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::advance");
214 current_ = current_ ? current_->next_ : 0;
216 return (current_ ? 1 : 0);
219 template <class T> ACE_INLINE int
220 ACE_Ordered_MultiSet_Iterator<T>::retreat ()
222 ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::retreat");
224 current_ = current_ ? current_->prev_ : 0;
226 return (current_ ? 1 : 0);
229 template <class T> ACE_INLINE int
230 ACE_Ordered_MultiSet_Iterator<T>::done () const
232 ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::done");
234 return (current_ ? 0 : 1);
237 template <class T> ACE_INLINE void
238 ACE_Ordered_MultiSet_Iterator<T>::dump () const
240 #if defined (ACE_HAS_DUMP)
241 // ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::dump");
242 #endif /* ACE_HAS_DUMP */
245 template <class T> ACE_INLINE int
246 ACE_Ordered_MultiSet<T>::is_empty () const
248 ACE_TRACE ("ACE_Ordered_MultiSet<T>::is_empty");
249 return this->cur_size_ > 0 ? 0 : 1;
252 template <class T> ACE_INLINE size_t
253 ACE_Ordered_MultiSet<T>::size () const
255 // ACE_TRACE ("ACE_Ordered_MultiSet<T>::size");
256 return this->cur_size_;
259 // ****************************************************************
261 template <class T> ACE_INLINE
262 ACE_Array<T>::ACE_Array (size_t size,
263 ACE_Allocator *alloc)
264 : ACE_Array_Base<T> (size, alloc)
268 template <class T> ACE_INLINE
269 ACE_Array<T>::ACE_Array (size_t size,
270 const T &default_value,
271 ACE_Allocator *alloc)
272 : ACE_Array_Base<T> (size, default_value, alloc)
276 // The copy constructor (performs initialization).
278 template <class T> ACE_INLINE
279 ACE_Array<T>::ACE_Array (const ACE_Array<T> &s)
280 : ACE_Array_Base<T> (s)
284 // Assignment operator (performs assignment).
286 template <class T> ACE_INLINE void
287 ACE_Array<T>::operator= (const ACE_Array<T> &s)
289 // Check for "self-assignment".
292 this->ACE_Array_Base<T>::operator= (s);
295 // Compare this array with <s> for inequality.
297 template <class T> ACE_INLINE bool
298 ACE_Array<T>::operator!= (const ACE_Array<T> &s) const
300 return !(*this == s);
303 // ****************************************************************
306 // ****************************************************************
308 template <class T> ACE_INLINE void
309 ACE_DLList<T>::operator= (const ACE_DLList<T> &l)
311 *(ACE_DLList_Base *) this = l;
314 template <class T> ACE_INLINE int
315 ACE_DLList<T>::get (T *&item, size_t index)
317 ACE_DLList_Node *node;
318 int result = ACE_DLList_Base::get (node, index);
320 item = (T *) node->item_;
324 template <class T> ACE_INLINE void
325 ACE_DLList<T>::dump () const
327 #if defined (ACE_HAS_DUMP)
328 ACE_DLList_Base::dump ();
329 #endif /* ACE_HAS_DUMP */
332 template <class T> ACE_INLINE int
333 ACE_DLList<T>::remove (ACE_DLList_Node *n)
335 int result = ACE_DLList_Base::remove (n);
337 this->allocator_->free,
342 template <class T> ACE_INLINE
343 ACE_DLList<T>::ACE_DLList (ACE_Allocator *alloc)
344 : ACE_DLList_Base (alloc)
348 template <class T> ACE_INLINE
349 ACE_DLList<T>::ACE_DLList (const ACE_DLList<T> &l)
350 : ACE_DLList_Base ((ACE_DLList<T> &) l)
354 template <class T> ACE_INLINE
355 ACE_DLList<T>::~ACE_DLList ()
357 while (this->delete_head ()) ;
360 template <class T> ACE_INLINE int
361 ACE_DLList_Iterator<T>::remove ()
363 ACE_DLList_Node *temp = this->ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::next ();
364 this->ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::advance ();
365 return list_->remove (temp);
368 template <class T> ACE_INLINE
369 ACE_DLList_Iterator<T>::ACE_DLList_Iterator (ACE_DLList<T> &l)
370 : ACE_Double_Linked_List_Iterator <ACE_DLList_Node> ((ACE_DLList_Base &)l),
375 template <class T> ACE_INLINE void
376 ACE_DLList_Iterator<T>::reset (ACE_DLList<T> &l)
379 this->ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::reset ((ACE_DLList_Base &)l);
382 template <class T> ACE_INLINE int
383 ACE_DLList_Iterator<T>::next (T *&ptr)
385 ACE_DLList_Node *temp =
386 ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::next ();
388 ptr = (T *) temp->item_;
392 template <class T> ACE_INLINE T *
393 ACE_DLList_Iterator<T>::next () const
395 ACE_DLList_Node *temp = ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::next ();
396 return (T *) (temp ? temp->item_ : 0);
399 template <class T> ACE_INLINE int
400 ACE_DLList_Iterator<T>::advance ()
402 return this->ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::advance ();
405 template <class T> ACE_INLINE void
406 ACE_DLList_Iterator<T>::dump () const
408 #if defined (ACE_HAS_DUMP)
409 ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::dump ();
410 #endif /* ACE_HAS_DUMP */
414 template <class T> ACE_INLINE int
415 ACE_DLList_Reverse_Iterator<T>::remove ()
417 ACE_DLList_Node *temp = ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::next ();
418 this->ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::advance ();
419 return list_->remove (temp);
422 template <class T> ACE_INLINE
423 ACE_DLList_Reverse_Iterator<T>::ACE_DLList_Reverse_Iterator (ACE_DLList<T> &l)
424 : ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node> ((ACE_DLList_Base &)l),
429 template <class T> ACE_INLINE void
430 ACE_DLList_Reverse_Iterator<T>::reset (ACE_DLList<T> &l)
433 this->ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::reset ((ACE_DLList_Base &)l);
436 template <class T> ACE_INLINE int
437 ACE_DLList_Reverse_Iterator<T>::advance ()
439 return ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::advance ();
442 template <class T> ACE_INLINE int
443 ACE_DLList_Reverse_Iterator<T>::next (T *&ptr)
445 ACE_DLList_Node *temp =
446 ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::next ();
449 ptr = (T *) temp->item_;
453 template <class T> ACE_INLINE T *
454 ACE_DLList_Reverse_Iterator<T>::next () const
456 ACE_DLList_Node *temp = ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::next ();
457 return (T *) (temp ? temp->item_ : 0);
461 template <class T> ACE_INLINE void
462 ACE_DLList_Reverse_Iterator<T>::dump () const
464 #if defined (ACE_HAS_DUMP)
465 ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::dump ();
466 #endif /* ACE_HAS_DUMP */
469 ACE_END_VERSIONED_NAMESPACE_DECL