Flecs v3.1
A fast entity component system (ECS) for C & C++
No Matches
Query descriptor types.

Types used to describe queries. 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


#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 EcsFilter   (1u << 9)
 Prevent observer from triggering on term. More...
#define EcsTraverseFlags   (EcsUp|EcsDown|EcsTraverseAll|EcsSelf|EcsCascade|EcsParent)


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.


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


ecs_filter_t ECS_FILTER_INIT
 Use this variable to initialize user-allocated filter object.

Detailed Description

Types used to describe queries.

Macro Definition Documentation

◆ EcsCascade

#define EcsCascade   (1u << 5)

Sort results breadth first.

Definition at line 498 of file flecs.h.

◆ EcsDown

#define EcsDown   (1u << 3)

Match by traversing downwards (derived, cannot be set)

Definition at line 496 of file flecs.h.

◆ EcsFilter

#define EcsFilter   (1u << 9)

Prevent observer from triggering on term.

Definition at line 502 of file flecs.h.

◆ EcsIsEntity

#define EcsIsEntity   (1u << 8)

Term id is an entity.

Definition at line 501 of file flecs.h.

◆ EcsIsVariable

#define EcsIsVariable   (1u << 7)

Term id is a variable.

Definition at line 500 of file flecs.h.

◆ EcsParent

#define EcsParent   (1u << 6)

Short for up(ChildOf)

Definition at line 499 of file flecs.h.

◆ EcsSelf

#define EcsSelf   (1u << 1)

Match on self.

Definition at line 494 of file flecs.h.

◆ EcsTraverseAll

#define EcsTraverseAll   (1u << 4)

Match all entities encountered through traversal.

Definition at line 497 of file flecs.h.

◆ EcsTraverseFlags

#define EcsTraverseFlags   (EcsUp|EcsDown|EcsTraverseAll|EcsSelf|EcsCascade|EcsParent)

Definition at line 504 of file flecs.h.

◆ EcsUp

#define EcsUp   (1u << 2)

Match by traversing upwards.

Definition at line 495 of file flecs.h.

Enumeration Type Documentation

◆ ecs_inout_kind_t

Specify read/write access for term.


InOut for regular terms, In for shared terms.


Term is neither read nor written.


Term is both read and written.


Term is only read.


Term is only written.

Definition at line 475 of file flecs.h.

◆ ecs_oper_kind_t

Specify operator for term.


The term must match.


One of the terms in an or chain must match.


The term must not match.


The term may match.


Term must match all components from term id.


Term must match at least one component from term id.


Term must match none of the components from term id.

Definition at line 484 of file flecs.h.