|
OpenLexocad
27.0
|
Basic storage implementation. More...
#include <entt.hpp>
Additional Inherited Members | |
Public Types inherited from entt::basic_storage< Entity, Type, typename > | |
| using | object_type = Type |
| Type of the objects associated with the entities. More... | |
| using | entity_type = Entity |
| Underlying entity identifier. More... | |
| using | size_type = std::size_t |
| Unsigned integer type. More... | |
| using | iterator_type = iterator< false > |
| Random access iterator type. More... | |
| using | const_iterator_type = iterator< true > |
| Constant random access iterator type. More... | |
Public Types inherited from entt::sparse_set< Entity > | |
| using | entity_type = Entity |
| Underlying entity identifier. More... | |
| using | size_type = std::size_t |
| Unsigned integer type. More... | |
| using | iterator_type = iterator |
| Random access iterator type. More... | |
Public Member Functions inherited from entt::basic_storage< Entity, Type, typename > | |
| void | reserve (const size_type cap) |
| Increases the capacity of a storage. More... | |
| void | shrink_to_fit () |
| Requests the removal of unused capacity. More... | |
| const object_type * | raw () const ENTT_NOEXCEPT |
| Direct access to the array of objects. More... | |
| object_type * | raw () ENTT_NOEXCEPT |
| Direct access to the array of objects. More... | |
| const_iterator_type | cbegin () const ENTT_NOEXCEPT |
| Returns an iterator to the beginning. More... | |
| const_iterator_type | begin () const ENTT_NOEXCEPT |
| Returns an iterator to the beginning. More... | |
| iterator_type | begin () ENTT_NOEXCEPT |
| Returns an iterator to the beginning. More... | |
| const_iterator_type | cend () const ENTT_NOEXCEPT |
| Returns an iterator to the end. More... | |
| const_iterator_type | end () const ENTT_NOEXCEPT |
| Returns an iterator to the end. More... | |
| iterator_type | end () ENTT_NOEXCEPT |
| Returns an iterator to the end. More... | |
| const object_type & | get (const entity_type entt) const ENTT_NOEXCEPT |
| Returns the object associated with an entity. More... | |
| object_type & | get (const entity_type entt) ENTT_NOEXCEPT |
| Returns the object associated with an entity. More... | |
| const object_type * | try_get (const entity_type entt) const ENTT_NOEXCEPT |
| Returns a pointer to the object associated with an entity, if any. More... | |
| object_type * | try_get (const entity_type entt) ENTT_NOEXCEPT |
| Returns a pointer to the object associated with an entity, if any. More... | |
| template<typename... Args> | |
| object_type & | construct (const entity_type entt, Args &&... args) |
| Assigns an entity to a storage and constructs its object. More... | |
| template<typename It , typename... Args> | |
| iterator_type | batch (It first, It last, Args &&... args) |
| Assigns one or more entities to a storage and default constructs or copy constructs their objects. More... | |
| void | destroy (const entity_type entt) |
| Removes an entity from a storage and destroys its object. More... | |
| void | swap (const entity_type lhs, const entity_type rhs) ENTT_NOEXCEPT override |
| Swaps entities and objects in the internal packed arrays. More... | |
| template<typename Compare , typename Sort = std_sort, typename... Args> | |
| void | sort (iterator_type first, iterator_type last, Compare compare, Sort algo=Sort{}, Args &&... args) |
| Sort elements according to the given comparison function. More... | |
| void | reset () |
| Resets a storage. More... | |
Public Member Functions inherited from entt::sparse_set< Entity > | |
| sparse_set ()=default | |
| Default constructor. More... | |
| sparse_set (const sparse_set &other) | |
| Copy constructor. More... | |
| sparse_set (sparse_set &&)=default | |
| Default move constructor. More... | |
| virtual | ~sparse_set () ENTT_NOEXCEPT=default |
| Default destructor. More... | |
| sparse_set & | operator= (const sparse_set &other) |
| Copy assignment operator. More... | |
| sparse_set & | operator= (sparse_set &&)=default |
| Default move assignment operator. More... | |
| void | reserve (const size_type cap) |
| Increases the capacity of a sparse set. More... | |
| size_type | capacity () const ENTT_NOEXCEPT |
| Returns the number of elements that a sparse set has currently allocated space for. More... | |
| void | shrink_to_fit () |
| Requests the removal of unused capacity. More... | |
| size_type | extent () const ENTT_NOEXCEPT |
| Returns the extent of a sparse set. More... | |
| size_type | size () const ENTT_NOEXCEPT |
| Returns the number of elements in a sparse set. More... | |
| bool | empty () const ENTT_NOEXCEPT |
| Checks whether a sparse set is empty. More... | |
| const entity_type * | data () const ENTT_NOEXCEPT |
| Direct access to the internal packed array. More... | |
| iterator_type | begin () const ENTT_NOEXCEPT |
| Returns an iterator to the beginning. More... | |
| iterator_type | end () const ENTT_NOEXCEPT |
| Returns an iterator to the end. More... | |
| iterator_type | find (const entity_type entt) const ENTT_NOEXCEPT |
| Finds an entity. More... | |
| bool | has (const entity_type entt) const ENTT_NOEXCEPT |
| Checks if a sparse set contains an entity. More... | |
| size_type | index (const entity_type entt) const ENTT_NOEXCEPT |
| Returns the position of an entity in a sparse set. More... | |
| void | construct (const entity_type entt) |
| Assigns an entity to a sparse set. More... | |
| template<typename It > | |
| void | batch (It first, It last) |
| Assigns one or more entities to a sparse set. More... | |
| void | destroy (const entity_type entt) |
| Removes an entity from a sparse set. More... | |
| template<typename Compare , typename Sort = std_sort, typename... Args> | |
| void | sort (iterator_type first, iterator_type last, Compare compare, Sort algo=Sort{}, Args &&... args) |
| Sort elements according to the given comparison function. More... | |
| template<typename Apply , typename Compare , typename Sort = std_sort, typename... Args> | |
| void | arrange (iterator_type first, iterator_type last, Apply apply, Compare compare, Sort algo=Sort{}, Args &&... args) |
| Sort elements according to the given comparison function. More... | |
| void | respect (const sparse_set &other) ENTT_NOEXCEPT |
| Sort entities according to their order in another sparse set. More... | |
| void | reset () |
| Resets a sparse set. More... | |
Basic storage implementation.
This class is a refinement of a sparse set that associates an object to an entity. The main purpose of this class is to extend sparse sets to store components in a registry. It guarantees fast access both to the elements and to the entities.
raw and size member functions for that). Use begin and end instead.| Entity | A valid entity type (see entt_traits for more details). |
| Type | Type of objects assigned to the entities. |