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

#include <TQList.h>

Classes

class  TNode
 

Public Member Functions

 TQList ()=default
 
 ~TQList ()
 
void PushFront (T *a_pNode)
 
void Push (T *a_pNode)
 
T * Pop ()
 
TNode::Iterator Head () const
 
TNode::Iterator Begin () const
 
const TNodeEnd () const
 
void Clear ()
 
void Remove (T *a_pNode)
 
TBOOL IsEmpty () const
 

Detailed Description

template<class T>
class TQList< T >

Definition at line 7 of file TQList.h.

Constructor & Destructor Documentation

◆ TQList()

template<class T>
TQList< T >::TQList ( )
default

◆ ~TQList()

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

Definition at line 82 of file TQList.h.

82{ TASSERT( IsEmpty() ); }
#define TASSERT(X,...)
Definition Defines.h:138
TBOOL IsEmpty() const
Definition TQList.h:129

Member Function Documentation

◆ Begin()

template<class T>
TNode::Iterator TQList< T >::Begin ( ) const
inline

Definition at line 106 of file TQList.h.

107 {
108 return m_oRoot.m_pNext;
109 }

◆ Clear()

template<class T>
void TQList< T >::Clear ( )
inline

Definition at line 116 of file TQList.h.

117 {
118 while ( !IsEmpty() )
119 {
120 Remove( Begin() );
121 }
122 }
TNode::Iterator Begin() const
Definition TQList.h:106
void Remove(T *a_pNode)
Definition TQList.h:124

◆ End()

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

Definition at line 111 of file TQList.h.

112 {
113 return &m_oRoot;
114 }

◆ Head()

template<class T>
TNode::Iterator TQList< T >::Head ( ) const
inline

Definition at line 101 of file TQList.h.

102 {
103 return m_oRoot.m_pNext;
104 }

◆ IsEmpty()

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

Definition at line 129 of file TQList.h.

130 {
131 return !m_oRoot.IsLinked();
132 }

◆ Pop()

template<class T>
T * TQList< T >::Pop ( )
inline

Definition at line 94 of file TQList.h.

95 {
96 auto pFirstElement = m_oRoot.m_pNext;
98 return pFirstElement;
99 }
Definition TQList.h:8

◆ Push()

template<class T>
void TQList< T >::Push ( T * a_pNode)
inline

Definition at line 89 of file TQList.h.

90 {
91 a_pNode->InsertBefore( &m_oRoot );
92 }

◆ PushFront()

template<class T>
void TQList< T >::PushFront ( T * a_pNode)
inline

Definition at line 84 of file TQList.h.

85 {
86 a_pNode->InsertAfter( &m_oRoot );
87 }

◆ Remove()

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

Definition at line 124 of file TQList.h.

125 {
126 a_pNode->Remove();
127 }

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