|
| | basic_sparse_set (const deletion_policy policy=deletion_policy::unspecified, const allocator_type &allocator=allocator_type{}) |
| | Constructs an empty sparse set. More...
|
| |
| | basic_sparse_set (const basic_sparse_set &other)=delete |
| | Deleted copy constructor. More...
|
| |
| | basic_sparse_set (basic_sparse_set &&other) noexcept |
| | Move-constructs a sparse set. More...
|
| |
| | basic_sparse_set (basic_sparse_set &&other, const allocator_type &allocator) |
| | Move-constructs a sparse set using a specific allocator. More...
|
| |
| virtual | ~basic_sparse_set () |
| | Destroys the sparse set. More...
|
| |
| auto | operator= (const basic_sparse_set &other) -> basic_sparse_set &=delete |
| | Deleted copy assignment operator. More...
|
| |
| auto | operator= (basic_sparse_set &&other) noexcept -> basic_sparse_set & |
| | Move-assigns a sparse set. More...
|
| |
|
auto | swap (basic_sparse_set &other) noexcept -> void |
| | Swaps the contents of two sparse sets.
|
| |
|
constexpr auto | get_allocator () const noexcept -> allocator_type |
| | Returns the allocator associated with the container.
|
| |
|
auto | policy () const noexcept -> deletion_policy |
| | Returns the deletion policy.
|
| |
|
auto | free_list () const noexcept -> size_type |
| | Returns the index of the free-list head.
|
| |
| virtual void | reserve (const size_type capacity) |
| | Reserves dense storage capacity. More...
|
| |
|
virtual auto | capacity () const noexcept -> size_type |
| | Returns dense storage capacity.
|
| |
|
auto | extent () const noexcept -> size_type |
| | Returns sparse storage extent.
|
| |
|
auto | size () const noexcept -> size_type |
| | Returns the number of stored entities.
|
| |
|
auto | is_empty () const noexcept -> bool |
| | Checks whether the set is empty.
|
| |
|
auto | is_contiguous () const noexcept -> bool |
| | Checks whether the dense storage is contiguous.
|
| |
|
auto | data () const noexcept -> const_pointer |
| | Returns pointer to dense storage.
|
| |
|
auto | data () noexcept -> pointer |
| | Returns pointer to dense storage.
|
| |
|
auto | bump (const entity_type entity) -> version_type |
| | Updates the version of an entity.
|
| |
|
auto | begin () const noexcept -> iterator |
| | Returns iterator to the first element.
|
| |
|
auto | cbegin () const noexcept -> const_iterator |
| | Returns const iterator to the first element.
|
| |
|
auto | end () const noexcept -> iterator |
| | Returns iterator to the end.
|
| |
|
auto | cend () const noexcept -> const_iterator |
| | Returns const iterator to the end.
|
| |
|
bool | contains (const entity_type entity) const noexcept |
| | Checks whether an entity exists in the set.
|
| |
|
auto | current (const entity_type entity) const noexcept -> version_type |
| | Returns the current version of an entity.
|
| |
|
auto | find (const entity_type entity) const noexcept -> const_iterator |
| | Finds an entity iterator.
|
| |
|
auto | index (const entity_type entity) const noexcept -> size_type |
| | Returns the dense index of an entity.
|
| |
|
auto | erase (const entity_type entity) -> void |
| | Removes an entity.
|
| |
|
auto | remove (const entity_type entity) -> bool |
| | Removes an entity if present.
|
| |
|
template<typename Compare , typename Sort = utility::std_sort, typename... Args> |
| auto | sort (Compare compare, Sort sort=Sort{}, Args &&... args) -> void |
| | Sorts entities using a comparator.
|
| |
|
template<typename Compare , typename Sort = utility::std_sort, typename... Args> |
| auto | sort_n (const size_type length, Compare compare, Sort sort=Sort{}, Args &&... args) -> void |
| | Sorts the first N entities.
|
| |
|
auto | clear () -> void |
| | Clears all entities.
|
| |
|
auto | invoke (const utility::hashed_string &tag, const entity_type entity) -> void |
| | Invokes a tagged callback on an entity.
|
| |
template<typename Entity, memory::allocator_for< Entity > Allocator = std::allocator<Entity>>
class sbx::ecs::basic_sparse_set< Entity, Allocator >
Sparse set container for entity identifiers.
- Template Parameters
-
| Entity | Entity identifier type. |
| Allocator | Allocator type. |