From 4e7e21f9ffe949cd36d3ded9996114bc37317b89 Mon Sep 17 00:00:00 2001 From: jxh Date: Thu, 17 Sep 1998 00:44:11 +0000 Subject: Added comments to DLList as per Doug's request. --- ace/Containers.h | 57 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++ ace/Containers.i | 2 +- 2 files changed, 58 insertions(+), 1 deletion(-) diff --git a/ace/Containers.h b/ace/Containers.h index 2fc87799a1c..07c75227782 100644 --- a/ace/Containers.h +++ b/ace/Containers.h @@ -685,6 +685,10 @@ template class ACE_DLList_Iterator; template class ACE_DLList_Node { + // = TITLE + // Implementation of element in a DL list. Needed for + // ACE_Double_Linked_List. + friend class ACE_DLList; friend class ACE_DLList_Iterator; @@ -706,10 +710,20 @@ public: template class ACE_DLList : private ACE_Double_Linked_List< ACE_DLList_Node > { + // = TITLE + // A double-linked list container class. + // + // = DESCRIPTION + // This implementation uses ACE_Double_Linked_List to perform + // the logic behind this container class. It delegates all of its + // calls to ACE_Double_Linked_List. + friend class ACE_DLList_Node; friend class ACE_DLList_Iterator; + public: + // = Define some traits. typedef ACE_Double_Linked_List< ACE_DLList_Node > DLList; typedef ACE_DLList_Node @@ -718,49 +732,92 @@ public: DLList_ITERATOR; void operator= (ACE_DLList &l); + // Delegates to ACE_Double_Linked_List. // = Check boundary conditions. + int is_empty (void) const; + // Delegates to ACE_Double_Linked_List. int is_full (void) const; + // Delegates to ACE_Double_Linked_List. // = Classic queue operations. T *insert_tail (T *new_item); + // Delegates to ACE_Double_Linked_List. + T *insert_head (T *new_item); + // Delegates to ACE_Double_Linked_List. + T* delete_head (void); + // Delegates to ACE_Double_Linked_List. + T *delete_tail (void); + // Delegates to ACE_Double_Linked_List. // = Additional utility methods. void reset (void); + // Delegates to ACE_Double_Linked_List. + int get (T *&item, size_t index = 0); + // Delegates to ACE_Double_Linked_List. + size_t size (void) const; + // Delegates to ACE_Double_Linked_List. + void dump (void) const; + // Delegates to ACE_Double_Linked_List. ACE_ALLOC_HOOK_DECLARE; // = Initialization and termination methods. + ACE_DLList (ACE_Allocator *alloc = 0); + // Delegates to ACE_Double_Linked_List. + ACE_DLList (ACE_DLList &l); + // Delegates to ACE_Double_Linked_List. + ~ACE_DLList (void); + // Deletes the list starting from the head. }; template class ACE_DLList_Iterator : private ACE_Double_Linked_List_Iterator< ACE_DLList_Node > { + // = TITLE + // A double-linked list container class iterator. + // + // = DESCRIPTION + // This implementation uses ACE_Double_Linked_List_Iterator to + // perform the logic behind this container class. It delegates + // all of its calls to ACE_Double_Linked_List_Iterator. + friend class ACE_DLList; friend class ACE_DLList_Node; + public: + // = Initialization method. ACE_DLList_Iterator (ACE_DLList &l); // = Iteration methods. T *next (void) const; + // Delegates to ACE_Double_Linked_List_Iterator. + int advance (void); + // Delegates to ACE_Double_Linked_List_Iterator. + int first (void); + // Delegates to ACE_Double_Linked_List_Iterator. + int done (void) const; + // Delegates to ACE_Double_Linked_List_Iterator. + void dump (void) const; + // Delegates to ACE_Double_Linked_List_Iterator. ACE_ALLOC_HOOK_DECLARE; }; diff --git a/ace/Containers.i b/ace/Containers.i index 05c55c3ed86..89a36c61bab 100644 --- a/ace/Containers.i +++ b/ace/Containers.i @@ -418,7 +418,7 @@ ACE_DLList::is_full (void) const } template ACE_INLINE void -ACE_DLList::eset (void) +ACE_DLList::reset (void) { ACE_Double_Linked_List< ACE_DLList_Node >::reset (); } -- cgit v1.2.1