#include <LinkedList.h>
Public Types | |
| typedef Iterator< LinkedListNode< item_type > > | iterator |
| iterator class for convenience. | |
| typedef Const_Iterator< LinkedListNode< item_type > > | const_iterator |
| const_iterator class for convenience. | |
Public Member Functions | |
| LinkedList () | |
| Constructor. | |
| ~LinkedList () | |
| Destructor. | |
| void | assign (const LinkedListNode< item_type > *begin_node, const LinkedListNode< item_type > *end_node) |
| Assign operator. | |
| void | assign (Iterator< LinkedListNode< item_type > > &begin_iter, Iterator< LinkedListNode< item_type > > &end_iter) |
| Assign operator. | |
| void | assign (Const_Iterator< LinkedListNode< item_type > > &begin_iter, Const_Iterator< LinkedListNode< item_type > > &end_iter) |
| Assign operator. | |
| LinkedListNode< item_type > * | begin () |
| Returns a pointer to the smallest element in the LinkedList. | |
| const LinkedListNode< item_type > * | begin () const |
| Returns a pointer to the smallest element in the LinkedList. | |
| void | clear () |
| Erases elements in the LinkedList. | |
| void | destroy () |
| Erases elements in the LinkedList, and calls delete on the item_type. | |
| bool | empty () |
| Returns true if the LinkedList is empty. | |
| LinkedListNode< item_type > * | end () |
| Returns NULL. | |
| const LinkedListNode< item_type > * | end () const |
| Returns NULL. | |
| void | erase (Iterator< LinkedListNode< item_type > > &iter) |
| Erase a node from the LinkedList. | |
| LinkedListNode< item_type > * | find (Iterator< LinkedListNode< item_type > > &node_iter) |
| Finds a LinkedList node in the LinkedList. | |
| const LinkedListNode< item_type > * | find (Const_Iterator< LinkedListNode< item_type > > &node_iter) const |
| Finds a LinkedList node in the LinkedList. | |
| void | push_back (item_type item) |
| Insert a LinkedList node in the LinkedList. | |
| LinkedListNode< item_type > * | last () |
| Returns a pointer to the last element in the LinkedList. | |
| const LinkedListNode< item_type > * | last () const |
| Returns a pointer to the last element in the LinkedList. | |
| item_type & | operator[] (uint i) |
| operator []. | |
| const item_type & | operator[] (uint i) const |
| operator []. | |
| uint | size () const |
| Return the number of items in the LinkedList. | |
Protected Attributes | |
| LinkedListNode< item_type > * | root_ptr_ |
| Pointer to the first element of the linked list. | |
| LinkedListNode< item_type > * | last_ptr_ |
| Pointer to the last element of the linked list. | |
| uint | size_ |
| Stores the number of items in the AVLTree. | |
Friends | |
| class | Iterator< LinkedListNode< item_type > > |
| Allow iterators to manipulate protected members. | |
| class | Const_Iterator< LinkedListNode< item_type > > |
| Allow iterators to manipulate protected members. | |
Definition at line 146 of file LinkedList.h.
| typedef Iterator<LinkedListNode <item_type> > DREAM::LinkedList< item_type >::iterator |
| typedef Const_Iterator<LinkedListNode <item_type> > DREAM::LinkedList< item_type >::const_iterator |
| DREAM::LinkedList< item_type >::LinkedList | ( | ) |
| DREAM::LinkedList< item_type >::~LinkedList | ( | ) |
| void DREAM::LinkedList< item_type >::assign | ( | const LinkedListNode< item_type > * | begin_node, | |
| const LinkedListNode< item_type > * | end_node | |||
| ) |
| void DREAM::LinkedList< item_type >::assign | ( | Iterator< LinkedListNode< item_type > > & | begin_iter, | |
| Iterator< LinkedListNode< item_type > > & | end_iter | |||
| ) |
| void DREAM::LinkedList< item_type >::assign | ( | Const_Iterator< LinkedListNode< item_type > > & | begin_iter, | |
| Const_Iterator< LinkedListNode< item_type > > & | end_iter | |||
| ) |
| LinkedListNode< item_type > * DREAM::LinkedList< item_type >::begin | ( | ) | [inline] |
Returns a pointer to the smallest element in the LinkedList.
Definition at line 187 of file LinkedList.cpp.
Referenced by DREAM::PriorityInversionList::inversion().
| const LinkedListNode< item_type > * DREAM::LinkedList< item_type >::begin | ( | ) | const [inline] |
Returns a pointer to the smallest element in the LinkedList.
Definition at line 193 of file LinkedList.cpp.
| void DREAM::LinkedList< item_type >::clear | ( | ) |
Erases elements in the LinkedList.
Definition at line 199 of file LinkedList.cpp.
Referenced by DREAM::PriorityInversionList::destroy().
| void DREAM::LinkedList< item_type >::destroy | ( | ) |
Erases elements in the LinkedList, and calls delete on the item_type.
Use this function whenever you would like to iterate through the LinkedList, and erase dynamically allocated data.
Definition at line 210 of file LinkedList.cpp.
Referenced by DREAM::PriorityInversionList::destroy(), and DREAM::PriorityInversionList::~PriorityInversionList().
| bool DREAM::LinkedList< item_type >::empty | ( | ) | [inline] |
| LinkedListNode< item_type > * DREAM::LinkedList< item_type >::end | ( | ) | [inline] |
Returns NULL.
Definition at line 231 of file LinkedList.cpp.
Referenced by DREAM::PriorityInversionList::increment().
| const LinkedListNode< item_type > * DREAM::LinkedList< item_type >::end | ( | ) | const [inline] |
| void DREAM::LinkedList< item_type >::erase | ( | Iterator< LinkedListNode< item_type > > & | iter | ) |
Erase a node from the LinkedList.
Definition at line 243 of file LinkedList.cpp.
References DREAM::LinkedListNode< item_type >::left_.
| LinkedListNode< item_type > * DREAM::LinkedList< item_type >::find | ( | Iterator< LinkedListNode< item_type > > & | node_iter | ) |
| const LinkedListNode< item_type > * DREAM::LinkedList< item_type >::find | ( | Const_Iterator< LinkedListNode< item_type > > & | node_iter | ) | const |
| void DREAM::LinkedList< item_type >::push_back | ( | item_type | item | ) |
Insert a LinkedList node in the LinkedList.
Definition at line 289 of file LinkedList.cpp.
References DREAM::LinkedListNode< item_type >::iter_next().
| LinkedListNode< item_type > * DREAM::LinkedList< item_type >::last | ( | ) | [inline] |
Returns a pointer to the last element in the LinkedList.
Definition at line 308 of file LinkedList.cpp.
| const LinkedListNode< item_type > * DREAM::LinkedList< item_type >::last | ( | ) | const [inline] |
Returns a pointer to the last element in the LinkedList.
Definition at line 314 of file LinkedList.cpp.
| item_type & DREAM::LinkedList< item_type >::operator[] | ( | uint | i | ) |
| const item_type & DREAM::LinkedList< item_type >::operator[] | ( | uint | i | ) | const |
| uint DREAM::LinkedList< item_type >::size | ( | ) | const [inline] |
Return the number of items in the LinkedList.
Definition at line 346 of file LinkedList.cpp.
Referenced by DREAM::PriorityInversionList::inversion().
friend class Iterator< LinkedListNode< item_type > > [friend] |
friend class Const_Iterator< LinkedListNode< item_type > > [friend] |
LinkedListNode<item_type>* DREAM::LinkedList< item_type >::root_ptr_ [protected] |
LinkedListNode<item_type>* DREAM::LinkedList< item_type >::last_ptr_ [protected] |
uint DREAM::LinkedList< item_type >::size_ [protected] |
1.5.1