|
| basic_view () noexcept |
| Default constructor to use to create empty, invalid views.
|
|
| basic_view (Get &value) noexcept |
| Constructs a view from a storage class.
|
|
| basic_view (std::tuple< Get & > value, std::tuple<>={}) noexcept |
| Constructs a view from a storage class.
|
|
template<typename Type = typename Get::value_type> |
auto * | storage () const noexcept |
| Returns the storage for a given component type, if any.
|
|
template<std::size_t Index> |
auto * | storage () const noexcept |
| Returns the storage for a given index, if any.
|
|
void | storage (Get &elem) noexcept |
| Assigns a storage to a view.
|
|
template<std::size_t Index> |
void | storage (Get &elem) noexcept |
| Assigns a storage to a view.
|
|
decltype(auto) | operator[] (const entity_type entt) const |
| Returns the component assigned to the given entity.
|
|
entity_type | operator[] (const size_type pos) const |
| Returns the identifier that occupies the given position.
|
|
template<typename Elem > |
decltype(auto) | get (const entity_type entt) const |
| Returns the component assigned to the given entity.
|
|
template<std::size_t... Index> |
decltype(auto) | get (const entity_type entt) const |
| Returns the component assigned to the given entity.
|
|
template<typename Func > |
void | each (Func func) const |
| Iterates entities and components and applies the given function object to them.
|
|
iterable | each () const noexcept |
| Returns an iterable object to use to visit a view.
|
|
template<typename... OGet, typename... OExclude> |
auto | operator| (const basic_view< get_t< OGet... >, exclude_t< OExclude... > > &other) const noexcept |
| Combines two views in a more specific one.
|
|
const common_type * | handle () const noexcept |
| Returns the leading storage of a view, if any.
|
|
size_type | size () const noexcept |
| Returns the number of entities that have the given component.
|
|
bool | empty () const noexcept |
| Checks whether a view is empty.
|
|
iterator | begin () const noexcept |
| Returns an iterator to the first entity of the view.
|
|
iterator | end () const noexcept |
| Returns an iterator that is past the last entity of the view.
|
|
reverse_iterator | rbegin () const noexcept |
| Returns an iterator to the first entity of the reversed view.
|
|
reverse_iterator | rend () const noexcept |
| Returns an iterator that is past the last entity of the reversed view.
|
|
entity_type | front () const noexcept |
| Returns the first entity of the view, if any.
|
|
entity_type | back () const noexcept |
| Returns the last entity of the view, if any.
|
|
iterator | find (const entity_type entt) const noexcept |
| Finds an entity.
|
|
| operator bool () const noexcept |
| Checks if a view is fully initialized.
|
|
bool | contains (const entity_type entt) const noexcept |
| Checks if a view contains an entity.
|
|
template<typename Get>
class entt::basic_view< get_t< Get >, exclude_t<>, std::void_t< std::enable_if_t<!Get::traits_type::in_place_delete > > >
Storage view specialization.
This specialization offers a boost in terms of performance. It can access the underlying data structure directly and avoid superfluous checks.
- See also
- basic_view
- Template Parameters
-
Get | Type of storage iterated by the view. |
Definition at line 772 of file view.hpp.