sead
Loading...
Searching...
No Matches
sead::TList< T > Class Template Reference

#include <seadTList.h>

Inherits sead::ListImpl.

Classes

class  constIterator
class  iterator
class  reverseConstIterator
class  reverseIterator
class  reverseRobustIterator
class  robustIterator

Public Member Functions

 TList ()
void pushBack (TListNode< T > *obj)
void pushFront (TListNode< T > *obj)
TListNode< T > * popBack ()
TListNode< T > * popFront ()
void insertBefore (TListNode< T > *basis, TListNode< T > *obj)
void insertAfter (TListNode< T > *basis, TListNode< T > *obj)
void erase (TListNode< T > *obj)
TListNode< T > * front () const
TListNode< T > * back () const
TListNode< T > * prev (const TListNode< T > *obj) const
TListNode< T > * next (const TListNode< T > *obj) const
TListNode< T > * nth (s32 index) const
s32 indexOf (const TListNode< T > *obj) const
bool isNodeLinked (const TListNode< T > *obj) const
void swap (TListNode< T > *obj1, TListNode< T > *obj2)
void moveAfter (TListNode< T > *basis, TListNode< T > *obj)
void moveBefore (TListNode< T > *basis, TListNode< T > *obj)
void clear ()
void unsafeClear ()
void sort ()
void sort (CompareCallback cmp)
void mergeSort ()
void mergeSort (CompareCallback cmp)
TListNode< T > * find (const T *obj) const
TListNode< T > * find (const T *obj, CompareCallback cmp) const
void uniq ()
void uniq (CompareCallback cmp)
iterator begin () const
iterator end () const
iterator toIterator (TListNode< T > *obj) const
constIterator constBegin () const
constIterator constEnd () const
constIterator toConstIterator (const TListNode< T > *obj) const
robustIterator robustBegin () const
robustIterator robustEnd () const
robustIterator toRobustIterator (TListNode< T > *obj) const
reverseIterator reverseBegin () const
reverseIterator reverseEnd () const
reverseIterator toReverseIterator (TListNode< T > *obj) const
reverseConstIterator reverseConstBegin () const
reverseConstIterator reverseConstEnd () const
reverseConstIterator toReverseConstIterator (const TListNode< T > *obj) const
reverseRobustIterator reverseRobustBegin () const
reverseRobustIterator reverseRobustEnd () const
reverseRobustIterator toReverseRobustIterator (TListNode< T > *obj) const
Public Member Functions inherited from sead::ListImpl
 ListImpl ()
bool isEmpty () const
s32 size () const
void reverse ()
void shuffle ()
void shuffle (Random *random)
bool checkLinks () const

Static Protected Member Functions

static s32 compareT (const T *a, const T *b)
Static Protected Member Functions inherited from sead::ListImpl
static void mergeSortImpl (ListNode *front, ListNode *back, s32 num, s32 offset, CompareCallbackImpl cmp)

Private Types

using CompareCallback = s32 (*)(const T* a, const T* b)

Additional Inherited Members

Protected Types inherited from sead::ListImpl
using CompareCallbackImpl = s32 (*)(const void* a, const void* b)
Protected Member Functions inherited from sead::ListImpl
 ListImpl (const ListImpl &)
void sort (s32 offset, CompareCallbackImpl cmp)
void mergeSort (s32 offset, CompareCallbackImpl cmp)
void pushBack (ListNode *n)
void pushFront (ListNode *n)
ListNodepopBack ()
ListNodepopFront ()
void insertBefore (ListNode *basis, ListNode *n)
void insertAfter (ListNode *basis, ListNode *n)
void erase (ListNode *n)
ListNodefront () const
ListNodeback () const
ListNodenth (s32 index) const
s32 indexOf (const ListNode *n) const
void swap (ListNode *n1, ListNode *n2)
void moveAfter (ListNode *basis, ListNode *n)
void moveBefore (ListNode *basis, ListNode *n)
ListNodefind (const void *ptr, s32 offset, CompareCallbackImpl cmp) const
void uniq (s32 offset, CompareCallbackImpl cmp)
void clear ()
void unsafeClear ()
ListImploperator= (const ListImpl &)
Protected Attributes inherited from sead::ListImpl
ListNode mStartEnd
s32 mCount

Member Typedef Documentation

◆ CompareCallback

template<typename T>
using sead::TList< T >::CompareCallback = s32 (*)(const T* a, const T* b)
private

Constructor & Destructor Documentation

◆ TList()

template<typename T>
sead::TList< T >::TList ( )
inline

Member Function Documentation

◆ pushBack()

template<typename T>
void sead::TList< T >::pushBack ( TListNode< T > * obj)
inline

◆ pushFront()

template<typename T>
void sead::TList< T >::pushFront ( TListNode< T > * obj)

◆ popBack()

template<typename T>
TListNode< T > * sead::TList< T >::popBack ( )

◆ popFront()

template<typename T>
TListNode< T > * sead::TList< T >::popFront ( )

◆ insertBefore()

template<typename T>
void sead::TList< T >::insertBefore ( TListNode< T > * basis,
TListNode< T > * obj )

