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

#include <T2DList.h>

Inheritance diagram for T2GenericDList:
T2DList< TModelManager::ModelNode > T2DList< TThread > T2DList< T > T2SortedList< T, Container, SortResults >

Classes

class  Node
 

Public Member Functions

 T2GenericDList ()=default
 
 ~T2GenericDList ()
 
TBOOL IsLinked () const
 
void ClearBefore (Node *pNode)
 
void Clear ()
 
TBOOL IsInList (Node *pNode) const
 
TUINT Size () const
 

Protected Attributes

Node m_oRoot
 

Detailed Description

Definition at line 15 of file T2DList.h.

Constructor & Destructor Documentation

◆ T2GenericDList()

T2GenericDList::T2GenericDList ( )
default

◆ ~T2GenericDList()

T2GenericDList::~T2GenericDList ( )
inline

Definition at line 88 of file T2DList.h.

89 {
90 TASSERT( m_oRoot.m_pNext == &m_oRoot );
91 TASSERT( TFALSE == IsLinked() );
92 }
#define TASSERT(X,...)
Definition Defines.h:138
#define TFALSE
Definition Typedefs.h:24
TBOOL IsLinked() const
Definition T2DList.h:94

Member Function Documentation

◆ Clear()

void T2GenericDList::Clear ( )
inline

Definition at line 114 of file T2DList.h.

115 {
116 Node* pNode = m_oRoot.m_pNext;
117
118 while ( pNode != &m_oRoot )
119 {
120 IsLinked();
121 pNode->Remove();
122 pNode = m_oRoot.m_pNext;
123 }
124 }

◆ ClearBefore()

void T2GenericDList::ClearBefore ( Node * pNode)
inline

Definition at line 99 of file T2DList.h.

100 {
101 if ( pNode != &m_oRoot )
102 {
103 Node* pCurrentNode = m_oRoot.m_pNext;
104
105 while ( pCurrentNode != pNode )
106 {
107 IsLinked();
108 pCurrentNode->Remove();
109 pCurrentNode = m_oRoot.m_pNext;
110 }
111 }
112 }

◆ IsInList()

TBOOL T2GenericDList::IsInList ( Node * pNode) const
inline

Definition at line 126 of file T2DList.h.

127 {
128 for ( Node* pCNode = m_oRoot.m_pNext; pCNode != &m_oRoot; pCNode = pCNode->m_pNext )
129 {
130 if ( pCNode == pCNode ) return TTRUE;
131 }
132
133 return TFALSE;
134 }
#define TTRUE
Definition Typedefs.h:25

◆ IsLinked()

TBOOL T2GenericDList::IsLinked ( ) const
inline

Definition at line 94 of file T2DList.h.

95 {
96 return m_oRoot.IsLinked();
97 }

◆ Size()

TUINT T2GenericDList::Size ( ) const
inline

Definition at line 136 of file T2DList.h.

137 {
138 TUINT uiSize = 0;
139
140 for ( Node* pNode = m_oRoot.m_pNext; pNode != &m_oRoot; pNode = pNode->m_pNext )
141 {
142 uiSize++;
143 }
144
145 return uiSize;
146 }
unsigned int TUINT
Definition Typedefs.h:8

Member Data Documentation

◆ m_oRoot

Node T2GenericDList::m_oRoot
mutableprotected

Definition at line 149 of file T2DList.h.


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