|
|
| 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 | del_name () |
| | Removes any name 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.
|
| |
| 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 () |
| |
◆ add() [1/2]
Prepares an archetype movement by following the "add" edge of the current archetype.
- Parameters
-
◆ add() [2/2]
Prepares an archetype movement by following the "add" edge of the current archetype.
- Parameters
-
◆ as() [1/2]
| GAIA_NODISCARD bool gaia::ecs::World::EntityBuilder::as |
( |
Entity |
entity, |
|
|
Entity |
entityBase |
|
) |
| const |
|
inline |
Check if entity inherits from entityBase.
- Parameters
-
| entity | Source entity |
| entityBase | Base entity |
- Returns
- True if entity inherits from entityBase
◆ as() [2/2]
Shortcut for add(Pair(Is, entityBase)). Effectively makes an entity inherit from entityBase.
- Parameters
-
| entityBase | Entity to inherit from |
◆ commit()
| void gaia::ecs::World::EntityBuilder::commit |
( |
| ) |
|
|
inline |
Commits all gathered changes and performs an archetype movement.
- Warning
- Once called, the object is returned to its default state (as if no add/remove was ever called).
◆ del() [1/2]
Prepares an archetype movement by following the "del" edge of the current archetype.
- Parameters
-
◆ del() [2/2]
Prepares an archetype movement by following the "del" edge of the current archetype.
- Parameters
-
◆ name()
| void gaia::ecs::World::EntityBuilder::name |
( |
const char * |
name, |
|
|
uint32_t |
len = 0 |
|
) |
| |
|
inline |
Assigns a name to entity. Ignored if used with pair. The string is copied and kept internally.
- Parameters
-
| name | A null-terminated string. |
| len | String length. If zero, the length is calculated. |
- Warning
- Name is expected to be unique. If it is not this function does nothing.
-
The name can't contain the character '.'. This character is reserved for hierarchical lookups such as "parent.child.subchild".
◆ name_raw()
| void gaia::ecs::World::EntityBuilder::name_raw |
( |
const char * |
name, |
|
|
uint32_t |
len = 0 |
|
) |
| |
|
inline |
Assigns a name to entity. Ignored if used with pair. The string is NOT copied. Your are responsible for its lifetime.
- Parameters
-
| name | Pointer to a stable null-terminated string. |
| len | String length. If zero, the length is calculated. |
- Warning
- The name is expected to be unique. If it is not this function does nothing.
-
The name can't contain the character '.'. This character is reserved for hierarchical lookups such as "parent.child.subchild".
-
In this case the string is NOT copied and NOT stored internally. You are responsible for its lifetime. The pointer also needs to be stable. Otherwise, any time your storage tries to move the string to a different place you have to unset the name before it happens and set it anew after the move is done.
◆ register_component()
template<typename T >
| Entity gaia::ecs::World::EntityBuilder::register_component |
( |
| ) |
|
|
inline |
Takes care of registering the component.
- Template Parameters
-
The documentation for this struct was generated from the following file:
- /home/runner/work/gaia-ecs/gaia-ecs/include/gaia/ecs/world.h