|
OpenLexocad
27.0
|
Dedicated to those who aren't confident with the entity-component-system architecture. More...
#include <entt.hpp>
Public Types | |
| using | registry_type = basic_registry< Entity > |
| Type of registry used internally. More... | |
| using | entity_type = Entity |
| Underlying entity identifier. More... | |
Public Member Functions | |
| basic_actor () ENTT_NOEXCEPT | |
| basic_actor (registry_type &ref) | |
| Constructs an actor from a given registry. More... | |
| basic_actor (entity_type entity, registry_type &ref) | |
| Constructs an actor from a given entity. More... | |
| virtual | ~basic_actor () |
| Default destructor. More... | |
| basic_actor (basic_actor &&other) | |
| Move constructor. More... | |
| basic_actor & | operator= (basic_actor &&other) |
| Move assignment operator. More... | |
| template<typename Component , typename... Args> | |
| decltype(auto) | assign (Args &&... args) |
| Assigns the given component to an actor. More... | |
| template<typename Component > | |
| void | remove () |
| Removes the given component from an actor. More... | |
| template<typename... Component> | |
| bool | has () const ENTT_NOEXCEPT |
| Checks if an actor has the given components. More... | |
| template<typename... Component> | |
| decltype(auto) | get () const ENTT_NOEXCEPT |
| Returns references to the given components for an actor. More... | |
| template<typename... Component> | |
| decltype(auto) | get () ENTT_NOEXCEPT |
| Returns references to the given components for an actor. More... | |
| template<typename... Component> | |
| auto | try_get () const ENTT_NOEXCEPT |
| Returns pointers to the given components for an actor. More... | |
| template<typename... Component> | |
| auto | try_get () ENTT_NOEXCEPT |
| Returns pointers to the given components for an actor. More... | |
| const registry_type & | backend () const ENTT_NOEXCEPT |
| Returns a reference to the underlying registry. More... | |
| registry_type & | backend () ENTT_NOEXCEPT |
| Returns a reference to the underlying registry. More... | |
| entity_type | entity () const ENTT_NOEXCEPT |
| Returns the entity associated with an actor. More... | |
| operator bool () const ENTT_NOEXCEPT | |
| Checks if an actor refers to a valid entity or not. More... | |
Dedicated to those who aren't confident with the entity-component-system architecture.
Tiny wrapper around a registry, for all those users that aren't confident with entity-component-system architecture and prefer to iterate objects directly.
| Entity | A valid entity type (see entt_traits for more details). |
| using entt::basic_actor< Entity >::entity_type = Entity |
Underlying entity identifier.
| using entt::basic_actor< Entity >::registry_type = basic_registry<Entity> |
Type of registry used internally.
|
inline |
|
inlineexplicit |
Constructs an actor from a given registry.
| ref | An instance of the registry class. |
|
inlineexplicit |
Constructs an actor from a given entity.
| entity | A valid entity identifier. |
| ref | An instance of the registry class. |
|
inlinevirtual |
Default destructor.
|
inline |
Move constructor.
After actor move construction, instances that have been moved from are placed in a valid but unspecified state. It's highly discouraged to continue using them.
| other | The instance to move from. |
|
inline |
Assigns the given component to an actor.
A new instance of the given component is created and initialized with the arguments provided (the component must have a proper constructor or be of aggregate type). Then the component is assigned to the actor.
In case the actor already has a component of the given type, it's replaced with the new one.
| Component | Type of the component to create. |
| Args | Types of arguments to use to construct the component. |
| args | Parameters to use to initialize the component. |
|
inline |
Returns a reference to the underlying registry.
|
inline |
Returns a reference to the underlying registry.
|
inline |
Returns the entity associated with an actor.
|
inline |
Returns references to the given components for an actor.
| Component | Types of components to get. |
|
inline |
Returns references to the given components for an actor.
| Component | Types of components to get. |
|
inline |
Checks if an actor has the given components.
| Component | Components for which to perform the check. |
|
inlineexplicit |
Checks if an actor refers to a valid entity or not.
|
inline |
Move assignment operator.
After actor move assignment, instances that have been moved from are placed in a valid but unspecified state. It's highly discouraged to continue using them.
| other | The instance to move from. |
|
inline |
Removes the given component from an actor.
| Component | Type of the component to remove. |
|
inline |
Returns pointers to the given components for an actor.
| Component | Types of components to get. |
|
inline |
Returns pointers to the given components for an actor.
| Component | Types of components to get. |