ACE_DLList< T > Class Template ReferenceA double-linked list container class. More...
Inheritance diagram for ACE_DLList< T >:
![]()
Collaboration diagram for ACE_DLList< T >:
![]()
Detailed Descriptiontemplate<class T>
A double-linked list container class.
|
ACE_INLINE ACE_DLList< T >::ACE_DLList | ( | ACE_Allocator * | the_allocator = 0 |
) | [inline] |
Constructor.
the_allocator | Allocator to use for allocating ACE_DLList_Node objects that wrap T objects for inclusion in the list. If 0, ACE_Allocator::instance() is used. |
ACE_INLINE ACE_DLList< T >::ACE_DLList | ( | const ACE_DLList< T > & | l | ) | [inline] |
Delegates to ACE_Double_Linked_List.
ACE_INLINE ACE_DLList< T >::~ACE_DLList | ( | void | ) | [inline] |
Deletes all ACE_DLList_Node objects in the list starting from the head. No T objects referred to by the deleted ACE_DLList_Node objects are modified or freed. If you desire all of the T objects in the list to be deleted as well, code such as this should be used prior to destroying the ACE_DLList:
ACE_DLList<Item> list; ... // insert dynamically allocated Items... Item *p; while ((p = list.delete_head()) != 0) delete *p;
ACE_INLINE void ACE_DLList< T >::operator= | ( | const ACE_DLList< T > & | l | ) | [inline] |
Delegates to ACE_Double_Linked_List.
T * ACE_DLList< T >::insert_tail | ( | T * | new_item | ) | [inline] |
Insert pointer for a new item at the tail of the list.
T * ACE_DLList< T >::insert_head | ( | T * | new_item | ) | [inline] |
Insert pointer for a new item at the head of the list.
T * ACE_DLList< T >::delete_head | ( | void | ) | [inline] |
Removes the item at the head of the list and returns its pointer.
Reimplemented from ACE_Double_Linked_List< ACE_DLList_Node >.
T * ACE_DLList< T >::delete_tail | ( | void | ) | [inline] |
Removes the item at the tail of the list and returns its pointer.
Reimplemented from ACE_Double_Linked_List< ACE_DLList_Node >.
ACE_INLINE int ACE_DLList< T >::get | ( | T *& | item, | |
size_t | slot = 0 | |||
) | [inline] |
Provide random access to any item in the list.
item | Receives a pointer to the T object pointer held at the specified position in the list. | |
slot | Position in the list to access. The first position is 0. |
0 | Success; T pointer returned in item. | |
-1 | Error, most likely slot is outside the range of the list. |
ACE_INLINE void ACE_DLList< T >::dump | ( | void | ) | const [inline] |
ACE_INLINE int ACE_DLList< T >::remove | ( | ACE_DLList_Node * | n | ) | [inline] |
friend class ACE_DLList_Node [friend] |
friend class ACE_Double_Linked_List_Iterator< T > [friend] |
Reimplemented from ACE_Double_Linked_List< ACE_DLList_Node >.
friend class ACE_DLList_Iterator< T > [friend] |
friend class ACE_DLList_Reverse_Iterator< T > [friend] |