Flecs v3.2
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 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)


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 673 of file flecs.h.

◆ EcsDown

#define EcsDown   (1u << 3)

Match by traversing downwards (derived, cannot be set)

Definition at line 671 of file flecs.h.

◆ EcsFilter

#define EcsFilter   (1u << 10)

Prevent observer from triggering on term.

Definition at line 678 of file flecs.h.

◆ EcsIsEntity

#define EcsIsEntity   (1u << 8)

Term id is an entity.

Definition at line 676 of file flecs.h.

◆ EcsIsName

#define EcsIsName   (1u << 9)

Term id is a name (don't attempt to lookup as entity)

Definition at line 677 of file flecs.h.

◆ EcsIsVariable

#define EcsIsVariable   (1u << 7)

Term id is a variable.

Definition at line 675 of file flecs.h.

◆ EcsParent

#define EcsParent   (1u << 6)

Short for up(ChildOf)

Definition at line 674 of file flecs.h.

◆ EcsSelf

#define EcsSelf   (1u << 1)

Match on self.

Definition at line 669 of file flecs.h.

◆ EcsTermIdInherited

#define EcsTermIdInherited   (1u << 6)

Definition at line 689 of file flecs.h.

◆ EcsTermMatchAny

#define EcsTermMatchAny   (1u << 0)

Definition at line 683 of file flecs.h.

◆ EcsTermMatchAnySrc

#define EcsTermMatchAnySrc   (1u << 1)

Definition at line 684 of file flecs.h.

◆ EcsTermMatchDisabled

#define EcsTermMatchDisabled   (1u << 7)

Definition at line 692 of file flecs.h.

◆ EcsTermMatchPrefab

#define EcsTermMatchPrefab   (1u << 8)

Definition at line 693 of file flecs.h.

◆ EcsTermReflexive

#define EcsTermReflexive   (1u << 5)

Definition at line 688 of file flecs.h.

◆ EcsTermSrcFirstEq

#define EcsTermSrcFirstEq   (1u << 2)

Definition at line 685 of file flecs.h.

◆ EcsTermSrcSecondEq

#define EcsTermSrcSecondEq   (1u << 3)

Definition at line 686 of file flecs.h.

◆ EcsTermTransitive

#define EcsTermTransitive   (1u << 4)

Definition at line 687 of file flecs.h.

◆ EcsTraverseAll

#define EcsTraverseAll   (1u << 4)

Match all entities encountered through traversal.

Definition at line 672 of file flecs.h.

◆ EcsTraverseFlags

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

Definition at line 679 of file flecs.h.

◆ EcsUp

#define EcsUp   (1u << 2)

Match by traversing upwards.

Definition at line 670 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 649 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 658 of file flecs.h.