template<typename T>
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
Typedef documentation
#include <container/seadListImpl.h>
template<typename T>
using sead:: ObjList<T>:: CompareCallbackImpl = int(*)(const void*, const void*) protected
Function documentation
#include <container/seadListImpl.h>
template<typename T>
sead:: ObjList<T>:: __attribute__((always_inline))
#include <container/seadListImpl.h>
template<typename T>
bool sead:: ObjList<T>:: isEmpty() const
#include <container/seadListImpl.h>
template<typename T>
s32 sead:: ObjList<T>:: size() const
#include <container/seadListImpl.h>
template<typename T>
void sead:: ObjList<T>:: reverse()
#include <container/seadListImpl.h>
template<typename T>
void sead:: ObjList<T>:: shuffle()
#include <container/seadListImpl.h>
template<typename T>
void sead:: ObjList<T>:: shuffle(Random* random)
#include <container/seadListImpl.h>
template<typename T>
bool sead:: ObjList<T>:: checkLinks() const
#include <container/seadListImpl.h>
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
#include <container/seadListImpl.h>
template<typename T>
template<class T, class ComparePredicate>
void sead:: ObjList<T>:: sort(s32 offset,
const ComparePredicate& cmp) protected
#include <container/seadListImpl.h>
template<typename T>
template<class T, class ComparePredicate>
void sead:: ObjList<T>:: mergeSort(s32 offset,
const ComparePredicate& cmp) protected
#include <container/seadListImpl.h>
template<typename T>
void sead:: ObjList<T>:: pushBack(ListNode* item) protected
#include <container/seadListImpl.h>
template<typename T>
void sead:: ObjList<T>:: pushFront(ListNode* item) protected
#include <container/seadListImpl.h>
template<typename T>
void sead:: ObjList<T>:: insertBefore(ListNode* node,
ListNode* node_to_insert) protected
#include <container/seadListImpl.h>
template<typename T>
void sead:: ObjList<T>:: insertAfter(ListNode* node,
ListNode* node_to_insert) protected
#include <container/seadListImpl.h>
template<typename T>
void sead:: ObjList<T>:: erase(ListNode* item) protected
#include <container/seadListImpl.h>
template<typename T>
ListNode* sead:: ObjList<T>:: nth(int n) const protected
#include <container/seadListImpl.h>
template<typename T>
s32 sead:: ObjList<T>:: indexOf(const ListNode*) const protected
#include <container/seadListImpl.h>
template<typename T>
void sead:: ObjList<T>:: swap(ListNode* n1,
ListNode* n2) protected
#include <container/seadListImpl.h>
template<typename T>
void sead:: ObjList<T>:: moveAfter(ListNode* basis,
ListNode* n) protected
#include <container/seadListImpl.h>
template<typename T>
void sead:: ObjList<T>:: moveBefore(ListNode* basis,
ListNode* n) protected
#include <container/seadListImpl.h>
template<typename T>
ListNode* sead:: ObjList<T>:: find(const void* ptr,
s32 offset,
CompareCallbackImpl cmp) const protected
#include <container/seadListImpl.h>
template<typename T>
void sead:: ObjList<T>:: uniq(s32 offset,
CompareCallbackImpl cmp) protected
Variable documentation
#include <container/seadListImpl.h>
template<typename T>
ListNode sead:: ObjList<T>:: mStartEnd protected
#include <container/seadListImpl.h>
template<typename T>
s32 sead:: ObjList<T>:: mCount protected