summaryrefslogtreecommitdiff
path: root/ace/Containers.i
diff options
context:
space:
mode:
authornw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-10-16 03:49:35 +0000
committernw1 <nw1@ae88bc3d-4319-0410-8dbf-d08b4c9d3795>1997-10-16 03:49:35 +0000
commit2f96ab5ecdcc3b988e1e6afb5105252569dbb9b2 (patch)
tree2a33af29fb95b167bec87402a3fa3b02753d36ea /ace/Containers.i
parent4c12a73b26a6c8ec3d788349b22afc7584809730 (diff)
downloadATCD-2f96ab5ecdcc3b988e1e6afb5105252569dbb9b2.tar.gz
*** empty log message ***
Diffstat (limited to 'ace/Containers.i')
-rw-r--r--ace/Containers.i97
1 files changed, 97 insertions, 0 deletions
diff --git a/ace/Containers.i b/ace/Containers.i
index 0bd32f2e470..e352695e692 100644
--- a/ace/Containers.i
+++ b/ace/Containers.i
@@ -124,6 +124,103 @@ ACE_Fixed_Stack<T, SIZE>::size (void) const
}
//----------------------------------------
+#if defined (NANBOR_EXP_CODES)
+ACE_INLINE
+ACE_DNode_Base::ACE_DNode_Base (void)
+{
+}
+
+// ACE_INLINE
+// ACE_DNode_Base::ACE_DNode_Base (ACE_DNode_Base *n, ACE_DNode_Base *p)
+// : next_ (n), prev_ (p)
+// {
+// }
+
+ACE_INLINE
+ACE_Double_Linked_List_Iterator_Base::ACE_Double_Linked_List_Iterator_Base
+(ACE_Double_Linked_List_Base &dll)
+ : dllist_ (dll)
+{
+ this->current_ = dll.head_->next_; // Initialize head ptr.
+}
+
+ACE_INLINE ACE_DNode_Base *
+ACE_Double_Linked_List_Iterator_Base::not_done (void)
+{
+ if (this->current_ != this->dllist_.head_)
+ return this->current_;
+ else
+ return 0;
+}
+
+ACE_INLINE ACE_DNode_Base *
+ACE_Double_Linked_List_Iterator_Base::do_advance (void)
+{
+ if (this->not_done ())
+ {
+ this->current_ = this->current_->next_;
+ return this->not_done ();
+ }
+ else
+ return 0;
+}
+
+ACE_INLINE
+ACE_Double_Linked_List_Base::ACE_Double_Linked_List_Base (void)
+ : head_ (0), size_ (0)
+{
+}
+
+ACE_INLINE void
+ACE_Double_Linked_List_Base::init_head (void)
+{
+ this->head_->next_ = this->head_->prev_ = this->head_;
+}
+
+ACE_INLINE size_t
+ACE_Double_Linked_List_Base::size (void)
+{
+ return this->size_;
+}
+
+ACE_INLINE int
+ACE_Double_Linked_List_Base::insert_element (ACE_DNode_Base *new_item,
+ int before,
+ ACE_DNode_Base *old_item)
+{
+ if (old_item == 0)
+ old_item = this->head_;
+ if (before)
+ old_item = old_item->prev_;
+
+ (new_item->next_ = old_item->next_)->prev_ = new_item;
+ (new_item->prev_ = old_item)->next_ = new_item;
+ this->size_++;
+ return 0; // Well, what will cause errors here?
+}
+
+ACE_INLINE int
+ACE_Double_Linked_List_Base::remove_element (ACE_DNode_Base *item)
+{
+ // Notice that you have to ensure that item is an element of this
+ // list. We can't do much checking here.
+ if (item == this->head_ || this->size () == 0) // Can't remove head
+ return -1;
+ (item->prev_->next_ = item->next_)->prev_ = item->prev_;
+ this->size_--;
+ return 0;
+}
+
+ACE_INLINE ACE_Double_Linked_List_Iterator_Base *
+ACE_Double_Linked_List_Base::iter (void)
+{
+ ACE_Double_Linked_List_Iterator_Base *itr;
+ ACE_NEW_RETURN (itr, ACE_Double_Linked_List_Iterator_Base (*this), 0);
+ return itr;
+}
+
+#endif /* NANBOR_EXP_CODES */
+//----------------------------------------
template <class T> ACE_INLINE int
ACE_Unbounded_Stack<T>::is_empty (void) const