Flecs v3.1
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
Core API Types

Types for core API objects. More...

Classes

struct  ecs_type_t
 An array with (component) ids. More...
 
struct  ecs_header_t
 Header for ecs_poly_t objects. More...
 

Typedefs

typedef uint64_t ecs_id_t
 An id. 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 is where entities and components are stored. More...
 
typedef struct ecs_term_t ecs_term_t
 A term is a single element in a query. More...
 
typedef struct ecs_query_t ecs_query_t
 A query allows for cached iteration over ECS data. More...
 
typedef struct ecs_filter_t ecs_filter_t
 A filter allows for uncached, ad hoc iteration over ECS data. More...
 
typedef struct ecs_rule_t ecs_rule_t
 A rule implements a non-trivial filter. More...
 
typedef struct ecs_observer_t ecs_observer_t
 An observer reacts to events matching multiple filter terms. More...
 
typedef struct ecs_observable_t ecs_observable_t
 An observable contains lists of triggers for specific events/components. More...
 
typedef struct ecs_iter_t ecs_iter_t
 
typedef struct ecs_ref_t ecs_ref_t
 Refs cache data that lets them access components faster than ecs_get. More...
 
typedef struct ecs_type_hooks_t ecs_type_hooks_t
 Type hooks (callbacks) More...
 
typedef struct ecs_type_info_t ecs_type_info_t
 Type information. More...
 
typedef struct ecs_id_record_t ecs_id_record_t
 
typedef struct ecs_table_record_t ecs_table_record_t
 
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.
 

Detailed Description

Types for core API objects.

Typedef Documentation

◆ ecs_entity_t

An entity identifier.

Definition at line 220 of file flecs.h.

◆ ecs_filter_t

typedef struct ecs_filter_t ecs_filter_t

A filter allows for uncached, ad hoc iteration over ECS data.

Definition at line 241 of file flecs.h.

◆ ecs_id_record_t

typedef struct ecs_id_record_t ecs_id_record_t

Definition at line 265 of file flecs.h.

◆ ecs_id_t

typedef uint64_t ecs_id_t

An id.

Ids are the things that can be added to an entity. An id can be an entity or pair, and can have optional id flags.

Definition at line 217 of file flecs.h.

◆ ecs_iter_t

typedef struct ecs_iter_t ecs_iter_t

Definition at line 253 of file flecs.h.

◆ ecs_mixins_t

typedef struct ecs_mixins_t ecs_mixins_t

Type that stores poly mixins.

Definition at line 295 of file flecs.h.

◆ ecs_observable_t

An observable contains lists of triggers for specific events/components.

Definition at line 250 of file flecs.h.

◆ ecs_observer_t

An observer reacts to events matching multiple filter terms.

Definition at line 247 of file flecs.h.

◆ ecs_poly_t

typedef void ecs_poly_t

A poly object.

A poly (short for polymorph) object is an object that has a variable list of capabilities, determined by a mixin table. This is the current list of types in the flecs API that can be used as an ecs_poly_t:

  • ecs_world_t
  • ecs_stage_t
  • ecs_query_t
  • ecs_filter_t
  • ecs_rule_t
  • (more to come)

Functions that accept an ecs_poly_t argument can accept objects of these types. If the object does not have the requested mixin the API will throw an assert.

The poly/mixin framework enables partially overlapping features to be implemented once, and enables objects of different types to interact with each other depending on what mixins they have, rather than their type (in some ways it's like a mini-ECS). Additionally, each poly object has a header that enables the API to do sanity checking on the input arguments.

Definition at line 292 of file flecs.h.

◆ ecs_query_t

typedef struct ecs_query_t ecs_query_t

A query allows for cached iteration over ECS data.

Definition at line 238 of file flecs.h.

◆ ecs_ref_t

typedef struct ecs_ref_t ecs_ref_t

Refs cache data that lets them access components faster than ecs_get.

Definition at line 256 of file flecs.h.

◆ ecs_rule_t

typedef struct ecs_rule_t ecs_rule_t

A rule implements a non-trivial filter.

Definition at line 244 of file flecs.h.

◆ ecs_table_record_t

typedef struct ecs_table_record_t ecs_table_record_t

Definition at line 268 of file flecs.h.

◆ ecs_table_t

typedef struct ecs_table_t ecs_table_t

A table is where entities and components are stored.

Definition at line 232 of file flecs.h.

◆ ecs_term_t

typedef struct ecs_term_t ecs_term_t

A term is a single element in a query.

Definition at line 235 of file flecs.h.

◆ ecs_type_hooks_t

Type hooks (callbacks)

Definition at line 259 of file flecs.h.

◆ ecs_type_info_t

Type information.

Definition at line 262 of file flecs.h.

◆ ecs_world_t

typedef struct ecs_world_t ecs_world_t

A world is the container for all ECS data and supporting features.

Definition at line 229 of file flecs.h.