Lock-free linked list. More...
#include <LinkedList.hpp>
Public Member Functions | |
LinkedList (Pool< T > &pool) | |
LinkedList (const LinkedList< T > &other) | |
virtual | ~LinkedList () |
bool | Empty () const |
void | Add (const T &data) |
void | Remove (const T &data) |
void | Clear () |
void | operator= (const LinkedList< T > &other) |
bool | operator== (const LinkedList< T > &other) const |
Private Member Functions | |
void | CopyList (const LinkedList< T > &other) |
Private Attributes | |
Pool< T > & | m_pool |
ListNode< T > | m_head |
Friends | |
class | ListIterator |
Lock-free linked list.
Uses memory from the supplied Pool object.
Definition at line 286 of file LinkedList.hpp.
LinkedList< T >::LinkedList | ( | Pool< T > & | pool | ) | [inline] |
Definition at line 318 of file LinkedList.hpp.
References LinkedList< T >::m_head.
LinkedList< T >::LinkedList | ( | const LinkedList< T > & | other | ) | [inline] |
Definition at line 325 of file LinkedList.hpp.
References LinkedList< T >::CopyList().
LinkedList< T >::~LinkedList | ( | ) | [inline, virtual] |
Definition at line 332 of file LinkedList.hpp.
void LinkedList< T >::Add | ( | const T & | data | ) | [inline] |
Definition at line 371 of file LinkedList.hpp.
References ListNode< T >::AddChild(), ListNode< T >::GetNext(), ListNode< T >::m_data, LinkedList< T >::m_head, and LinkedList< T >::m_pool.
void LinkedList< T >::Clear | ( | ) | [inline] |
Definition at line 343 of file LinkedList.hpp.
References ListNode< T >::GetNext(), LinkedList< T >::m_head, and LinkedList< T >::m_pool.
Referenced by LinkedList< T >::operator=().
void LinkedList< T >::CopyList | ( | const LinkedList< T > & | other | ) | [inline, private] |
Definition at line 356 of file LinkedList.hpp.
References ListNode< T >::AddChild(), ListNode< T >::GetNext(), ListNode< T >::m_data, LinkedList< T >::m_head, and LinkedList< T >::m_pool.
Referenced by LinkedList< T >::LinkedList(), and LinkedList< T >::operator=().
bool LinkedList< T >::Empty | ( | ) | const [inline] |
Definition at line 337 of file LinkedList.hpp.
References LinkedList< T >::m_head.
void LinkedList< T >::operator= | ( | const LinkedList< T > & | other | ) | [inline] |
Definition at line 416 of file LinkedList.hpp.
References LinkedList< T >::Clear(), and LinkedList< T >::CopyList().
bool LinkedList< T >::operator== | ( | const LinkedList< T > & | other | ) | const [inline] |
Definition at line 423 of file LinkedList.hpp.
References ListNode< T >::GetNext(), ListNode< T >::m_data, and LinkedList< T >::m_head.
void LinkedList< T >::Remove | ( | const T & | data | ) | [inline] |
Definition at line 398 of file LinkedList.hpp.
References ListNode< T >::Delete(), ListNode< T >::GetNext(), ListNode< T >::m_data, LinkedList< T >::m_head, LinkedList< T >::m_pool, and ListNode< T >::TryFixLink().
friend class ListIterator [friend] |
Definition at line 308 of file LinkedList.hpp.
ListNode<T> LinkedList< T >::m_head [mutable, private] |
Definition at line 312 of file LinkedList.hpp.
Referenced by LinkedList< T >::Add(), LinkedList< T >::Clear(), LinkedList< T >::CopyList(), LinkedList< T >::Empty(), LinkedList< T >::LinkedList(), LinkedList< T >::operator==(), and LinkedList< T >::Remove().
Pool<T>& LinkedList< T >::m_pool [private] |
Definition at line 310 of file LinkedList.hpp.
Referenced by LinkedList< T >::Add(), LinkedList< T >::Clear(), LinkedList< T >::CopyList(), and LinkedList< T >::Remove().