OpenBarnyard
 
Loading...
Searching...
No Matches
TQList< T >::TNode Class Reference

#include <TQList.h>

Inheritance diagram for TQList< T >::TNode:
TGenericGlobalListener< EventType > TAnimation TGenericGlobalListener< T > TGlobalListener< ReceiverType, EventType >

Public Types

using Iterator = Toshi::T2Iterator<T, TNode>
 

Public Member Functions

 TNode ()
 
 ~TNode ()
 
TBOOL IsLinked () const
 
T * Next () const
 
T * Prev () const
 
void Remove ()
 

Public Attributes

friend TQList
 

Friends

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

Detailed Description

template<class T>
class TQList< T >::TNode

Definition at line 10 of file TQList.h.

Member Typedef Documentation

◆ Iterator

template<class T>
using TQList< T >::TNode::Iterator = Toshi::T2Iterator<T, TNode>

Definition at line 15 of file TQList.h.

Constructor & Destructor Documentation

◆ TNode()

template<class T>
TQList< T >::TNode::TNode ( )
inline

Definition at line 18 of file TQList.h.

19 {
20 m_pNext = TSTATICCAST( T, this );
21 m_pPrev = TSTATICCAST( T, this );
22 }
#define TSTATICCAST(POINTERTYPE, VALUE)
Definition Defines.h:69
Definition TQList.h:8

◆ ~TNode()

template<class T>
TQList< T >::TNode::~TNode ( )
inline

Definition at line 24 of file TQList.h.

25 {
26 m_pPrev->m_pNext = m_pNext;
27 m_pNext->m_pPrev = m_pPrev;
28 m_pNext = TSTATICCAST( T, this );
29 m_pPrev = TSTATICCAST( T, this );
30 }

Member Function Documentation

◆ IsLinked()

template<class T>
TBOOL TQList< T >::TNode::IsLinked ( ) const
inline

Definition at line 32 of file TQList.h.

33 {
34 return this != m_pNext;
35 }

◆ Next()

template<class T>
T * TQList< T >::TNode::Next ( ) const
inline

Definition at line 37 of file TQList.h.

38 {
39 return m_pNext;
40 }

◆ Prev()

template<class T>
T * TQList< T >::TNode::Prev ( ) const
inline

Definition at line 42 of file TQList.h.

43 {
44 return m_pPrev;
45 }

◆ Remove()

template<class T>
void TQList< T >::TNode::Remove ( )
inline

Definition at line 47 of file TQList.h.

48 {
49 m_pPrev->m_pNext = m_pNext;
50 m_pNext->m_pPrev = m_pPrev;
51 m_pNext = TSTATICCAST( T, this );
52 m_pPrev = TSTATICCAST( T, this );
53 }

Friends And Related Symbol Documentation

◆ Toshi::T2Iterator

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

Definition at line 14 of file TQList.h.

Member Data Documentation

◆ TQList

template<class T>
friend TQList< T >::TNode::TQList

Definition at line 13 of file TQList.h.


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