diff options
author | jxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-17 00:44:11 +0000 |
---|---|---|
committer | jxh <jxh@ae88bc3d-4319-0410-8dbf-d08b4c9d3795> | 1998-09-17 00:44:11 +0000 |
commit | 4e7e21f9ffe949cd36d3ded9996114bc37317b89 (patch) | |
tree | cb5d91b7aad266b5be5adf155ff8d86d004628d4 | |
parent | 2555598aba14e8d8c09695fd7d5db3136fc9d765 (diff) | |
download | ATCD-4e7e21f9ffe949cd36d3ded9996114bc37317b89.tar.gz |
Added comments to DLList as per Doug's request.
-rw-r--r-- | ace/Containers.h | 57 | ||||
-rw-r--r-- | ace/Containers.i | 2 |
2 files changed, 58 insertions, 1 deletions
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 T> class ACE_DLList_Iterator; template <class T> class ACE_DLList_Node { + // = TITLE + // Implementation of element in a DL list. Needed for + // ACE_Double_Linked_List. + friend class ACE_DLList<T>; friend class ACE_DLList_Iterator<T>; @@ -706,10 +710,20 @@ public: template <class T> class ACE_DLList : private ACE_Double_Linked_List< ACE_DLList_Node<T> > { + // = 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<T>; friend class ACE_DLList_Iterator<T>; + public: + // = Define some traits. typedef ACE_Double_Linked_List< ACE_DLList_Node<T> > DLList; typedef ACE_DLList_Node<T> @@ -718,49 +732,92 @@ public: DLList_ITERATOR; void operator= (ACE_DLList<T> &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<T> &l); + // Delegates to ACE_Double_Linked_List. + ~ACE_DLList (void); + // Deletes the list starting from the head. }; template <class T> class ACE_DLList_Iterator : private ACE_Double_Linked_List_Iterator< ACE_DLList_Node<T> > { + // = 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<T>; friend class ACE_DLList_Node<T>; + public: + // = Initialization method. ACE_DLList_Iterator (ACE_DLList<T> &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 <class T> ACE_INLINE void -ACE_DLList::eset (void) +ACE_DLList::reset (void) { ACE_Double_Linked_List< ACE_DLList_Node<T> >::reset (); } |