template<typename T, s32 N>
FixedPtrArray class
Base classes
-
template<typename T>class AtomicPtrArray<T>
Public types
- using CompareCallback = s32(*)(const T*, const T*)
Constructors, destructors, conversion operators
Public functions
- void setBuffer(s32 ptrNumMax, void* buf) deleted
-
void allocBuffer(s32 ptrNumMax,
sead::
Heap* heap, s32 alignment = sizeof(void*)) deleted -
auto tryAllocBuffer(s32 ptrNumMax,
sead::
Heap* heap, s32 alignment = sizeof(void*)) -> bool deleted - void freeBuffer() deleted
- auto at(s32 pos) const -> T*
- auto unsafeAt(s32 pos) const -> T*
- auto operator[](s32 pos) const -> T*
- auto front() const -> T*
- auto back() const -> T*
- void pushBack(T* ptr)
- auto popBack() -> T*
- auto popFront() -> T*
- auto indexOf(const T* ptr) const -> s32
- void sort()
- void sort(CompareCallback cmp)
- void heapSort()
- void heapSort(CompareCallback cmp)
- auto equal(const AtomicPtrArray& other, CompareCallback cmp) const -> bool
- auto find(const T* ptr) const -> T*
- auto find(const T* ptr, CompareCallback cmp) const -> T*
- auto search(const T* ptr) const -> s32
- auto search(const T* ptr, CompareCallback cmp) const -> s32
- auto operator==(const AtomicPtrArray& other) const -> bool
- auto operator!=(const AtomicPtrArray& other) const -> bool
- auto begin() const -> iterator
- auto end() const -> iterator
- auto constBegin() const -> constIterator
- auto constEnd() const -> constIterator
- auto data() const -> T**
- auto isBufferReady() const -> bool
- auto isEmpty() const -> bool
- auto isFull() const -> bool
- auto size() const -> s32
- auto capacity() const -> s32
- void erase(s32 position)
- void erase(s32 position, s32 count)
- void clear()
- void swap(s32 pos1, s32 pos2)
- void shuffle()
-
void shuffle(sead::
Random* random)
Protected types
- using CompareCallbackImpl = int(*)(const void*a, const void*b)
Protected static functions
- static auto compareT(const T* a, const T* b) -> int
Protected functions
- void pushBack(void* ptr)
- auto indexOf(const void* ptr) const -> s32
- void sort(CompareCallbackImpl cmp)
- void heapSort(CompareCallbackImpl cmp)
- auto equal(const AtomicPtrArrayImpl& other, CompareCallbackImpl cmp) const -> bool
- auto find(const void* ptr, CompareCallbackImpl cmp) const -> void*
- auto search(const void* ptr, CompareCallbackImpl cmp) const -> s32
Protected variables
-
sead::
Atomic<s32> mPtrNum -
sead::
Atomic<s32> mPtrNumMax - void** mPtrs