template<int MAX_ALLOCS, class... TYPES>
class Ids::IdAllocatorSafe< MAX_ALLOCS, TYPES >
- See also
- Ids::IdAllocator
- Copyright
- (C) 2017-2020 Individual contributors, see AUTHORS file
|
| | IdAllocatorSafe () |
| | constructor
|
| |
| Ids::Id32 | Alloc () |
| | Allocate an object.
|
| |
| void | Dealloc (Ids::Id32 index) |
| | Deallocate an object. Just places it in freeids array for recycling.
|
| |
| | ArrayAllocatorSafe () |
| | constructor
|
| |
| | ArrayAllocatorSafe (ArrayAllocatorSafe< MAX_ALLOCS, TYPES... > &&rhs) |
| | move constructor
|
| |
| | ArrayAllocatorSafe (const ArrayAllocatorSafe< MAX_ALLOCS, TYPES... > &rhs) |
| | copy constructor
|
| |
| | ~ArrayAllocatorSafe () |
| | destructor
|
| |
| void | operator= (const ArrayAllocatorSafe< MAX_ALLOCS, TYPES... > &rhs) |
| | assign operator
|
| |
| void | operator= (ArrayAllocatorSafe< MAX_ALLOCS, TYPES... > &&rhs) |
| | move operator
|
| |
| uint32_t | Alloc () |
| | allocate a new resource
|
| |
| void | EraseIndex (const uint32_t id) |
| | Erase element for each.
|
| |
| void | EraseIndexSwap (const uint32_t id) |
| | Erase element for each.
|
| |
| tuple_array_t< MEMBER, TYPES... > & | Get (const uint32_t index) |
| | get single item from resource
|
| |
| const tuple_array_t< MEMBER, TYPES... > & | Get (const uint32_t index) const |
| | same as 32 bit get, but const
|
| |
| const tuple_array_t< MEMBER, TYPES... > & | ConstGet (const uint32_t index) const |
| | Get const explicitly.
|
| |
| void | Set (const uint32_t index, const tuple_array_t< MEMBER, TYPES... > &type) |
| | set single item
|
| |
| void | Set (const uint32_t index, TYPES...) |
| | set for each in tuple
|
| |
| const Util::Array< tuple_array_t< MEMBER, TYPES... > > & | GetArray () const |
| | get array const reference
|
| |
| Util::Array< tuple_array_t< MEMBER, TYPES... > > & | GetArray () |
| | get array
|
| |
| const uint32_t | Size () const |
| | get number of used indices
|
| |
| void | Reserve (uint32_t size) |
| | grow capacity of arrays to size
|
| |
| void | Clear () |
| | clear entire allocator and start from scratch.
|
| |
| void | UpdateSize () |
| | Any reserve and direct array access might mess with the size.
|
| |
| void | TryAcquire (const uint32_t index) |
| | Spinlock to acquire.
|
| |
| bool | Acquire (const uint32_t index) |
| | Acquire element, asserts if false and returns true if this call acquired.
|
| |
| void | Release (const uint32_t index) |
| | Release an object, the next thread that acquires may use this instance as it fits.
|
| |