template<typename T>
sead::ObjList class

Base classes

class ListImpl

Derived classes

template<typename T, s32 N>
class FixedObjList

Public types

class iterator

Public static functions

static auto calculateWorkBufferSize(size_t n) -> size_t constexpr

Constructors, destructors, conversion operators

ObjList() defaulted
ObjList(s32 max_num, void* buf)
__attribute__((always_inline))

Public functions

void allocBuffer(s32 capacity, Heap* heap, s32 alignment = sizeof(void*))
auto tryAllocBuffer(s32 capacity, Heap* heap, s32 alignment = sizeof(void*)) -> bool
void setBuffer(s32 max_num, void* buf)
void freeBuffer()
auto isBufferReady() const -> bool
auto isFull() const -> bool
auto front() const -> T*
auto back() const -> T*
auto popBack() -> T
auto popFront() -> T
template<class... Args>
auto emplaceBack(Args && ... args) -> T*
void erase(T* item)
void clear()
auto prev(const T* obj) const -> T*
auto next(const T* obj) const -> T*
auto nth(s32 n) const -> T*
auto indexOf(const T* obj) const -> s32
auto isNodeLinked(const T* obj) const -> bool
auto begin() const -> iterator
auto end() const -> iterator
auto begin(T* ptr) const -> iterator
auto isEmpty() const -> bool
auto size() const -> s32
void reverse()
void shuffle()
void shuffle(Random* random)
auto checkLinks() const -> bool

Protected types

using CompareCallbackImpl = int(*)(const void*, const void*)

Protected static functions

template<class T, class ComparePredicate>
static void mergeSortImpl_(ListNode* front, ListNode* back, s32 num, s32 offset, const ComparePredicate& predicate)

Protected functions

template<class T, class ComparePredicate>
void sort(s32 offset, const ComparePredicate& cmp)
template<class T, class ComparePredicate>
void mergeSort(s32 offset, const ComparePredicate& cmp)
void pushBack(ListNode* item)
void pushFront(ListNode* item)
void insertBefore(ListNode* node, ListNode* node_to_insert)
void insertAfter(ListNode* node, ListNode* node_to_insert)
void erase(ListNode* item)
auto nth(int n) const -> ListNode*
auto indexOf(const ListNode*) const -> s32
void swap(ListNode* n1, ListNode* n2)
void moveAfter(ListNode* basis, ListNode* n)
void moveBefore(ListNode* basis, ListNode* n)
auto find(const void* ptr, s32 offset, CompareCallbackImpl cmp) const -> ListNode*
void uniq(s32 offset, CompareCallbackImpl cmp)

Protected variables

ListNode mStartEnd
s32 mCount

Typedef documentation

template<typename T>
using sead::ObjList<T>::CompareCallbackImpl = int(*)(const void*, const void*) protected

Function documentation

template<typename T>
sead::ObjList<T>::__attribute__((always_inline))

template<typename T>
bool sead::ObjList<T>::isEmpty() const

template<typename T>
s32 sead::ObjList<T>::size() const

template<typename T>
void sead::ObjList<T>::reverse()

template<typename T>
void sead::ObjList<T>::shuffle()

template<typename T>
void sead::ObjList<T>::shuffle(Random* random)

template<typename T>
bool sead::ObjList<T>::checkLinks() const

template<typename T> template<class T, class ComparePredicate>
static void sead::ObjList<T>::mergeSortImpl_(ListNode* front, ListNode* back, s32 num, s32 offset, const ComparePredicate& predicate) protected

template<typename T> template<class T, class ComparePredicate>
void sead::ObjList<T>::sort(s32 offset, const ComparePredicate& cmp) protected

template<typename T> template<class T, class ComparePredicate>
void sead::ObjList<T>::mergeSort(s32 offset, const ComparePredicate& cmp) protected

template<typename T>
void sead::ObjList<T>::pushBack(ListNode* item) protected

template<typename T>
void sead::ObjList<T>::pushFront(ListNode* item) protected

template<typename T>
void sead::ObjList<T>::insertBefore(ListNode* node, ListNode* node_to_insert) protected

template<typename T>
void sead::ObjList<T>::insertAfter(ListNode* node, ListNode* node_to_insert) protected

template<typename T>
void sead::ObjList<T>::erase(ListNode* item) protected

template<typename T>
ListNode* sead::ObjList<T>::nth(int n) const protected

template<typename T>
s32 sead::ObjList<T>::indexOf(const ListNode*) const protected

template<typename T>
void sead::ObjList<T>::swap(ListNode* n1, ListNode* n2) protected

template<typename T>
void sead::ObjList<T>::moveAfter(ListNode* basis, ListNode* n) protected

template<typename T>
void sead::ObjList<T>::moveBefore(ListNode* basis, ListNode* n) protected

template<typename T>
ListNode* sead::ObjList<T>::find(const void* ptr, s32 offset, CompareCallbackImpl cmp) const protected

template<typename T>
void sead::ObjList<T>::uniq(s32 offset, CompareCallbackImpl cmp) protected

Variable documentation

template<typename T>
ListNode sead::ObjList<T>::mStartEnd protected

template<typename T>
s32 sead::ObjList<T>::mCount protected