OpenBarnyard
 
Loading...
Searching...
No Matches
T2GenericDList::Node Class Reference

#include <T2DList.h>

Inheritance diagram for T2GenericDList::Node:
T2DListNodeWrapper< T > TModelManager::ModelNode TThread TFileStream Toshi::T2NamedPipeServerThread

Public Member Functions

constexpr Node ()
 
 ~Node ()
 
TBOOL IsLinked () const
 
void InsertBefore (Node *pInsertBefore)
 
void InsertAfter (Node *pInsertAfter)
 
void Remove ()
 
NodeNext () const
 
NodePrev () const
 

Protected Attributes

friend T2GenericDList
 

Friends

template<class T>
class T2DList
 
template<class T, class Node>
class Toshi::T2Iterator
 

Detailed Description

Definition at line 18 of file T2DList.h.

Constructor & Destructor Documentation

◆ Node()

T2GenericDList::Node::Node ( )
inlineconstexpr

Definition at line 26 of file T2DList.h.

27 : m_pPrev( this ), m_pNext( this )
28 {}

◆ ~Node()

T2GenericDList::Node::~Node ( )
inline

Definition at line 30 of file T2DList.h.

31 {
32 m_pNext->m_pPrev = m_pPrev;
33 m_pPrev->m_pNext = m_pNext;
34 m_pNext = this;
35 m_pPrev = this;
36 }

Member Function Documentation

◆ InsertAfter()

void T2GenericDList::Node::InsertAfter ( Node * pInsertAfter)
inline

Definition at line 52 of file T2DList.h.

53 {
54 TASSERT( !IsLinked() );
55 m_pPrev = pInsertAfter;
56 m_pNext = pInsertAfter->m_pNext;
57 pInsertAfter->m_pNext = this;
58 m_pNext->m_pPrev = this;
59 }
#define TASSERT(X,...)
Definition Defines.h:138
TBOOL IsLinked() const
Definition T2DList.h:38

◆ InsertBefore()

void T2GenericDList::Node::InsertBefore ( Node * pInsertBefore)
inline

Definition at line 43 of file T2DList.h.

44 {
45 TASSERT( !IsLinked() );
46 m_pNext = pInsertBefore;
47 m_pPrev = pInsertBefore->m_pPrev;
48 pInsertBefore->m_pPrev = this;
49 m_pPrev->m_pNext = this;
50 }

◆ IsLinked()

TBOOL T2GenericDList::Node::IsLinked ( ) const
inline

Definition at line 38 of file T2DList.h.

39 {
40 return m_pNext != this;
41 }

◆ Next()

Node * T2GenericDList::Node::Next ( ) const
inline

Definition at line 70 of file T2DList.h.

71 {
72 return m_pNext;
73 }

◆ Prev()

Node * T2GenericDList::Node::Prev ( ) const
inline

Definition at line 75 of file T2DList.h.

76 {
77 return m_pPrev;
78 }

◆ Remove()

void T2GenericDList::Node::Remove ( )
inline

Definition at line 61 of file T2DList.h.

62 {
63 TASSERT( IsLinked() );
64 m_pPrev->m_pNext = this->m_pNext;
65 m_pNext->m_pPrev = this->m_pPrev;
66 m_pNext = this;
67 m_pPrev = this;
68 }

Friends And Related Symbol Documentation

◆ T2DList

template<class T>
friend class T2DList
friend

Definition at line 22 of file T2DList.h.

◆ Toshi::T2Iterator

template<class T, class Node>
friend class Toshi::T2Iterator
friend

Definition at line 23 of file T2DList.h.

Member Data Documentation

◆ T2GenericDList

friend T2GenericDList::Node::T2GenericDList
protected

Definition at line 21 of file T2DList.h.


The documentation for this class was generated from the following file: