Flecs v3.2
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
flecs.h File Reference

Flecs public API. More...

#include "flecs/private/api_defines.h"
#include "flecs/private/vec.h"
#include "flecs/private/sparse.h"
#include "flecs/private/block_allocator.h"
#include "flecs/private/map.h"
#include "flecs/private/allocator.h"
#include "flecs/private/strbuf.h"
#include "flecs/os_api.h"
#include "flecs/private/api_types.h"
#include "flecs/private/api_support.h"
#include "flecs/private/hashmap.h"
#include "flecs/addons/flecs_c.h"
#include "flecs/private/addons.h"

Go to the source code of this file.

Classes

struct  ecs_type_t
 A type is a list of (component) ids. More...
 
struct  ecs_header_t
 Header for ecs_poly_t objects. More...
 
struct  ecs_iterable_t
 Iterable mixin. More...
 
struct  ecs_term_id_t
 Type that describes a single identifier in a term. More...
 
struct  ecs_term_t
 Type that describes a term (single element in a query) More...
 
struct  ecs_filter_t
 Filters alllow for ad-hoc quick filtering of entity tables. More...
 
struct  ecs_observer_t
 
struct  ecs_type_hooks_t
 Type that contains component lifecycle callbacks. More...
 
struct  ecs_type_info_t
 Type that contains component information (passed to ctors/dtors/...) More...
 
struct  ecs_entity_desc_t
 Used with ecs_entity_init. More...
 
struct  ecs_bulk_desc_t
 Used with ecs_bulk_init. More...
 
struct  ecs_component_desc_t
 Used with ecs_component_init. More...
 
struct  ecs_filter_desc_t
 Used with ecs_filter_init. More...
 
struct  ecs_query_desc_t
 Used with ecs_query_init. More...
 
struct  ecs_observer_desc_t
 Used with ecs_observer_init. More...
 
struct  ecs_event_desc_t
 Used with ecs_emit. More...
 
struct  ecs_value_t
 
struct  ecs_world_info_t
 Type that contains information about the world. More...
 
struct  ecs_query_group_info_t
 Type that contains information about a query group. More...
 
struct  EcsIdentifier
 A (string) identifier. More...
 
struct  EcsComponent
 Component information. More...
 
struct  EcsPoly
 Component for storing a poly object. More...
 
struct  EcsTarget
 Target data for flattened relationships. More...
 
struct  ecs_flatten_desc_t
 

Macros

#define ecs_float_t   float
 Customizable precision for floating point operations. More...
 
#define ecs_ftime_t   ecs_float_t
 Customizable precision for scalar time values. More...
 
#define FLECS_NO_DEPRECATED_WARNINGS
 disables deprecated warnings More...
 
#define FLECS_DEBUG
 Used for input parameter checking and cheap sanity checks. More...
 
#define FLECS_CPP
 C++ API. More...
 
#define FLECS_MODULE
 Module support. More...
 
#define FLECS_PARSER
 String parser for queries. More...
 
#define FLECS_PLECS
 ECS data definition format. More...
 
#define FLECS_RULES
 Constraint solver for advanced queries. More...
 
#define FLECS_SNAPSHOT
 Snapshot & restore ECS data. More...
 
#define FLECS_STATS
 Access runtime statistics. More...
 
#define FLECS_MONITOR
 Track runtime statistics periodically. More...
 
#define FLECS_METRICS
 Expose component data as statistics. More...
 
#define FLECS_ALERTS
 Monitor conditions for errors. More...
 
#define FLECS_SYSTEM
 System support. More...
 
#define FLECS_PIPELINE
 Pipeline support. More...
 
#define FLECS_TIMER
 Timer support. More...
 
#define FLECS_META
 Reflection support. More...
 
#define FLECS_META_C
 Utilities for populating reflection data. More...
 
#define FLECS_UNITS
 Builtin standard units. More...
 
#define FLECS_EXPR
 Parsing strings to/from component values. More...
 
#define FLECS_JSON
 Parsing JSON to/from component values. More...
 
#define FLECS_DOC
 Document entities & components. More...
 
#define FLECS_COREDOC
 Documentation for core entities & components. More...
 
#define FLECS_LOG
 When enabled ECS provides more detailed logs. More...
 
#define FLECS_APP
 Application addon. More...
 
#define FLECS_OS_API_IMPL
 Default implementation for OS API. More...
 
#define FLECS_HTTP
 Tiny HTTP server for connecting to remote UI. More...
 
#define FLECS_REST
 REST API for querying application data. More...
 
#define FLECS_HI_COMPONENT_ID   (256)
 This constant can be used to balance between performance and memory utilization. More...
 
#define FLECS_HI_ID_RECORD_ID   (1024)
 This constant can be used to balance between performance and memory utilization. More...
 
#define FLECS_SPARSE_PAGE_BITS   (12)
 This constant is used to determine the number of bits of an id that is used to determine the page index when used with a sparse set. More...
 
#define FLECS_ENTITY_PAGE_BITS   (12)
 Same as FLECS_SPARSE_PAGE_BITS, but for the entity index. More...
 
#define FLECS_ID_DESC_MAX   (32)
 Maximum number of ids to add ecs_entity_desc_t / ecs_bulk_desc_t. More...
 
#define FLECS_TERM_DESC_MAX   (16)
 Maximum number of terms in ecs_filter_desc_t. More...
 
#define FLECS_EVENT_DESC_MAX   (8)
 Maximum number of events in ecs_observer_desc_t. More...
 
#define FLECS_VARIABLE_COUNT_MAX   (64)
 Maximum number of query variables per query. More...
 
#define FLECS_QUERY_SCOPE_NESTING_MAX   (8)
 Maximum nesting depth of query scopes. More...
 
#define EcsSelf   (1u << 1)
 Match on self. More...
 
#define EcsUp   (1u << 2)
 Match by traversing upwards. More...
 
#define EcsDown   (1u << 3)
 Match by traversing downwards (derived, cannot be set) More...
 
#define EcsTraverseAll   (1u << 4)
 Match all entities encountered through traversal. More...
 
#define EcsCascade   (1u << 5)
 Sort results breadth first. More...
 
#define EcsParent   (1u << 6)
 Short for up(ChildOf) More...
 
#define EcsIsVariable   (1u << 7)
 Term id is a variable. More...
 
#define EcsIsEntity   (1u << 8)
 Term id is an entity. More...
 
