76 p->pPrev = pNext->pPrev;
84 p->pNext = pNext->pPrev;
94 pPrev->pNext = (T*)pdest;
95 pNext->pPrev = (T*)pdest;
134 template<
class T,
class B = T>
class List
169 p->pNext =
Root.pNext;
171 Root.pNext->pPrev = p;
177 p->pPrev =
Root.pPrev;
179 Root.pPrev->pNext = p;
185 p->pPrev->pNext = p->pNext;
186 p->pNext->pPrev = p->pPrev;
210 plast->pNext =
Root.pNext;
212 Root.pNext->pPrev = plast;
225 pfirst->pPrev =
Root.pPrev;
226 Root.pPrev->pNext = pfirst;
235 if (pfirst != &src.
Root)
241 src.
Root.pPrev = pfirst->pPrev;
243 plast->pNext =
Root.pNext;
245 Root.pNext->pPrev = plast;
261 src.
Root.pNext = ptail;
264 plast->pNext =
Root.pNext;
266 Root.pNext->pPrev = plast;
281 pfirst->pPrev->pNext = pend;
282 pend->pPrev = pfirst->pPrev;
284 plast->pNext =
Root.pNext;
286 Root.pNext->pPrev = plast;
321 template<
class List,
class Allocator>
328 allocator.
Free(
self);
void ReplaceNodeWith(T *pnew)
bool IsLast(const ValueType *p) const
bool IsFirst(const ValueType *p) const
void PushListToFront(List< T > &src)
void BringToFront(ValueType *p)
void PushListItemsToFront(ValueType *pfirst, ValueType *pend)
void PushFront(ValueType *p)
void PushPrecedingListItemsToFront(List< T > &src, ValueType *ptail)
void SendToBack(ValueType *p)
static void Remove(ValueType *p)
const ValueType * GetLast() const
static ValueType * GetNext(ValueType *p)
const ValueType * GetFirst() const
bool IsNull(const ValueType *p) const
void InsertNodeBefore(T *p)
void PushFollowingListItemsToFront(List< T > &src, ValueType *pfirst)
void Alloc_MoveTo(List< T > *pdest)
void PushBack(ValueType *p)
void FreeListElements(List &list, Allocator &allocator)
void InsertNodeAfter(T *p)
static const ValueType * GetPrev(const ValueType *p)
void PushListToBack(List< T > &src)
static const ValueType * GetNext(const ValueType *p)
static ValueType * GetPrev(ValueType *p)
virtual void Free(void *p)=0
void Alloc_MoveTo(ListNode< T > *pdest)
const List< T > & operator=(const List< T > &)