◆ insertAfter()

template<typename T>
void sead::TList< T >::insertAfter ( TListNode< T > * basis,
TListNode< T > * obj )

◆ erase()

template<typename T>
void sead::TList< T >::erase ( TListNode< T > * obj)
inline

◆ front()

template<typename T>
TListNode< T > * sead::TList< T >::front ( ) const

◆ back()

template<typename T>
TListNode< T > * sead::TList< T >::back ( ) const

◆ prev()

template<typename T>
TListNode< T > * sead::TList< T >::prev ( const TListNode< T > * obj) const

◆ next()

template<typename T>
TListNode< T > * sead::TList< T >::next ( const TListNode< T > * obj) const

◆ nth()

template<typename T>
TListNode< T > * sead::TList< T >::nth ( s32 index) const
inline

◆ indexOf()

template<typename T>
s32 sead::TList< T >::indexOf ( const TListNode< T > * obj) const

◆ isNodeLinked()

template<typename T>
bool sead::TList< T >::isNodeLinked ( const TListNode< T > * obj) const

◆ swap()

template<typename T>
void sead::TList< T >::swap ( TListNode< T > * obj1,
TListNode< T > * obj2 )

◆ moveAfter()

template<typename T>
void sead::TList< T >::moveAfter ( TListNode< T > * basis,
TListNode< T > * obj )

◆ moveBefore()

template<typename T>
void sead::TList< T >::moveBefore ( TListNode< T > * basis,
TListNode< T > * obj )

◆ clear()

template<typename T>
void sead::TList< T >::clear ( )
inline

◆ unsafeClear()

template<typename T>
void sead::TList< T >::unsafeClear ( )
inline

◆ sort() [1/2]

template<typename T>
void sead::TList< T >::sort ( )
inline

◆ sort() [2/2]

template<typename T>
void sead::TList< T >::sort ( CompareCallback cmp)
inline

◆ mergeSort() [1/2]

template<typename T>
void sead::TList< T >::mergeSort ( )
inline

◆ mergeSort() [2/2]

template<typename T>
void sead::TList< T >::mergeSort ( CompareCallback cmp)
inline

◆ find() [1/2]

template<typename T>
TListNode< T > * sead::TList< T >::find ( const T * obj) const
inline

◆ find() [2/2]

template<typename T>
TListNode< T > * sead::TList< T >::find ( const T * obj,
CompareCallback cmp ) const
inline

◆ uniq() [1/2]

template<typename T>
void sead::TList< T >::uniq ( )
inline

◆ uniq() [2/2]

template<typename T>
void sead::TList< T >::uniq ( CompareCallback cmp)
inline

◆ begin()

template<typename T>
iterator sead::TList< T >::begin ( ) const
inline

◆ end()

template<typename T>
iterator sead::TList< T >::end ( ) const
inline

◆ toIterator()

template<typename T>
iterator sead::TList< T >::toIterator ( TListNode< T > * obj) const
inline

◆ constBegin()

template<typename T>
constIterator sead::TList< T >::constBegin ( ) const
inline

◆ constEnd()

template<typename T>
constIterator sead::TList< T >::constEnd ( ) const
inline

◆ toConstIterator()

template<typename T>
constIterator sead::TList< T >::toConstIterator ( const TListNode< T > * obj) const
inline

◆ robustBegin()

template<typename T>
robustIterator sead::TList< T >::robustBegin ( ) const
inline

◆ robustEnd()

template<typename T>
robustIterator sead::TList< T >::robustEnd ( ) const
inline

◆ toRobustIterator()

template<typename T>
robustIterator sead::TList< T >::toRobustIterator ( TListNode< T > * obj) const
inline

◆ reverseBegin()

template<typename T>
reverseIterator sead::TList< T >::reverseBegin ( ) const
inline

◆ reverseEnd()

template<typename T>
reverseIterator sead::TList< T >::reverseEnd ( ) const
inline

◆ toReverseIterator()

template<typename T>
reverseIterator sead::TList< T >::toReverseIterator ( TListNode< T > * obj) const
inline

◆ reverseConstBegin()

template<typename T>
reverseConstIterator sead::TList< T >::reverseConstBegin ( ) const
inline

◆ reverseConstEnd()

template<typename T>
reverseConstIterator sead::TList< T >::reverseConstEnd ( ) const
inline

◆ toReverseConstIterator()

template<typename T>
reverseConstIterator sead::TList< T >::toReverseConstIterator ( const TListNode< T > * obj) const
inline

◆ reverseRobustBegin()

template<typename T>
reverseRobustIterator sead::TList< T >::reverseRobustBegin ( ) const
inline

◆ reverseRobustEnd()

template<typename T>
reverseRobustIterator sead::TList< T >::reverseRobustEnd ( ) const
inline

◆ toReverseRobustIterator()

template<typename T>
reverseRobustIterator sead::TList< T >::toReverseRobustIterator ( TListNode< T > * obj) const
inline

◆ compareT()

template<typename T>
s32 sead::TList< T >::compareT ( const T * a,
const T * b )
inlinestaticprotected