00001
00002
00003
00004
00005 ACE_BEGIN_VERSIONED_NAMESPACE_DECL
00006
00007 template <class T> ACE_INLINE int
00008 ACE_Bounded_Stack<T>::is_empty (void) const
00009 {
00010 ACE_TRACE ("ACE_Bounded_Stack<T>::is_empty");
00011 return this->top_ == 0;
00012 }
00013
00014 template <class T> ACE_INLINE int
00015 ACE_Bounded_Stack<T>::is_full (void) const
00016 {
00017 ACE_TRACE ("ACE_Bounded_Stack<T>::is_full");
00018 return this->top_ >= this->size_;
00019 }
00020
00021 template <class T> ACE_INLINE int
00022 ACE_Bounded_Stack<T>::push (const T &new_item)
00023 {
00024 ACE_TRACE ("ACE_Bounded_Stack<T>::push");
00025 if (this->is_full () == 0)
00026 {
00027 this->stack_[this->top_++] = new_item;
00028 return 0;
00029 }
00030 else
00031 return -1;
00032 }
00033
00034 template <class T> ACE_INLINE int
00035 ACE_Bounded_Stack<T>::pop (T &item)
00036 {
00037 ACE_TRACE ("ACE_Bounded_Stack<T>::pop");
00038 if (this->is_empty () == 0)
00039 {
00040 item = this->stack_[--this->top_];
00041 return 0;
00042 }
00043 else
00044 return -1;
00045 }
00046
00047 template <class T> ACE_INLINE int
00048 ACE_Bounded_Stack<T>::top (T &item) const
00049 {
00050 ACE_TRACE ("ACE_Bounded_Stack<T>::top");
00051 if (this->is_empty () == 0)
00052 {
00053 item = this->stack_[this->top_ - 1];
00054 return 0;
00055 }
00056 else
00057 return -1;
00058 }
00059
00060 template <class T> ACE_INLINE size_t
00061 ACE_Bounded_Stack<T>::size (void) const
00062 {
00063 return this->size_;
00064 }
00065
00066
00067
00068 template <class T, size_t ACE_SIZE> ACE_INLINE int
00069 ACE_Fixed_Stack<T, ACE_SIZE>::is_empty (void) const
00070 {
00071 ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::is_empty");
00072 return this->top_ == 0;
00073 }
00074
00075 template <class T, size_t ACE_SIZE> ACE_INLINE int
00076 ACE_Fixed_Stack<T, ACE_SIZE>::is_full (void) const
00077 {
00078 ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::is_full");
00079 return this->top_ >= this->size_;
00080 }
00081
00082 template <class T, size_t ACE_SIZE> ACE_INLINE int
00083 ACE_Fixed_Stack<T, ACE_SIZE>::push (const T &new_item)
00084 {
00085 ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::push");
00086 if (this->is_full () == 0)
00087 {
00088 this->stack_[this->top_++] = new_item;
00089 return 0;
00090 }
00091 else
00092 return -1;
00093 }
00094
00095 template <class T, size_t ACE_SIZE> ACE_INLINE int
00096 ACE_Fixed_Stack<T, ACE_SIZE>::pop (T &item)
00097 {
00098 ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::pop");
00099 if (this->is_empty () == 0)
00100 {
00101 item = this->stack_[--this->top_];
00102 return 0;
00103 }
00104 else
00105 return -1;
00106 }
00107
00108 template <class T, size_t ACE_SIZE> ACE_INLINE int
00109 ACE_Fixed_Stack<T, ACE_SIZE>::top (T &item) const
00110 {
00111 ACE_TRACE ("ACE_Fixed_Stack<T, ACE_SIZE>::top");
00112 if (this->is_empty () == 0)
00113 {
00114 item = this->stack_[this->top_ - 1];
00115 return 0;
00116 }
00117 else
00118 return -1;
00119 }
00120
00121 template <class T, size_t ACE_SIZE> ACE_INLINE size_t
00122 ACE_Fixed_Stack<T, ACE_SIZE>::size (void) const
00123 {
00124 return this->size_;
00125 }
00126
00127 template <class T> ACE_INLINE int
00128 ACE_Unbounded_Stack<T>::is_empty (void) const
00129 {
00130
00131 return this->head_ == this->head_->next_;
00132 }
00133
00134 template <class T> ACE_INLINE int
00135 ACE_Unbounded_Stack<T>::top (T &item) const
00136 {
00137 ACE_TRACE ("ACE_Unbounded_Stack<T>::top");
00138 if (this->is_empty () == 0)
00139 {
00140 item = this->head_->next_->item_;
00141 return 0;
00142 }
00143 else
00144 return -1;
00145 }
00146
00147 template <class T> ACE_INLINE int
00148 ACE_Unbounded_Stack<T>::is_full (void) const
00149 {
00150 ACE_TRACE ("ACE_Unbounded_Stack<T>::is_full");
00151 return 0;
00152 }
00153
00154 template <class T> ACE_INLINE size_t
00155 ACE_Unbounded_Stack<T>::size (void) const
00156 {
00157 return this->cur_size_;
00158 }
00159
00160
00161
00162
00163
00164
00165 template <class T, size_t ACE_SIZE> ACE_INLINE int
00166 ACE_Fixed_Set<T, ACE_SIZE>::is_empty (void) const
00167 {
00168 ACE_TRACE ("ACE_Fixed_Set<T>::is_empty");
00169 return this->cur_size_ == 0;
00170 }
00171
00172 template <class T, size_t ACE_SIZE> ACE_INLINE int
00173 ACE_Fixed_Set<T, ACE_SIZE>::is_full (void) const
00174 {
00175 ACE_TRACE ("ACE_Fixed_Set<T, ACE_SIZE>::is_full");
00176 return this->cur_size_ == this->max_size_;
00177 }
00178
00179
00180
00181 template <class T> ACE_INLINE int
00182 ACE_Bounded_Set<T>::is_empty (void) const
00183 {
00184 ACE_TRACE ("ACE_Bounded_Set<T>::is_empty");
00185 return this->cur_size_ == 0;
00186 }
00187
00188 template <class T> ACE_INLINE int
00189 ACE_Bounded_Set<T>::is_full (void) const
00190 {
00191 ACE_TRACE ("ACE_Bounded_Set<T>::is_full");
00192 return this->cur_size_ == this->max_size_;
00193 }
00194
00195
00196
00197 template <class T> ACE_INLINE int
00198 ACE_Ordered_MultiSet_Iterator<T>::first (void)
00199 {
00200 ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::first");
00201 current_ = set_.head_;
00202
00203 return (current_ ? 1 : 0);
00204 }
00205
00206 template <class T> ACE_INLINE int
00207 ACE_Ordered_MultiSet_Iterator<T>::last (void)
00208 {
00209 ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::last");
00210 current_ = set_.tail_;
00211
00212 return (current_ ? 1 : 0);
00213 }
00214
00215 template <class T> ACE_INLINE int
00216 ACE_Ordered_MultiSet_Iterator<T>::advance (void)
00217 {
00218 ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::advance");
00219
00220 current_ = current_ ? current_->next_ : 0;
00221
00222 return (current_ ? 1 : 0);
00223 }
00224
00225 template <class T> ACE_INLINE int
00226 ACE_Ordered_MultiSet_Iterator<T>::retreat (void)
00227 {
00228 ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::retreat");
00229
00230 current_ = current_ ? current_->prev_ : 0;
00231
00232 return (current_ ? 1 : 0);
00233 }
00234
00235 template <class T> ACE_INLINE int
00236 ACE_Ordered_MultiSet_Iterator<T>::done (void) const
00237 {
00238 ACE_TRACE ("ACE_Ordered_MultiSet_Iterator<T>::done");
00239
00240 return (current_ ? 0 : 1);
00241 }
00242
00243 template <class T> ACE_INLINE void
00244 ACE_Ordered_MultiSet_Iterator<T>::dump (void) const
00245 {
00246 #if defined (ACE_HAS_DUMP)
00247
00248 #endif
00249 }
00250
00251
00252
00253
00254
00255 template <class T> ACE_INLINE int
00256 ACE_Ordered_MultiSet<T>::is_empty (void) const
00257 {
00258 ACE_TRACE ("ACE_Ordered_MultiSet<T>::is_empty");
00259 return this->cur_size_ > 0 ? 0 : 1;
00260 }
00261
00262 template <class T> ACE_INLINE size_t
00263 ACE_Ordered_MultiSet<T>::size (void) const
00264 {
00265
00266 return this->cur_size_;
00267 }
00268
00269
00270
00271 template <class T> ACE_INLINE
00272 ACE_Array<T>::ACE_Array (size_t size,
00273 ACE_Allocator *alloc)
00274 : ACE_Array_Base<T> (size, alloc)
00275 {
00276 }
00277
00278 template <class T> ACE_INLINE
00279 ACE_Array<T>::ACE_Array (size_t size,
00280 const T &default_value,
00281 ACE_Allocator *alloc)
00282 : ACE_Array_Base<T> (size, default_value, alloc)
00283 {
00284 }
00285
00286
00287
00288 template <class T> ACE_INLINE
00289 ACE_Array<T>::ACE_Array (const ACE_Array<T> &s)
00290 : ACE_Array_Base<T> (s)
00291 {
00292 }
00293
00294
00295
00296 template <class T> ACE_INLINE void
00297 ACE_Array<T>::operator= (const ACE_Array<T> &s)
00298 {
00299
00300
00301 if (this != &s)
00302 this->ACE_Array_Base<T>::operator= (s);
00303 }
00304
00305
00306
00307 template <class T> ACE_INLINE bool
00308 ACE_Array<T>::operator!= (const ACE_Array<T> &s) const
00309 {
00310 return !(*this == s);
00311 }
00312
00313
00314
00315
00316
00317
00318 template <class T> ACE_INLINE void
00319 ACE_DLList<T>::operator= (const ACE_DLList<T> &l)
00320 {
00321 *(ACE_DLList_Base *) this = l;
00322 }
00323
00324 template <class T> ACE_INLINE int
00325 ACE_DLList<T>::get (T *&item, size_t index)
00326 {
00327 ACE_DLList_Node *node;
00328 int result = ACE_DLList_Base::get (node, index);
00329 if (result != -1)
00330 item = (T *) node->item_;
00331 return result;
00332 }
00333
00334 template <class T> ACE_INLINE void
00335 ACE_DLList<T>::dump (void) const
00336 {
00337 #if defined (ACE_HAS_DUMP)
00338 ACE_DLList_Base::dump ();
00339 #endif
00340 }
00341
00342 template <class T> ACE_INLINE int
00343 ACE_DLList<T>::remove (ACE_DLList_Node *n)
00344 {
00345 int result = ACE_DLList_Base::remove (n);
00346 ACE_DES_FREE (n,
00347 this->allocator_->free,
00348 ACE_DLList_Node);
00349 return result;
00350 }
00351
00352 template <class T> ACE_INLINE
00353 ACE_DLList<T>::ACE_DLList (ACE_Allocator *alloc)
00354 : ACE_DLList_Base (alloc)
00355 {
00356 }
00357
00358 template <class T> ACE_INLINE
00359 ACE_DLList<T>::ACE_DLList (const ACE_DLList<T> &l)
00360 : ACE_DLList_Base ((ACE_DLList<T> &) l)
00361 {
00362 }
00363
00364 template <class T> ACE_INLINE
00365 ACE_DLList<T>::~ACE_DLList (void)
00366 {
00367 while (this->delete_head ()) ;
00368 }
00369
00370 template <class T> ACE_INLINE int
00371 ACE_DLList_Iterator<T>::remove (void)
00372 {
00373 ACE_DLList_Node *temp = this->ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::next ();
00374 this->ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::advance ();
00375 return list_->remove (temp);
00376 }
00377
00378 template <class T> ACE_INLINE
00379 ACE_DLList_Iterator<T>::ACE_DLList_Iterator (ACE_DLList<T> &l)
00380 : ACE_Double_Linked_List_Iterator <ACE_DLList_Node> ((ACE_DLList_Base &)l),
00381 list_ (&l)
00382 {
00383 }
00384
00385 template <class T> ACE_INLINE void
00386 ACE_DLList_Iterator<T>::reset (ACE_DLList<T> &l)
00387 {
00388 list_ = &l;
00389 this->ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::reset ((ACE_DLList_Base &)l);
00390 }
00391
00392 template <class T> ACE_INLINE int
00393 ACE_DLList_Iterator<T>::next (T *&ptr)
00394 {
00395 ACE_DLList_Node *temp =
00396 ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::next ();
00397 if (temp)
00398 ptr = (T *) temp->item_;
00399 return temp ? 1 : 0;
00400 }
00401
00402 template <class T> ACE_INLINE T *
00403 ACE_DLList_Iterator<T>::next (void) const
00404 {
00405 ACE_DLList_Node *temp = ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::next ();
00406 return (T *) (temp ? temp->item_ : 0);
00407 }
00408
00409 template <class T> ACE_INLINE int
00410 ACE_DLList_Iterator<T>::advance (void)
00411 {
00412 return this->ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::advance ();
00413 }
00414
00415 template <class T> ACE_INLINE void
00416 ACE_DLList_Iterator<T>::dump (void) const
00417 {
00418 #if defined (ACE_HAS_DUMP)
00419 ACE_Double_Linked_List_Iterator <ACE_DLList_Node>::dump ();
00420 #endif
00421 }
00422
00423
00424 template <class T> ACE_INLINE int
00425 ACE_DLList_Reverse_Iterator<T>::remove (void)
00426 {
00427 ACE_DLList_Node *temp = ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::next ();
00428 this->ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::advance ();
00429 return list_->remove (temp);
00430 }
00431
00432 template <class T> ACE_INLINE
00433 ACE_DLList_Reverse_Iterator<T>::ACE_DLList_Reverse_Iterator (ACE_DLList<T> &l)
00434 : ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node> ((ACE_DLList_Base &)l),
00435 list_ (&l)
00436 {
00437 }
00438
00439 template <class T> ACE_INLINE void
00440 ACE_DLList_Reverse_Iterator<T>::reset (ACE_DLList<T> &l)
00441 {
00442 list_ = &l;
00443 this->ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::reset ((ACE_DLList_Base &)l);
00444 }
00445
00446 template <class T> ACE_INLINE int
00447 ACE_DLList_Reverse_Iterator<T>::advance (void)
00448 {
00449 return ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::advance ();
00450 }
00451
00452 template <class T> ACE_INLINE int
00453 ACE_DLList_Reverse_Iterator<T>::next (T *&ptr)
00454 {
00455 ACE_DLList_Node *temp =
00456 ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::next ();
00457 if (temp == 0)
00458 return 0;
00459 ptr = (T *) temp->item_;
00460 return 1;
00461 }
00462
00463 template <class T> ACE_INLINE T *
00464 ACE_DLList_Reverse_Iterator<T>::next (void) const
00465 {
00466 ACE_DLList_Node *temp = ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::next ();
00467 return (T *) (temp ? temp->item_ : 0);
00468 }
00469
00470
00471 template <class T> ACE_INLINE void
00472 ACE_DLList_Reverse_Iterator<T>::dump (void) const
00473 {
00474 #if defined (ACE_HAS_DUMP)
00475 ACE_Double_Linked_List_Reverse_Iterator <ACE_DLList_Node>::dump ();
00476 #endif
00477 }
00478
00479 ACE_END_VERSIONED_NAMESPACE_DECL