#define EcsIsName   (1u << 9)
 Term id is a name (don't attempt to lookup as entity) More...
 
#define EcsFilter   (1u << 10)
 Prevent observer from triggering on term. More...
 
#define EcsTraverseFlags   (EcsUp|EcsDown|EcsTraverseAll|EcsSelf|EcsCascade|EcsParent)
 
#define EcsTermMatchAny   (1u << 0)
 
#define EcsTermMatchAnySrc   (1u << 1)
 
#define EcsTermSrcFirstEq   (1u << 2)
 
#define EcsTermSrcSecondEq   (1u << 3)
 
#define EcsTermTransitive   (1u << 4)
 
#define EcsTermReflexive   (1u << 5)
 
#define EcsTermIdInherited   (1u << 6)
 
#define EcsTermMatchDisabled   (1u << 7)
 
#define EcsTermMatchPrefab   (1u << 8)
 
#define EcsLastInternalComponentId   (ecs_id(EcsPoly))
 Value used to quickly check if component is builtin. More...
 
#define EcsFirstUserComponentId   (8)
 The first user-defined component starts from this id. More...
 
#define EcsFirstUserEntityId   (FLECS_HI_COMPONENT_ID + 128)
 The first user-defined entity starts from this id. More...
 
#define ecs_poly_is(object, type)    ecs_poly_is_(object, type##_magic)
 

Typedefs

typedef uint64_t ecs_id_t
 Ids are the things that can be added to an entity. More...
 
typedef ecs_id_t ecs_entity_t
 An entity identifier. More...
 
typedef struct ecs_world_t ecs_world_t
 A world is the container for all ECS data and supporting features. More...
 
typedef struct ecs_table_t ecs_table_t
 A table stores entities and components for a specific type. More...
 
typedef struct ecs_term_t ecs_term_t
 A term is a single element in a query. More...
 
typedef struct ecs_filter_t ecs_filter_t
 A filter is an iterable data structure that describes a query. More...
 
typedef struct ecs_query_t ecs_query_t
 A query that caches its results. More...
 
typedef struct ecs_rule_t ecs_rule_t
 A rule is a query with advanced graph traversal features. More...
 
typedef struct ecs_observer_t ecs_observer_t
 An observer is a system that is invoked when an event matches its query. More...
 
typedef struct ecs_observable_t ecs_observable_t
 An observable produces events that can be listened for by an observer. More...
 
typedef struct ecs_iter_t ecs_iter_t
 
typedef struct ecs_ref_t ecs_ref_t
 A ref is a fast way to fetch a component for a specific entity. More...
 
typedef struct ecs_type_hooks_t ecs_type_hooks_t
 Type hooks are callbacks associated with component lifecycle events. More...
 
typedef struct ecs_type_info_t ecs_type_info_t
 Type information. More...
 
typedef struct ecs_record_t ecs_record_t
 Information about an entity, like its table and row. More...
 
typedef struct ecs_id_record_t ecs_id_record_t
 Information about a (component) id, such as type info and tables with the id. More...
 
typedef struct ecs_table_record_t ecs_table_record_t
 Information about where in a table a specific (component) id is stored. More...
 
typedef void ecs_poly_t
 A poly object. More...
 
typedef struct ecs_mixins_t ecs_mixins_t
 Type that stores poly mixins. More...
 
typedef struct ecs_header_t ecs_header_t
 Header for ecs_poly_t objects.
 
typedef void(* ecs_run_action_t) (ecs_iter_t *it)
 Function prototype for runnables (systems, observers). More...
 
typedef void(* ecs_iter_action_t) (ecs_iter_t *it)
 Function prototype for iterables. More...
 
typedef void(* ecs_iter_init_action_t) (const ecs_world_t *world, const ecs_poly_t *iterable, ecs_iter_t *it, ecs_term_t *filter)
 Function prototype for creating an iterator from a poly. More...
 
typedef bool(* ecs_iter_next_action_t) (ecs_iter_t *it)
 Function prototype for iterating an iterator. More...
 
typedef void(* ecs_iter_fini_action_t) (ecs_iter_t *it)
 Function prototype for freeing an iterator. More...
 
typedef int(* ecs_order_by_action_t) (ecs_entity_t e1, const void *ptr1, ecs_entity_t e2, const void *ptr2)
 Callback used for comparing components. More...
 
typedef void(* ecs_sort_table_action_t) (ecs_world_t *world, ecs_table_t *table, ecs_entity_t *entities, void *ptr, int32_t size, int32_t lo, int32_t hi, ecs_order_by_action_t order_by)
 Callback used for sorting the entire table of components. More...
 
typedef uint64_t(* ecs_group_by_action_t) (ecs_world_t *world, ecs_table_t *table, ecs_id_t group_id, void *ctx)
 Callback used for grouping tables in a query. More...
 
typedef void *(* ecs_group_create_action_t) (ecs_world_t *world, uint64_t group_id, void *group_by_ctx)
 
typedef void(* ecs_group_delete_action_t) (ecs_world_t *world, uint64_t group_id, void *group_ctx, void *group_by_ctx)
 
typedef void(* ecs_module_action_t) (ecs_world_t *world)
 Initialization action for modules. More...
 
typedef void(* ecs_fini_action_t) (ecs_world_t *world, void *ctx)
 Action callback on world exit. More...
 
typedef void(* ecs_ctx_free_t) (void *ctx)
 Function to cleanup context data. More...
 
typedef int(* ecs_compare_action_t) (const void *ptr1, const void *ptr2)
 Callback used for sorting values. More...
 
typedef uint64_t(* ecs_hash_value_action_t) (const void *ptr)
 Callback used for hashing values. More...
 
typedef void(* ecs_xtor_t) (void *ptr, int32_t count, const ecs_type_info_t *type_info)
 Constructor/destructor callback. More...
 
typedef void(* ecs_copy_t) (void *dst_ptr, const void *src_ptr, int32_t count, const ecs_type_info_t *type_info)
 Copy is invoked when a component is copied into another component. More...
 
typedef void(* ecs_move_t) (void *dst_ptr, void *src_ptr, int32_t count, const ecs_type_info_t *type_info)
 Move is invoked when a component is moved to another component. More...
 
typedef void(* ecs_poly_dtor_t) (ecs_poly_t *poly)
 
typedef struct ecs_iterable_t ecs_iterable_t
 Iterable mixin. More...
 
typedef enum ecs_inout_kind_t ecs_inout_kind_t
 Specify read/write access for term.
 
typedef enum ecs_oper_kind_t ecs_oper_kind_t
 Specify operator for term.
 
typedef struct ecs_term_id_t ecs_term_id_t
 Type that describes a single identifier in a term.
 
typedef struct ecs_entity_desc_t ecs_entity_desc_t
 Used with ecs_entity_init. More...
 
typedef struct ecs_bulk_desc_t ecs_bulk_desc_t
 Used with ecs_bulk_init. More...
 
typedef struct ecs_component_desc_t ecs_component_desc_t
 Used with ecs_component_init.
 
typedef struct ecs_filter_desc_t ecs_filter_desc_t
 Used with ecs_filter_init.
 
typedef struct ecs_query_desc_t ecs_query_desc_t
 Used with ecs_query_init.
 
typedef struct ecs_observer_desc_t ecs_observer_desc_t
 Used with ecs_observer_init.
 
typedef struct ecs_event_desc_t ecs_event_desc_t
 Used with ecs_emit.
 
typedef struct ecs_value_t ecs_value_t
 
typedef struct ecs_world_info_t ecs_world_info_t
 Type that contains information about the world.
 
typedef struct ecs_query_group_info_t ecs_query_group_info_t
 Type that contains information about a query group.
 
typedef struct EcsIdentifier EcsIdentifier
 A (string) identifier. More...
 
typedef struct EcsComponent EcsComponent
 Component information.
 
typedef struct EcsPoly EcsPoly
 Component for storing a poly object.
 
typedef struct EcsTarget EcsTarget
 Target data for flattened relationships.
 
typedef ecs_iterable_t EcsIterable
 Component for iterable entities. More...
 
typedef struct ecs_flatten_desc_t ecs_flatten_desc_t
 

Enumerations

enum  ecs_inout_kind_t {
  EcsInOutDefault , EcsInOutNone , EcsInOut , EcsIn ,
  EcsOut
}
 Specify read/write access for term. More...
 
enum  ecs_oper_kind_t {
  EcsAnd , EcsOr , EcsNot , EcsOptional ,
  EcsAndFrom , EcsOrFrom , EcsNotFrom
}
 Specify operator for term. More...
 

Functions

ecs_world_tecs_init (void)
 Create a new world. More...
 
ecs_world_tecs_mini (void)
 Create a new world with just the core module. More...
 
ecs_world_tecs_init_w_args (int argc, char *argv[])
 Create a new world with arguments. More...
 
int ecs_fini (ecs_world_t *world)
 Delete a world. More...
 
bool ecs_is_fini (const ecs_world_t *world)
 Returns whether the world is being deleted. More...
 
void ecs_atfini (ecs_world_t *world, ecs_fini_action_t action, void *ctx)
 Register action to be executed when world is destroyed. More...
 
float ecs_frame_begin (ecs_world_t *world, float delta_time)
 Begin frame. More...
 
void ecs_frame_end (ecs_world_t *world)
 End frame. More...
 
void ecs_run_post_frame (ecs_world_t *world, ecs_fini_action_t action, void *ctx)
 Register action to be executed once after frame. More...
 
void ecs_quit (ecs_world_t *world)
 Signal exit This operation signals that the application should quit. More...
 
bool ecs_should_quit (const ecs_world_t *world)
 Return whether a quit has been signaled. More...
 
void ecs_measure_frame_time (ecs_world_t *world, bool enable)
 Measure frame time. More...
 
void ecs_measure_system_time (ecs_world_t *world, bool enable)
 Measure system time. More...
 
void ecs_set_target_fps (ecs_world_t *world, float fps)
 Set target frames per second (FPS) for application. More...
 
bool ecs_readonly_begin (ecs_world_t *world)
 Begin readonly mode. More...
 
void ecs_readonly_end (ecs_world_t *world)
 End readonly mode. More...
 
void ecs_merge (ecs_world_t *world)
 Merge world or stage. More...
 
bool ecs_defer_begin (ecs_world_t *world)
 Defer operations until end of frame. More...
 
bool ecs_is_deferred (const ecs_world_t *world)
 Test if deferring is enabled for current stage. More...
 
bool ecs_defer_end (ecs_world_t *world)
 End block of operations to defer. More...
 
void ecs_defer_suspend (ecs_world_t *world)
 Suspend deferring but do not flush queue. More...
 
void ecs_defer_resume (ecs_world_t *world)
 Resume deferring. More...
 
void ecs_set_automerge (ecs_world_t *world, bool automerge)
 Enable/disable automerging for world or stage. More...
 
void ecs_set_stage_count (ecs_world_t *world, int32_t stages)
 Configure world to have N stages. More...
 
int32_t ecs_get_stage_count (const ecs_world_t *world)
 Get number of configured stages. More...
 
int32_t ecs_get_stage_id (const ecs_world_t *world)
 Get current stage id. More...
 
ecs_world_tecs_get_stage (const ecs_world_t *world, int32_t stage_id)
 Get stage-specific world pointer. More...
 
bool ecs_stage_is_readonly (const ecs_world_t *world)
 Test whether the current world is readonly. More...
 
ecs_world_tecs_async_stage_new (ecs_world_t *world)
 Create asynchronous stage. More...
 
void ecs_async_stage_free (ecs_world_t *stage)
 Free asynchronous stage. More...
 
bool ecs_stage_is_async (ecs_world_t *stage)
 Test whether provided stage is asynchronous. More...
 
void ecs_set_ctx (ecs_world_t *world, void *ctx, ecs_ctx_free_t ctx_free)
 Set a world context. More...
 
void ecs_set_binding_ctx (ecs_world_t *world, void *ctx, ecs_ctx_free_t ctx_free)
 Set a world binding context. More...
 
void * ecs_get_ctx (const ecs_world_t *world)
 Get the world context. More...
 
void * ecs_get_binding_ctx (const ecs_world_t *world)
 Get the world binding context. More...
 
const ecs_world_info_tecs_get_world_info (const ecs_world_t *world)
 Get world info. More...
 
void ecs_dim (ecs_world_t *world, int32_t entity_count)
 Dimension the world for a specified number of entities. More...
 
void ecs_set_entity_range (ecs_world_t *world, ecs_entity_t id_start, ecs_entity_t id_end)
 Set a range for issueing new entity ids. More...
 
bool ecs_enable_range_check (ecs_world_t *world, bool enable)
 Enable/disable range limits. More...
 
ecs_entity_t ecs_get_max_id (const ecs_world_t *world)
 Get the largest issued entity id (not counting generation). More...
 
void ecs_run_aperiodic (ecs_world_t *world, ecs_flags32_t flags)
 Force aperiodic actions. More...
 
int32_t ecs_delete_empty_tables (ecs_world_t *world, ecs_id_t id, uint16_t clear_generation, uint16_t delete_generation, int32_t min_id_count, double time_budget_seconds)
 Cleanup empty tables. More...
 
const ecs_world_tecs_get_world (const ecs_poly_t *poly)
 Get world from poly. More...
 
ecs_entity_t ecs_get_entity (const ecs_poly_t *poly)
 Get entity from poly. More...
 
bool ecs_poly_is_ (const ecs_poly_t *object, int32_t type)
 Test if pointer is of specified type. More...
 
ecs_id_t ecs_make_pair (ecs_entity_t first, ecs_entity_t second)
 Make a pair id. More...
 
ecs_entity_t ecs_new_id (ecs_world_t *world)
 Create new entity id. More...
 
ecs_entity_t ecs_new_low_id (ecs_world_t *world)
 Create new low id. More...
 
ecs_entity_t ecs_new_w_id (ecs_world_t *world, ecs_id_t id)
 Create new entity with (component) id. More...
 
ecs_entity_t ecs_new_w_table (ecs_world_t *world, ecs_table_t *table)
 Create new entity in table. More...
 
ecs_entity_t ecs_entity_init (ecs_world_t *world, const ecs_entity_desc_t *desc)
 Find or create an entity. More...
 
const ecs_entity_tecs_bulk_init (ecs_world_t *world, const ecs_bulk_desc_t *desc)
 Bulk create/populate new entities. More...
 
const ecs_entity_tecs_bulk_new_w_id (ecs_world_t *world, ecs_id_t id, int32_t count)
 Create N new entities. More...
 
ecs_entity_t ecs_clone (ecs_world_t *world, ecs_entity_t dst, ecs_entity_t src, bool copy_value)
 Clone an entity This operation clones the components of one entity into another entity. More...
 
void ecs_delete (ecs_world_t *world, ecs_entity_t entity)
 Delete an entity. More...
 
void ecs_delete_with (ecs_world_t *world, ecs_id_t id)
 Delete all entities with the specified id. More...
 
void ecs_add_id (ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Add a (component) id to an entity. More...
 
void ecs_remove_id (ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Remove a (component) id from an entity. More...
 
void ecs_override_id (ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Add override for (component) id. More...
 
void ecs_clear (ecs_world_t *world, ecs_entity_t entity)
 Clear all components. More...
 
void ecs_remove_all (ecs_world_t *world, ecs_id_t id)
 Remove all instances of the specified (component) id. More...
 
ecs_entity_t ecs_set_with (ecs_world_t *world, ecs_id_t id)
 Set current with id. More...
 
ecs_id_t ecs_get_with (const ecs_world_t *world)
 Get current with id. More...
 
void ecs_enable (ecs_world_t *world, ecs_entity_t entity, bool enabled)
 Enable or disable entity. More...
 
void ecs_enable_id (ecs_world_t *world, ecs_entity_t entity, ecs_id_t id, bool enable)
 Enable or disable component. More...
 
bool ecs_is_enabled_id (const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Test if component is enabled. More...
 
const void * ecs_get_id (const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Get an immutable pointer to a component. More...
 
ecs_ref_t ecs_ref_init_id (const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Create a component ref. More...
 
void * ecs_ref_get_id (const ecs_world_t *world, ecs_ref_t *ref, ecs_id_t id)
 Get component from ref. More...
 
void ecs_ref_update (const ecs_world_t *world, ecs_ref_t *ref)
 Update ref. More...
 
void * ecs_get_mut_id (ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Get a mutable pointer to a component. More...
 
void * ecs_get_mut_modified_id (ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Combines get_mut + modifed in single operation. More...
 
ecs_record_tecs_write_begin (ecs_world_t *world, ecs_entity_t entity)
 Begin exclusive write access to entity. More...
 
void ecs_write_end (ecs_record_t *record)
 End exclusive write access to entity. More...
 
const ecs_record_tecs_read_begin (ecs_world_t *world, ecs_entity_t entity)
 Begin read access to entity. More...
 
void ecs_read_end (const ecs_record_t *record)
 End read access to entity. More...
 
ecs_entity_t ecs_record_get_entity (const ecs_record_t *record)
 Get entity corresponding with record. More...
 
const void * ecs_record_get_id (ecs_world_t *world, const ecs_record_t *record, ecs_id_t id)
 Get component from entity record. More...
 
void * ecs_record_get_mut_id (ecs_world_t *world, ecs_record_t *record, ecs_id_t id)
 Same as ecs_record_get_id, but returns a mutable pointer. More...
 
bool ecs_record_has_id (ecs_world_t *world, const ecs_record_t *record, ecs_id_t id)
 Test if entity for record has component. More...
 
void * ecs_emplace_id (ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Emplace a component. More...
 
void ecs_modified_id (ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Signal that a component has been modified. More...
 
ecs_entity_t ecs_set_id (ecs_world_t *world, ecs_entity_t entity, ecs_id_t id, size_t size, const void *ptr)
 Set the value of a component. More...
 
bool ecs_is_valid (const ecs_world_t *world, ecs_entity_t e)
 Test whether an entity is valid. More...
 
bool ecs_is_alive (const ecs_world_t *world, ecs_entity_t e)
 Test whether an entity is alive. More...
 
ecs_id_t ecs_strip_generation (ecs_entity_t e)
 Remove generation from entity id. More...
 
void ecs_set_entity_generation (ecs_world_t *world, ecs_entity_t entity)
 Override the generation of an entity. More...
 
ecs_entity_t ecs_get_alive (const ecs_world_t *world, ecs_entity_t e)
 Get alive identifier. More...
 
void ecs_ensure (ecs_world_t *world, ecs_entity_t entity)
 Ensure id is alive. More...
 
void ecs_ensure_id (ecs_world_t *world, ecs_id_t id)
 Same as ecs_ensure, but for (component) ids. More...
 
bool ecs_exists (const ecs_world_t *world, ecs_entity_t entity)
 Test whether an entity exists. More...
 
const ecs_type_tecs_get_type (const ecs_world_t *world, ecs_entity_t entity)
 Get the type of an entity. More...
 
ecs_table_tecs_get_table (const ecs_world_t *world, ecs_entity_t entity)
 Get the table of an entity. More...
 
char * ecs_type_str (const ecs_world_t *world, const ecs_type_t *type)
 Convert type to string. More...
 
char * ecs_table_str (const ecs_world_t *world, const ecs_table_t *table)
 Convert table to string. More...
 
char * ecs_entity_str (const ecs_world_t *world, ecs_entity_t entity)
 Convert entity to string. More...
 
bool ecs_has_id (const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Test if an entity has an id. More...
 
bool ecs_owns_id (const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
 Test if an entity owns an id. More...
 
ecs_entity_t ecs_get_target (const ecs_world_t *world, ecs_entity_t entity, ecs_entity_t rel, int32_t index)
 Get the target of a relationship. More...
 
ecs_entity_t ecs_get_parent (const ecs_world_t *world, ecs_entity_t entity)
 Get parent (target of ChildOf relationship) for entity. More...
 
ecs_entity_t ecs_get_target_for_id (const ecs_world_t *world, ecs_entity_t entity, ecs_entity_t rel, ecs_id_t id)
 Get the target of a relationship for a given id. More...
 
int32_t ecs_get_depth (const ecs_world_t *world, ecs_entity_t entity, ecs_entity_t rel)
 Return depth for entity in tree for the specified relationship. More...
 
void ecs_flatten (ecs_world_t *world, ecs_id_t pair, const ecs_flatten_desc_t *desc)
 Recursively flatten relationship for target entity (experimental). More...
 
int32_t ecs_count_id (const ecs_world_t *world, ecs_id_t entity)
 Count entities that have the specified id. More...
 
const char * ecs_get_name (const ecs_world_t *world, ecs_entity_t entity)
 Get the name of an entity. More...
 
const char * ecs_get_symbol (const ecs_world_t *world, ecs_entity_t entity)
 Get the symbol of an entity. More...
 
ecs_entity_t ecs_set_name (ecs_world_t *world, ecs_entity_t entity, const char *name)
 Set the name of an entity. More...
 
ecs_entity_t ecs_set_symbol (ecs_world_t *world, ecs_entity_t entity, const char *symbol)
 Set the symbol of an entity. More...
 
void ecs_set_alias (ecs_world_t *world, ecs_entity_t entity, const char *alias)
 Set alias for entity. More...
 
ecs_entity_t ecs_lookup (const ecs_world_t *world, const char *name)
 Lookup an entity by name. More...
 
ecs_entity_t ecs_lookup_child (const ecs_world_t *world, ecs_entity_t parent, const char *name)
 Lookup a child entity by name. More...
 
ecs_entity_t ecs_lookup_path_w_sep (const ecs_world_t *world, ecs_entity_t parent, const char *path, const char *sep, const char *prefix, bool recursive)
 Lookup an entity from a path. More...
 
ecs_entity_t ecs_lookup_symbol (const ecs_world_t *world, const char *symbol, bool lookup_as_path, bool recursive)
 Lookup an entity by its symbol name. More...
 
char * ecs_get_path_w_sep (const ecs_world_t *world, ecs_entity_t parent, ecs_entity_t child, const char *sep, const char *prefix)
 Get a path identifier for an entity. More...
 
void ecs_get_path_w_sep_buf (const ecs_world_t *world, ecs_entity_t parent, ecs_entity_t child, const char *sep, const char *prefix, ecs_strbuf_t *buf)
 Write path identifier to buffer. More...
 
ecs_entity_t ecs_new_from_path_w_sep (ecs_world_t *world, ecs_entity_t parent, const char *path, const char *sep, const char *prefix)
 Find or create entity from path. More...
 
ecs_entity_t ecs_add_path_w_sep (ecs_world_t *world, ecs_entity_t entity, ecs_entity_t parent, const char *path, const char *sep, const char *prefix)
 Add specified path to entity. More...
 
ecs_entity_t ecs_set_scope (ecs_world_t *world, ecs_entity_t scope)
 Set the current scope. More...
 
ecs_entity_t ecs_get_scope (const ecs_world_t *world)
 Get the current scope. More...
 
const char * ecs_set_name_prefix (ecs_world_t *world, const char *prefix)
 Set a name prefix for newly created entities. More...
 
ecs_entity_tecs_set_lookup_path (ecs_world_t *world, const ecs_entity_t *lookup_path)
 Set search path for lookup operations. More...
 
ecs_entity_tecs_get_lookup_path (const ecs_world_t *world)
 Get current lookup path. More...
 
ecs_entity_t ecs_component_init (ecs_world_t *world, const ecs_component_desc_t *desc)
 Find or create a component. More...
 
const ecs_type_info_tecs_get_type_info (const ecs_world_t *world, ecs_id_t id)
 Get the type for an id. More...
 
void ecs_set_hooks_id (ecs_world_t *world, ecs_entity_t id, const ecs_type_hooks_t *hooks)
 Register hooks for component. More...
 
const ecs_type_hooks_tecs_get_hooks_id (ecs_world_t *world, ecs_entity_t id)
 Get hooks for component. More...
 
bool ecs_id_is_tag (const ecs_world_t *world, ecs_id_t id)
 Returns whether specified id a tag. More...
 
bool ecs_id_is_union (const ecs_world_t *world, ecs_id_t id)
 Return whether represents a union. More...
 
bool ecs_id_in_use (const ecs_world_t *world, ecs_id_t id)
 Returns whether specified id is in use. More...
 
ecs_entity_t ecs_get_typeid (const ecs_world_t *world, ecs_id_t id)
 Get the type for an id. More...
 
bool ecs_id_match (ecs_id_t id, ecs_id_t pattern)
 Utility to match an id with a pattern. More...
 
bool ecs_id_is_pair (ecs_id_t id)
 Utility to check if id is a pair. More...
 
bool ecs_id_is_wildcard (ecs_id_t id)
 Utility to check if id is a wildcard. More...
 
bool ecs_id_is_valid (const ecs_world_t *world, ecs_id_t id)
 Utility to check if id is valid. More...
 
ecs_flags32_t ecs_id_get_flags (const ecs_world_t *world, ecs_id_t id)
 Get flags associated with id. More...
 
const char * ecs_id_flag_str (ecs_id_t id_flags)
 Convert id flag to string. More...
 
char * ecs_id_str (const ecs_world_t *world, ecs_id_t id)
 Convert id to string. More...
 
void ecs_id_str_buf (const ecs_world_t *world, ecs_id_t id, ecs_strbuf_t *buf)
 Write id string to buffer. More...
 
ecs_iter_t ecs_term_iter (const ecs_world_t *world, ecs_term_t *term)
 Iterator for a single (component) id. More...
 
ecs_iter_t ecs_term_chain_iter (const ecs_iter_t *it, ecs_term_t *term)
 Return a chained term iterator. More...
 
bool ecs_term_next (ecs_iter_t *it)
 Progress a term iterator. More...
 
ecs_iter_t ecs_children (const ecs_world_t *world, ecs_entity_t parent)
 Iterator for a parent's children. More...
 
bool ecs_children_next (ecs_iter_t *it)
 Progress a children iterator. More...
 
bool ecs_term_id_is_set (const ecs_term_id_t *id)
 Test whether term id is set. More...
 
bool ecs_term_is_initialized (const ecs_term_t *term)
 Test whether a term is set. More...
 
bool ecs_term_match_this (const ecs_term_t *term)
 Is term matched on $this variable. More...
 
bool ecs_term_match_0 (const ecs_term_t *term)
 Is term matched on 0 source. More...
 
int ecs_term_finalize (const ecs_world_t *world, ecs_term_t *term)
 Finalize term. More...
 
ecs_term_t ecs_term_copy (const ecs_term_t *src)
 Copy resources of a term to another term. More...
 
ecs_term_t ecs_term_move (ecs_term_t *src)
 Move resources of a term to another term. More...
 
void ecs_term_fini (ecs_term_t *term)
 Free resources of term. More...
 
ecs_filter_tecs_filter_init (ecs_world_t *world, const ecs_filter_desc_t *desc)
 Initialize filter A filter is a lightweight object that can be used to query for entities in a world. More...
 
void ecs_filter_fini (ecs_filter_t *filter)
 Deinitialize filter. More...
 
int ecs_filter_finalize (const ecs_world_t *world, ecs_filter_t *filter)
 Finalize filter. More...
 
int32_t ecs_filter_find_this_var (const ecs_filter_t *filter)
 Find index for $this variable. More...
 
char * ecs_term_str (const ecs_world_t *world, const ecs_term_t *term)
 Convert term to string expression. More...
 
char * ecs_filter_str (const ecs_world_t *world, const ecs_filter_t *filter)
 Convert filter to string expression. More...
 
ecs_iter_t ecs_filter_iter (const ecs_world_t *world, const ecs_filter_t *filter)
 Return a filter iterator. More...
 
ecs_iter_t ecs_filter_chain_iter (const ecs_iter_t *it, const ecs_filter_t *filter)
 Return a chained filter iterator. More...
 
int32_t ecs_filter_pivot_term (const ecs_world_t *world, const ecs_filter_t *filter)
 Get pivot term for filter. More...
 
bool ecs_filter_next (ecs_iter_t *it)
 Iterate tables matched by filter. More...
 
bool ecs_filter_next_instanced (ecs_iter_t *it)
 Same as ecs_filter_next, but always instanced. More...
 
void ecs_filter_move (ecs_filter_t *dst, ecs_filter_t *src)
 Move resources of one filter to another. More...
 
void ecs_filter_copy (ecs_filter_t *dst, const ecs_filter_t *src)
 Copy resources of one filter to another. More...
 
ecs_query_tecs_query_init (ecs_world_t *world, const ecs_query_desc_t *desc)
 Create a query. More...
 
void ecs_query_fini (ecs_query_t *query)
 Destroy a query. More...
 
const ecs_filter_tecs_query_get_filter (const ecs_query_t *query)
 Get filter from a query. More...
 
ecs_iter_t ecs_query_iter (const ecs_world_t *world, ecs_query_t *query)
 Return a query iterator. More...
 
bool ecs_query_next (ecs_iter_t *iter)
 Progress the query iterator. More...
 
bool ecs_query_next_instanced (ecs_iter_t *iter)
 Same as ecs_query_next, but always instanced. More...
 
bool ecs_query_next_table (ecs_iter_t *iter)
 Fast alternative to ecs_query_next that only returns matched tables. More...
 
int ecs_query_populate (ecs_iter_t *iter, bool when_changed)
 Populate iterator fields. More...
 
bool ecs_query_changed (ecs_query_t *query, const ecs_iter_t *it)
 Returns whether the query data changed since the last iteration. More...
 
void ecs_query_skip (ecs_iter_t *it)
 Skip a table while iterating. More...
 
void ecs_query_set_group (ecs_iter_t *it, uint64_t group_id)
 Set group to iterate for query iterator. More...
 
void * ecs_query_get_group_ctx (const ecs_query_t *query, uint64_t group_id)
 Get context of query group. More...
 
const ecs_query_group_info_tecs_query_get_group_info (const ecs_query_t *query, uint64_t group_id)
 Get information about query group. More...
 
bool ecs_query_orphaned (const ecs_query_t *query)
 Returns whether query is orphaned. More...
 
char * ecs_query_str (const ecs_query_t *query)
 Convert query to string. More...
 
int32_t ecs_query_table_count (const ecs_query_t *query)
 Returns number of tables query matched with. More...
 
int32_t ecs_query_empty_table_count (const ecs_query_t *query)
 Returns number of empty tables query matched with. More...
 
int32_t ecs_query_entity_count (const ecs_query_t *query)
 Returns number of entities query matched with. More...
 
void * ecs_query_get_ctx (const ecs_query_t *query)
 Get query ctx. More...
 
void * ecs_query_get_binding_ctx (const ecs_query_t *query)
 Get query binding ctx. More...
 
void ecs_emit (ecs_world_t *world, ecs_event_desc_t *desc)
 Send event. More...
 
ecs_entity_t ecs_observer_init (ecs_world_t *world, const ecs_observer_desc_t *desc)
 Create observer. More...
 
bool ecs_observer_default_run_action (ecs_iter_t *it)
 Default run action for observer. More...
 
void * ecs_observer_get_ctx (const ecs_world_t *world, ecs_entity_t observer)
 Get observer ctx. More...
 
void * ecs_observer_get_binding_ctx (const ecs_world_t *world, ecs_entity_t observer)
 Get observer binding ctx. More...
 
void ecs_iter_poly (const ecs_world_t *world, const ecs_poly_t *poly, ecs_iter_t *iter, ecs_term_t *filter)
 Create iterator from poly object. More...
 
bool ecs_iter_next (ecs_iter_t *it)
 Progress any iterator. More...
 
void ecs_iter_fini (ecs_iter_t *it)
 Cleanup iterator resources. More...
 
int32_t ecs_iter_count (ecs_iter_t *it)
 Count number of matched entities in query. More...
 
bool ecs_iter_is_true (ecs_iter_t *it)
 Test if iterator is true. More...
 
ecs_entity_t ecs_iter_first (ecs_iter_t *it)
 Get first matching entity from iterator. More...
 
void ecs_iter_set_var (ecs_iter_t *it, int32_t var_id, ecs_entity_t entity)
 Set value for iterator variable. More...
 
void ecs_iter_set_var_as_table (ecs_iter_t *it, int32_t var_id, const ecs_table_t *table)
 Same as ecs_iter_set_var, but for a table. More...
 
void ecs_iter_set_var_as_range (ecs_iter_t *it, int32_t var_id, const ecs_table_range_t *range)
 Same as ecs_iter_set_var, but for a range of entities This constrains the variable to a range of entities in a table. More...
 
ecs_entity_t ecs_iter_get_var (ecs_iter_t *it, int32_t var_id)
 Get value of iterator variable as entity. More...
 
ecs_table_tecs_iter_get_var_as_table (ecs_iter_t *it, int32_t var_id)
 Get value of iterator variable as table. More...
 
ecs_table_range_t ecs_iter_get_var_as_range (ecs_iter_t *it, int32_t var_id)
 Get value of iterator variable as table range. More...
 
bool ecs_iter_var_is_constrained (ecs_iter_t *it, int32_t var_id)
 Returns whether variable is constrained. More...
 
char * ecs_iter_str (const ecs_iter_t *it)
 Convert iterator to string. More...
 
ecs_iter_t ecs_page_iter (const ecs_iter_t *it, int32_t offset, int32_t limit)
 Create a paged iterator. More...
 
bool ecs_page_next (ecs_iter_t *it)
 Progress a paged iterator. More...
 
ecs_iter_t ecs_worker_iter (const ecs_iter_t *it, int32_t index, int32_t count)
 Create a worker iterator. More...
 
bool ecs_worker_next (ecs_iter_t *it)
 Progress a worker iterator. More...
 
void * ecs_field_w_size (const ecs_iter_t *it, size_t size, int32_t index)
 Obtain data for a query field. More...
 
bool ecs_field_is_readonly (const ecs_iter_t *it, int32_t index)
 Test whether the field is readonly. More...
 
bool ecs_field_is_writeonly (const ecs_iter_t *it, int32_t index)
 Test whether the field is writeonly. More...
 
bool ecs_field_is_set (const ecs_iter_t *it, int32_t index)
 Test whether field is set. More...
 
ecs_id_t ecs_field_id (const ecs_iter_t *it, int32_t index)
 Return id matched for field. More...
 
int32_t ecs_field_column_index (const ecs_iter_t *it, int32_t index)
 Return index of matched table column. More...
 
ecs_entity_t ecs_field_src (const ecs_iter_t *it, int32_t index)
 Return field source. More...
 
size_t ecs_field_size (const ecs_iter_t *it, int32_t index)
 Return field type size. More...
 
bool ecs_field_is_self (const ecs_iter_t *it, int32_t index)
 Test whether the field is matched on self. More...
 
const ecs_type_tecs_table_get_type (const ecs_table_t *table)
 Get type for table. More...
 
int32_t ecs_table_get_type_index (const ecs_world_t *world, const ecs_table_t *table, ecs_id_t id)
 Get type index for id. More...
 
int32_t ecs_table_get_column_index (const ecs_world_t *world, const ecs_table_t *table, ecs_id_t id)
 Get column index for id. More...
 
int32_t ecs_table_column_count (const ecs_table_t *table)
 Return number of columns in table. More...
 
int32_t ecs_table_type_to_column_index (const ecs_table_t *table, int32_t index)
 Convert type index to column index. More...
 
int32_t ecs_table_column_to_type_index (const ecs_table_t *table, int32_t index)
 Convert column index to type index. More...
 
void * ecs_table_get_column (const ecs_table_t *table, int32_t index, int32_t offset)
 Get column from table by column index. More...
 
void * ecs_table_get_id (const ecs_world_t *world, const ecs_table_t *table, ecs_id_t id, int32_t offset)
 Get column from table by component id. More...
 
size_t ecs_table_get_column_size (const ecs_table_t *table, int32_t index)
 Get column size from table. More...
 
int32_t ecs_table_count (const ecs_table_t *table)
 Returns the number of records in the table. More...
 
bool ecs_table_has_id (const ecs_world_t *world, const ecs_table_t *table, ecs_id_t id)
 Test if table has id. More...
 
int32_t ecs_table_get_depth (const ecs_world_t *world, const ecs_table_t *table, ecs_entity_t rel)
 Return depth for table in tree for relationship rel. More...
 
ecs_table_tecs_table_add_id (ecs_world_t *world, ecs_table_t *table, ecs_id_t id)
 Get table that has all components of current table plus the specified id. More...
 
ecs_table_tecs_table_find (ecs_world_t *world, const ecs_id_t *ids, int32_t id_count)
 Find table from id array. More...
 
ecs_table_tecs_table_remove_id (ecs_world_t *world, ecs_table_t *table, ecs_id_t id)
 Get table that has all components of current table minus the specified id. More...
 
void ecs_table_lock (ecs_world_t *world, ecs_table_t *table)
 Lock or unlock table. More...
 
void ecs_table_unlock (ecs_world_t *world, ecs_table_t *table)
 Unlock a table. More...
 
bool ecs_table_has_flags (ecs_table_t *table, ecs_flags32_t flags)
 Test table for flags. More...
 
void ecs_table_swap_rows (ecs_world_t *world, ecs_table_t *table, int32_t row_1, int32_t row_2)
 Swaps two elements inside the table. More...
 
bool ecs_commit (ecs_world_t *world, ecs_entity_t entity, ecs_record_t *record, ecs_table_t *table, const ecs_type_t *added, const ecs_type_t *removed)
 Commit (move) entity to a table. More...
 
ecs_record_tecs_record_find (const ecs_world_t *world, ecs_entity_t entity)
 Find record for entity.
 
void * ecs_record_get_column (const ecs_record_t *r, int32_t column, size_t c_size)
 Get component pointer from column/record.
 
int32_t ecs_search (const ecs_world_t *world, const ecs_table_t *table, ecs_id_t id, ecs_id_t *id_out)
 Search for component id in table type. More...
 
int32_t ecs_search_offset (const ecs_world_t *world, const ecs_table_t *table, int32_t offset, ecs_id_t id, ecs_id_t *id_out)
 Search for component id in table type starting from an offset. More...
 
int32_t ecs_search_relation (const ecs_world_t *world, const ecs_table_t *table, int32_t offset, ecs_id_t id, ecs_entity_t rel, ecs_flags32_t flags, ecs_entity_t *subject_out, ecs_id_t *id_out, struct ecs_table_record_t **tr_out)
 Search for component/relationship id in table type starting from an offset. More...
 
int ecs_value_init (const ecs_world_t *world, ecs_entity_t type, void *ptr)
 Construct a value in existing storage. More...
 
int ecs_value_init_w_type_info (const ecs_world_t *world, const ecs_type_info_t *ti, void *ptr)
 Construct a value in existing storage. More...
 
void * ecs_value_new (ecs_world_t *world, ecs_entity_t type)
 Construct a value in new storage. More...
 
void * ecs_value_new_w_type_info (ecs_world_t *world, const ecs_type_info_t *ti)
 Construct a value in new storage. More...
 
int ecs_value_fini_w_type_info (const ecs_world_t *world, const ecs_type_info_t *ti, void *ptr)
 Destruct a value. More...
 
int ecs_value_fini (const ecs_world_t *world, ecs_entity_t type, void *ptr)
 Destruct a value. More...
 
int ecs_value_free (ecs_world_t *world, ecs_entity_t type, void *ptr)
 Destruct a value, free storage. More...
 
int ecs_value_copy_w_type_info (const ecs_world_t *world, const ecs_type_info_t *ti, void *dst, const void *src)
 Copy value. More...
 
int ecs_value_copy (const ecs_world_t *world, ecs_entity_t type, void *dst, const void *src)
 Copy value. More...
 
int ecs_value_move_w_type_info (const ecs_world_t *world, const ecs_type_info_t *ti, void *dst, void *src)
 Move value. More...
 
int ecs_value_move (const ecs_world_t *world, ecs_entity_t type, void *dst, void *src)
 Move value. More...
 
int ecs_value_move_ctor_w_type_info (const ecs_world_t *world, const ecs_type_info_t *ti, void *dst, void *src)
 Move construct value. More...
 
int ecs_value_move_ctor (const ecs_world_t *world, ecs_entity_t type, void *dst, void *src)
 Move construct value. More...
 

Variables

ecs_filter_t ECS_FILTER_INIT
 Use $this variable to initialize user-allocated filter object.
 
const ecs_id_t ECS_PAIR
 Indicates that the id is a pair.
 
const ecs_id_t ECS_OVERRIDE
 Automatically override component when it is inherited.
 
const ecs_id_t ECS_TOGGLE
 Adds bitset to storage which allows component to be enabled/disabled.
 
const ecs_id_t ECS_AND
 Include all components from entity to which AND is applied.
 
const ecs_entity_t FLECS_IDEcsComponentID_
 
const ecs_entity_t FLECS_IDEcsIdentifierID_
 
const ecs_entity_t FLECS_IDEcsIterableID_
 
const ecs_entity_t FLECS_IDEcsPolyID_
 
const ecs_entity_t EcsQuery
 
const ecs_entity_t EcsObserver
 
const ecs_entity_t EcsSystem
 
const ecs_entity_t FLECS_IDEcsTickSourceID_
 
const ecs_entity_t FLECS_IDEcsPipelineQueryID_
 
const ecs_entity_t FLECS_IDEcsTimerID_
 
const ecs_entity_t FLECS_IDEcsRateFilterID_
 
const ecs_entity_t EcsFlecs
 Root scope for builtin flecs entities.
 
const ecs_entity_t EcsFlecsCore
 Core module scope.
 
const ecs_entity_t EcsWorld
 Entity associated with world (used for "attaching" components to world)
 
const ecs_entity_t EcsWildcard
 Wildcard entity ("*"). More...
 
const ecs_entity_t EcsAny
 Any entity ("_"). More...
 
const ecs_entity_t EcsThis
 This entity. More...
 
const ecs_entity_t EcsVariable
 Variable entity ("$"). More...
 
const ecs_entity_t EcsTransitive
 Marks a relationship as transitive. More...
 
const ecs_entity_t EcsReflexive
 Marks a relatoinship as reflexive. More...
 
const ecs_entity_t EcsFinal
 Ensures that entity/component cannot be used as target in IsA relationship. More...
 
const ecs_entity_t EcsDontInherit
 Ensures that component is never inherited from an IsA target. More...
 
const ecs_entity_t EcsAlwaysOverride
 Ensures a component is always overridden. More...
 
const ecs_entity_t EcsSymmetric
 Marks relationship as commutative. More...
 
const ecs_entity_t EcsExclusive
 Can be added to relationship to indicate that the relationship can only occur once on an entity. More...
 
const ecs_entity_t EcsAcyclic
 Marks a relationship as acyclic. More...
 
const ecs_entity_t EcsTraversable
 Marks a relationship as traversable. More...
 
const ecs_entity_t EcsWith
 Ensure that a component always is added together with another component. More...
 
const ecs_entity_t EcsOneOf
 Ensure that relationship target is child of specified entity. More...
 
const ecs_entity_t EcsTag
 Can be added to relationship to indicate that it should never hold data, even when it or the relationship target is a component.
 
const ecs_entity_t EcsUnion
 Tag to indicate that relationship is stored as union. More...
 
const ecs_entity_t EcsName
 Tag to indicate name identifier.
 
const ecs_entity_t EcsSymbol
 Tag to indicate symbol identifier.
 
const ecs_entity_t EcsAlias
 Tag to indicate alias identifier.
 
const ecs_entity_t EcsChildOf
 Used to express parent-child relationships.
 
const ecs_entity_t EcsIsA
 Used to express inheritance relationships.
 
const ecs_entity_t EcsDependsOn
 Used to express dependency relationships.
 
const ecs_entity_t EcsSlotOf
 Used to express a slot (used with prefab inheritance)
 
const ecs_entity_t EcsModule
 Tag added to module entities.
 
const ecs_entity_t EcsPrivate
 Tag to indicate an entity/component/system is private to a module.
 
const ecs_entity_t EcsPrefab
 Tag added to prefab entities. More...
 
const ecs_entity_t EcsDisabled
 When this tag is added to an entity it is skipped by queries, unless EcsDisabled is explicitly queried for.
 
const ecs_entity_t EcsOnAdd
 Event that triggers when an id is added to an entity.
 
const ecs_entity_t EcsOnRemove
 Event that triggers when an id is removed from an entity.
 
const ecs_entity_t EcsOnSet
 Event that triggers when a component is set for an entity.
 
const ecs_entity_t EcsUnSet
 Event that triggers when a component is unset for an entity.
 
const ecs_entity_t EcsMonitor
 Event that triggers observer when an entity starts/stops matching a query.
 
const ecs_entity_t EcsOnTableCreate
 Event that triggers when a table is created.
 
const ecs_entity_t EcsOnTableDelete
 Event that triggers when a table is deleted.
 
const ecs_entity_t EcsOnTableEmpty
 Event that triggers when a table becomes empty (doesn't emit on creation).
 
const ecs_entity_t EcsOnTableFill
 Event that triggers when a table becomes non-empty.
 
const ecs_entity_t EcsOnDelete
 Relationship used for specifying cleanup behavior.
 
const ecs_entity_t EcsOnDeleteTarget
 Relationship used to define what should happen when a target entity (second element of a pair) is deleted.
 
const ecs_entity_t EcsRemove
 Remove cleanup policy. More...
 
const ecs_entity_t EcsDelete
 Delete cleanup policy. More...
 
const ecs_entity_t EcsPanic
 Panic cleanup policy. More...
 
const ecs_entity_t FLECS_IDEcsTargetID_
 Component that stores data for flattened relationships.
 
const ecs_entity_t EcsFlatten
 Tag added to root entity to indicate its subtree should be flattened. More...
 
const ecs_entity_t EcsDefaultChildComponent
 Used like (EcsDefaultChildComponent, Component). More...
 
const ecs_entity_t EcsPredEq
 
const ecs_entity_t EcsPredMatch
 
const ecs_entity_t EcsPredLookup
 
const ecs_entity_t EcsScopeOpen
 
const ecs_entity_t EcsScopeClose
 
const ecs_entity_t EcsEmpty
 Tag used to indicate query is empty.
 
const ecs_entity_t FLECS_IDEcsPipelineID_
 
const ecs_entity_t EcsOnStart
 
const ecs_entity_t EcsPreFrame
 
const ecs_entity_t EcsOnLoad
 
const ecs_entity_t EcsPostLoad
 
const ecs_entity_t EcsPreUpdate
 
const ecs_entity_t EcsOnUpdate
 
const ecs_entity_t EcsOnValidate
 
const ecs_entity_t EcsPostUpdate
 
const ecs_entity_t EcsPreStore
 
const ecs_entity_t EcsOnStore
 
const ecs_entity_t EcsPostFrame
 
const ecs_entity_t EcsPhase
 

Detailed Description

Flecs public API.

This file contains the public API for Flecs.

Definition in file flecs.h.