![]() |
Gaia-ECS v0.9.3
A simple and powerful entity component system
|
Public Member Functions | |
| EntityBuilder (World &world, Entity entity, EntityContainer &ec) | |
| EntityBuilder (World &world, Entity entity) | |
| EntityBuilder (const EntityBuilder &)=default | |
| EntityBuilder (EntityBuilder &&)=delete | |
| EntityBuilder & | operator= (const EntityBuilder &)=delete |
| EntityBuilder & | operator= (EntityBuilder &&)=delete |
| void | commit () |
| Commits all gathered changes and performs an archetype movement. | |
| void | name (const char *name, uint32_t len=0) |
| Assigns a name to entity. Ignored if used with pair. The string is copied and kept internally. | |
| void | name_raw (const char *name, uint32_t len=0) |
| Assigns a name to entity. Ignored if used with pair. The string is NOT copied. Your are responsible for its lifetime. | |
| void | alias (const char *alias, uint32_t len=0) |
| Assigns an alias to entity. Ignored if used with pair. The string is copied and kept internally. | |
| void | alias_raw (const char *alias, uint32_t len=0) |
| Assigns an alias to entity. Ignored if used with pair. The string is NOT copied. You are responsible for its lifetime. | |
| void | del_name () |
| Removes any name associated with the entity. | |
| void | del_alias () |
| Removes any alias associated with the entity. | |
| EntityBuilder & | add (Entity entity) |
| Prepares an archetype movement by following the "add" edge of the current archetype. | |
| EntityBuilder & | add (Pair pair) |
| Prepares an archetype movement by following the "add" edge of the current archetype. | |
| EntityBuilder & | as (Entity entityBase) |
| Shortcut for add(Pair(Is, entityBase)). Effectively makes an entity inherit from entityBase. | |
| EntityBuilder & | prefab () |
| Marks the entity as a prefab. | |
| GAIA_NODISCARD bool | as (Entity entity, Entity entityBase) const |
| Check if entity inherits from entityBase. | |
| EntityBuilder & | child (Entity parent) |
| Shortcut for add(Pair(ChildOf, parent)) | |
| template<typename T > | |
| Entity | register_component () |
| Takes care of registering the component. | |
| template<typename T > | |
| EntityBuilder & | add () |
| EntityBuilder & | del (Entity entity) |
| Prepares an archetype movement by following the "del" edge of the current archetype. | |
| EntityBuilder & | del (Pair pair) |
| Prepares an archetype movement by following the "del" edge of the current archetype. | |
| template<typename T > | |
| EntityBuilder & | del () |
Public Attributes | |
| World & | m_world |
| Archetype * | m_pArchetypeSrc = nullptr |
| Original archetype m_entity belongs to. | |
| Chunk * | m_pChunkSrc = nullptr |
| Original chunk m_entity belonged to. | |
| uint32_t | m_rowSrc = 0 |
| Original row. | |
| Archetype * | m_pArchetype = nullptr |
| Target archetype we want to move to. | |
| EntityNameLookupKey | m_targetNameKey |
| Target name. | |
| EntityNameLookupKey | m_targetAliasKey |
| Target alias string pointer. | |
| Entity | m_entity |
| Source entity. | |
| Entity | m_graphEdgeEntity = EntityBad |
| Entity describing a single-step graph transition recorded during builder use. | |
| uint8_t | m_graphEdgeOpCount = 0 |
| Number of archetype-changing builder operations since the last commit. | |
| bool | m_graphEdgeIsAdd = false |
| Whether the recorded single-step transition is an add or delete move. | |
Friends | |
| class | World |
|
inline |
Prepares an archetype movement by following the "add" edge of the current archetype.
| entity | Added entity |
|
inline |
Prepares an archetype movement by following the "add" edge of the current archetype.
| pair | Relationship pair |
|
inline |
Assigns an alias to entity. Ignored if used with pair. The string is copied and kept internally.
| alias | A null-terminated string. |
| len | String length. If zero, the length is calculated. |
|
inline |
Assigns an alias to entity. Ignored if used with pair. The string is NOT copied. You are responsible for its lifetime.
| alias | Pointer to a stable null-terminated string. |
| len | String length. If zero, the length is calculated. |
|
inline |
Check if entity inherits from entityBase.
| entity | Source entity |
| entityBase | Base entity |
|
inline |
Shortcut for add(Pair(Is, entityBase)). Effectively makes an entity inherit from entityBase.
| entityBase | Entity to inherit from |
|
inline |
Commits all gathered changes and performs an archetype movement.
|
inline |
Prepares an archetype movement by following the "del" edge of the current archetype.
| entity | Removed entity |
|
inline |
Prepares an archetype movement by following the "del" edge of the current archetype.
| pair | Relationship pair |
|
inline |
Assigns a name to entity. Ignored if used with pair. The string is copied and kept internally.
| name | A null-terminated string. |
| len | String length. If zero, the length is calculated. |
|
inline |
Assigns a name to entity. Ignored if used with pair. The string is NOT copied. Your are responsible for its lifetime.
| name | Pointer to a stable null-terminated string. |
| len | String length. If zero, the length is calculated. |
|
inline |
Takes care of registering the component.
| T |