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

Types used to describe queries. More...

Collaboration diagram for Query descriptor types.:


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 allow for ad-hoc quick filtering of entity tables. More...
struct  ecs_observer_t


#define EcsSelf   (1u << 1)
 Match on self.
#define EcsUp   (1u << 2)
 Match by traversing upwards.
#define EcsDown   (1u << 3)
 Match by traversing downwards (derived, cannot be set)
#define EcsTraverseAll   (1u << 4)
 Match all entities encountered through traversal.
#define EcsCascade   (1u << 5)
 Sort results breadth first.
#define EcsDesc   (1u << 6)
 Iterate groups in descending order

#define EcsParent   (1u << 7)
 Short for up(ChildOf)
#define EcsIsVariable   (1u << 8)
 Term id is a variable.
#define EcsIsEntity   (1u << 9)
 Term id is an entity.
#define EcsIsName   (1u << 10)
 Term id is a name (don't attempt to lookup as entity)
#define EcsFilter   (1u << 11)
 Prevent observer from triggering on term.
#define EcsTraverseFlags   (EcsUp|EcsDown|EcsTraverseAll|EcsSelf|EcsCascade|EcsDesc|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 EcsTermIsTrivial   (1u << 7)
#define EcsTermNoData   (1u << 8)
#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 711 of file flecs.h.

◆ EcsDesc

#define EcsDesc   (1u << 6)

Iterate groups in descending order

Definition at line 712 of file flecs.h.

◆ EcsDown

#define EcsDown   (1u << 3)

Match by traversing downwards (derived, cannot be set)

Definition at line 709 of file flecs.h.

◆ EcsFilter

#define EcsFilter   (1u << 11)

Prevent observer from triggering on term.

Definition at line 717 of file flecs.h.

◆ EcsIsEntity

#define EcsIsEntity   (1u << 9)

Term id is an entity.

Definition at line 715 of file flecs.h.

◆ EcsIsName

#define EcsIsName   (1u << 10)

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

Definition at line 716 of file flecs.h.

◆ EcsIsVariable

#define EcsIsVariable   (1u << 8)

Term id is a variable.

Definition at line 714 of file flecs.h.

◆ EcsParent

#define EcsParent   (1u << 7)

Short for up(ChildOf)

Definition at line 713 of file flecs.h.

◆ EcsSelf

#define EcsSelf   (1u << 1)

Match on self.

Definition at line 707 of file flecs.h.

◆ EcsTermIdInherited

#define EcsTermIdInherited   (1u << 6)

Definition at line 728 of file flecs.h.

◆ EcsTermIsTrivial

#define EcsTermIsTrivial   (1u << 7)

Definition at line 729 of file flecs.h.

◆ EcsTermMatchAny

#define EcsTermMatchAny   (1u << 0)

Definition at line 722 of file flecs.h.

◆ EcsTermMatchAnySrc

#define EcsTermMatchAnySrc   (1u << 1)

Definition at line 723 of file flecs.h.

◆ EcsTermMatchDisabled

#define EcsTermMatchDisabled   (1u << 7)

Definition at line 733 of file flecs.h.

◆ EcsTermMatchPrefab

#define EcsTermMatchPrefab   (1u << 8)

Definition at line 734 of file flecs.h.

◆ EcsTermNoData

#define EcsTermNoData   (1u << 8)

Definition at line 730 of file flecs.h.

◆ EcsTermReflexive

#define EcsTermReflexive   (1u << 5)

Definition at line 727 of file flecs.h.

◆ EcsTermSrcFirstEq

#define EcsTermSrcFirstEq   (1u << 2)

Definition at line 724 of file flecs.h.

◆ EcsTermSrcSecondEq

#define EcsTermSrcSecondEq   (1u << 3)

Definition at line 725 of file flecs.h.

◆ EcsTermTransitive

#define EcsTermTransitive   (1u << 4)

Definition at line 726 of file flecs.h.

◆ EcsTraverseAll

#define EcsTraverseAll   (1u << 4)

Match all entities encountered through traversal.

Definition at line 710 of file flecs.h.

◆ EcsTraverseFlags

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

Definition at line 718 of file flecs.h.

◆ EcsUp

#define EcsUp   (1u << 2)

Match by traversing upwards.

Definition at line 708 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 687 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 696 of file flecs.h.