|
| scoped_world (flecs::world_t *w, flecs::entity_t s) |
|
| scoped_world (const scoped_world &obj) |
|
| world () |
| Create world. More...
|
|
| world (int argc, char *argv[]) |
| Create world with command line arguments. More...
|
|
| world (world_t *w) |
| Create world from C world. More...
|
|
| world (const world &obj)=delete |
| Not allowed to copy a world. More...
|
|
| world (world &&obj) |
|
| operator world_t * () const |
|
world & | operator= (const world &obj)=delete |
| Not allowed to copy a world. More...
|
|
world & | operator= (world &&obj) |
|
void | reset () |
| Deletes and recreates the world. More...
|
|
world_t * | c_ptr () const |
| Obtain pointer to C world object. More...
|
|
void | quit () const |
| Signal application should quit. More...
|
|
void | atfini (ecs_fini_action_t action, void *ctx) const |
| Register action to be executed when world is destroyed. More...
|
|
bool | should_quit () const |
| Test if quit() has been called. More...
|
|
ecs_ftime_t | frame_begin (float delta_time=0) const |
| Begin frame. More...
|
|
void | frame_end () const |
| End frame. More...
|
|
bool | readonly_begin () const |
| Begin staging. More...
|
|
void | readonly_end () const |
| End staging. More...
|
|
bool | defer_begin () const |
| Defer operations until end of frame. More...
|
|
bool | defer_end () const |
| End block of operations to defer. More...
|
|
bool | is_deferred () const |
| Test whether deferring is enabled. More...
|
|
void | set_stage_count (int32_t stages) const |
| Configure world to have N stages. More...
|
|
int32_t | get_stage_count () const |
| Get number of configured stages. More...
|
|
int32_t | get_stage_id () const |
| Get current stage id. More...
|
|
bool | is_stage () const |
| Test if is a stage. More...
|
|
void | set_automerge (bool automerge) const |
| Enable/disable automerging for world or stage. More...
|
|
void | merge () const |
| Merge world or stage. More...
|
|
flecs::world | get_stage (int32_t stage_id) const |
| Get stage-specific world pointer. More...
|
|
flecs::world | async_stage () const |
| Create asynchronous stage. More...
|
|
flecs::world | get_world () const |
| Get actual world. More...
|
|
bool | is_readonly () const |
| Test whether the current world object is readonly. More...
|
|
void | set_ctx (void *ctx, ecs_ctx_free_t ctx_free=nullptr) const |
| Set world context. More...
|
|
void * | get_ctx () const |
| Get world context. More...
|
|
void | set_binding_ctx (void *ctx, ecs_ctx_free_t ctx_free=nullptr) const |
| Set world binding context. More...
|
|
void * | get_binding_ctx () const |
| Get world binding context. More...
|
|
void | dim (int32_t entity_count) const |
| Preallocate memory for number of entities. More...
|
|
void | set_entity_range (entity_t min, entity_t max) const |
| Set entity range. More...
|
|
void | enable_range_check (bool enabled) const |
| Enforce that operations cannot modify entities outside of range. More...
|
|
flecs::entity | set_scope (const flecs::entity_t scope) const |
| Set current scope. More...
|
|
flecs::entity | get_scope () const |
| Get current scope. More...
|
|
template<typename T > |
flecs::entity | set_scope () const |
| Same as set_scope but with type. More...
|
|
flecs::entity_t * | set_lookup_path (const flecs::entity_t *search_path) const |
| Set search path. More...
|
|
flecs::entity | lookup (const char *name, bool search_path=true) const |
| Lookup entity by name. More...
|
|
template<typename T , if_t< !is_callable< T >::value > = 0> |
void | set (const T &value) const |
| Set singleton component. More...
|
|
template<typename T , if_t< !is_callable< T >::value > = 0> |
void | set (T &&value) const |
| Set singleton component. More...
|
|
template<typename First , typename Second , typename P = flecs::pair<First, Second>, typename A = actual_type_t<P>, if_not_t< flecs::is_pair< First >::value > = 0> |
void | set (const A &value) const |
| Set singleton pair. More...
|
|
template<typename First , typename Second , typename P = flecs::pair<First, Second>, typename A = actual_type_t<P>, if_not_t< flecs::is_pair< First >::value > = 0> |
void | set (A &&value) const |
| Set singleton pair. More...
|
|
template<typename First , typename Second > |
void | set (Second second, const First &value) const |
| Set singleton pair. More...
|
|
template<typename First , typename Second > |
void | set (Second second, First &&value) const |
| Set singleton pair. More...
|
|
template<typename Func , if_t< is_callable< Func >::value > = 0> |
void | set (const Func &func) const |
| Set singleton component inside a callback. More...
|
|
template<typename T , typename ... Args> |
void | emplace (Args &&... args) const |
|
template<typename T > |
T * | get_mut () const |
| Get mut singleton component. More...
|
|
template<typename T > |
void | modified () const |
| Mark singleton component as modified. More...
|
|
template<typename T > |
ref< T > | get_ref () const |
| Get ref singleton component. More...
|
|
template<typename T > |
const T * | get () const |
| Get singleton component. More...
|
|
template<typename First , typename Second , typename P = flecs::pair<First, Second>, typename A = actual_type_t<P>> |
const A * | get () const |
| Get singleton pair. More...
|
|
template<typename First , typename Second > |
const First * | get (Second second) const |
| Get singleton pair. More...
|
|
template<typename Func , if_t< is_callable< Func >::value > = 0> |
void | get (const Func &func) const |
| Get singleton component inside a callback. More...
|
|
template<typename T > |
bool | has () const |
| Test if world has singleton component. More...
|
|
template<typename First , typename Second > |
bool | has () const |
| Test if world has the provided pair. More...
|
|
template<typename First > |
bool | has (flecs::id_t second) const |
| Test if world has the provided pair. More...
|
|
bool | has (flecs::id_t first, flecs::id_t second) const |
| Test if world has the provided pair. More...
|
|
template<typename T > |
void | add () const |
| Add singleton component. More...
|
|
template<typename First , typename Second > |
void | add () const |
| Adds a pair to the singleton component. More...
|
|
template<typename First > |
void | add (flecs::entity_t second) const |
| Adds a pair to the singleton component. More...
|
|
void | add (flecs::entity_t first, flecs::entity_t second) const |
| Adds a pair to the singleton entity. More...
|
|
template<typename T > |
void | remove () const |
| Remove singleton component. More...
|
|
template<typename First , typename Second > |
void | remove () const |
| Adds a pair to the singleton component. More...
|
|
template<typename First > |
void | remove (flecs::entity_t second) const |
| Adds a pair to the singleton component. More...
|
|
void | remove (flecs::entity_t first, flecs::entity_t second) const |
| Adds a pair to the singleton entity. More...
|
|
template<typename Func > |
void | children (Func &&f) const |
| Iterate entities in root of world Accepts a callback with the following signature: void(*)(flecs::entity e);. More...
|
|
template<typename T > |
flecs::entity | singleton () const |
| Get singleton entity for type. More...
|
|
template<typename First > |
flecs::entity | target (int32_t index=0) const |
| Get target for a given pair from a singleton entity. More...
|
|
template<typename T > |
flecs::entity | target (flecs::entity_t first, int32_t index=0) const |
| Get target for a given pair from a singleton entity. More...
|
|
flecs::entity | target (flecs::entity_t first, int32_t index=0) const |
| Get target for a given pair from a singleton entity. More...
|
|
template<typename T > |
flecs::entity | use (const char *alias=nullptr) const |
| Create alias for component. More...
|
|
flecs::entity | use (const char *name, const char *alias=nullptr) const |
| Create alias for entity. More...
|
|
void | use (flecs::entity entity, const char *alias=nullptr) const |
| Create alias for entity. More...
|
|
int | count (flecs::id_t component_id) const |
| Count entities matching a component. More...
|
|
int | count (flecs::entity_t first, flecs::entity_t second) const |
| Count entities matching a pair. More...
|
|
template<typename T > |
int | count () const |
| Count entities matching a component. More...
|
|
template<typename First > |
int | count (flecs::entity_t second) const |
| Count entities matching a pair. More...
|
|
template<typename First , typename Second > |
int | count () const |
| Count entities matching a pair. More...
|
|
template<typename Func > |
void | with (id_t with_id, const Func &func) const |
| All entities created in function are created with id. More...
|
|
template<typename T , typename Func > |
void | with (const Func &func) const |
| All entities created in function are created with type. More...
|
|
template<typename First , typename Second , typename Func > |
void | with (const Func &func) const |
| All entities created in function are created with pair. More...
|
|
template<typename First , typename Func > |
void | with (id_t second, const Func &func) const |
| All entities created in function are created with pair. More...
|
|
template<typename Func > |
void | with (id_t first, id_t second, const Func &func) const |
| All entities created in function are created with pair. More...
|
|
template<typename Func > |
void | scope (id_t parent, const Func &func) const |
| All entities created in function are created in scope. More...
|
|
template<typename T , typename Func > |
void | scope (const Func &func) const |
| Same as scope(parent, func), but with T as parent. More...
|
|
flecs::scoped_world | scope (id_t parent) const |
| Use provided scope for operations ran on returned world. More...
|
|
template<typename T > |
flecs::scoped_world | scope () const |
|
flecs::scoped_world | scope (const char *name) const |
|
void | delete_with (id_t the_id) const |
| Delete all entities with specified id. More...
|
|
void | delete_with (entity_t first, entity_t second) const |
| Delete all entities with specified pair. More...
|
|
template<typename T > |
void | delete_with () const |
| Delete all entities with specified component. More...
|
|
template<typename First , typename Second > |
void | delete_with () const |
| Delete all entities with specified pair. More...
|
|
void | remove_all (id_t the_id) const |
| Remove all instances of specified id. More...
|
|
void | remove_all (entity_t first, entity_t second) const |
| Remove all instances of specified pair. More...
|
|
template<typename T > |
void | remove_all () const |
| Remove all instances of specified component. More...
|
|
template<typename First , typename Second > |
void | remove_all () const |
| Remove all instances of specified pair. More...
|
|
template<typename Func > |
void | defer (const Func &func) const |
| Defer all operations called in function. More...
|
|
void | defer_suspend () const |
| Suspend deferring operations. More...
|
|
void | defer_resume () const |
| Resume deferring operations. More...
|
|
bool | exists (flecs::entity_t e) const |
| Check if entity id exists in the world. More...
|
|
bool | is_alive (flecs::entity_t e) const |
| Check if entity id exists in the world. More...
|
|
bool | is_valid (flecs::entity_t e) const |
| Check if entity id is valid. More...
|
|
flecs::entity | get_alive (flecs::entity_t e) const |
| Get alive entity for id. More...
|
|
flecs::entity | ensure (flecs::entity_t e) const |
| Ensures that entity with provided generation is alive. More...
|
|
void | run_post_frame (ecs_fini_action_t action, void *ctx) const |
|
const flecs::world_info_t * | get_info () const |
| Get the world info. More...
|
|
void | init_builtin_components () |
|
template<typename... Comps, typename... Args> |
flecs::alert_builder< Comps... > | alert (Args &&... args) const |
| Create alert.
|
|
flecs::app_builder | app () |
| Return app builder. More...
|
|
template<typename T , typename... Args> |
flecs::component< T > | component (Args &&... args) const |
| Find or register component.
|
|
template<typename... Args> |
flecs::untyped_component | component (Args &&... args) const |
| Find or register untyped component. More...
|
|
template<typename... Args> |
flecs::entity | entity (Args &&... args) const |
| Create an entity.
|
|
template<typename E , if_t< is_enum< E >::value > = 0> |
flecs::entity | id (E value) const |
| Convert enum constant to entity.
|
|
template<typename E , if_t< is_enum< E >::value > = 0> |
flecs::entity | entity (E value) const |
| Convert enum constant to entity.
|
|
template<typename... Args> |
flecs::entity | prefab (Args &&... args) const |
| Create a prefab.
|
|
template<typename T > |
flecs::entity | entity (const char *name=nullptr) const |
| Create an entity that's associated with a type.
|
|
template<typename T > |
flecs::entity | prefab (const char *name=nullptr) const |
| Create a prefab that's associated with a type.
|
|
template<typename E , if_t< is_enum< E >::value > = 0> |
flecs::entity | to_entity (E constant) const |
| Convert enum constant to entity.
|
|
flecs::event_builder | event (flecs::entity_t evt) const |
| Create a new event. More...
|
|
template<typename E > |
flecs::event_builder_typed< E > | event () const |
| Create a new event. More...
|
|
template<typename... Comps, typename... Args> |
flecs::filter< Comps... > | filter (Args &&... args) const |
| Create a filter. More...
|
|
template<typename T > |
flecs::id | id () const |
|
template<typename ... Args> |
flecs::id | id (Args &&... args) const |
|
template<typename T > |
flecs::id | id () const |
| Get id from a type.
|
|
template<typename ... Args> |
flecs::id | id (Args &&... args) const |
| Id factory.
|
|
template<typename First , typename Second > |
flecs::id | pair () const |
| Get pair id from relationship, object.
|
|
template<typename First > |
flecs::id | pair (entity_t o) const |
| Get pair id from relationship, object.
|
|
flecs::id | pair (entity_t r, entity_t o) const |
| Get pair id from relationship, object.
|
|
flecs::string | to_json (flecs::entity_t tid, const void *value) |
| Serialize untyped value to JSON. More...
|
|
template<typename T > |
flecs::string | to_json (const T *value) |
| Serialize value to JSON. More...
|
|
flecs::string | to_json () |
| Serialize world to JSON. More...
|
|
template<typename T > |
const char * | from_json (flecs::entity_t tid, void *value, const char *json, flecs::from_json_desc_t *desc=nullptr) |
| Deserialize value from JSON. More...
|
|
template<typename T > |
const char * | from_json (T *value, const char *json, flecs::from_json_desc_t *desc=nullptr) |
| Deserialize value from JSON. More...
|
|
const char * | from_json (const char *json, flecs::from_json_desc_t *desc=nullptr) |
| Deserialize JSON into world. More...
|
|
template<typename... Args> |
flecs::metric_builder | metric (Args &&... args) const |
| Create metric.
|
|
flecs::observer | observer (flecs::entity e) const |
| Observer builder. More...
|
|
flecs::pipeline_builder | pipeline () const |
| Create a new pipeline. More...
|
|
template<typename... Comps, typename... Args> |
flecs::query< Comps... > | query (Args &&... args) const |
| Create a query. More...
|
|
template<typename... Comps, typename... Args> |
flecs::rule< Comps... > | rule (Args &&... args) const |
| Create a rule. More...
|
|
template<typename... Args> |
flecs::snapshot | snapshot (Args &&... args) const |
| Create a snapshot.
|
|
flecs::system | system (flecs::entity e) const |
| Upcast entity to a system. More...
|
|
template<typename... Args> |
flecs::term | term (Args &&... args) const |
| Create a term.
|
|
template<typename... Args> |
flecs::timer | timer (Args &&... args) const |
| Find or register a timer.
|
|
template<typename Kind > |
untyped_component & | metric (flecs::entity_t parent=0, const char *brief=nullptr, const char *name=nullptr) |
| Register member as metric. More...
|
|
flecs::string | to_expr (flecs::entity_t tid, const void *value) |
| Convert value to string. More...
|
|
template<typename Module > |
flecs::entity | module (const char *name=nullptr) const |
| Define a module. More...
|
|