22 term(flecs::world_t *world_ptr)
25 , world_(world_ptr) { }
32 this->set_term(&value);
35 term(flecs::world_t *world_ptr, id_t
id)
39 if (
id & ECS_ID_FLAGS_MASK) {
44 this->set_term(&value);
47 term(flecs::world_t *world_ptr, entity_t r, entity_t o)
51 value.
id = ecs_pair(r, o);
52 this->set_term(&value);
59 if (
id & ECS_ID_FLAGS_MASK) {
70 value.
id = ecs_pair(r, o);
75 this->set_term(
nullptr);
86 flecs::inout_kind_t inout() {
87 return static_cast<flecs::inout_kind_t
>(value.
inout);
90 flecs::oper_kind_t oper() {
91 return static_cast<flecs::oper_kind_t
>(value.
oper);
113 flecs::world_t* world_v()
override {
return world_; }
116 flecs::world_t *world_;
120template <
typename... Args>
127 return flecs::term(world_, _::type<T>::id(world_));
130template <
typename First,
typename Second>
133 _::type<First>::id(world_),
134 _::type<Second>::id(world_)));
flecs::term term() const
Create a term for a (component) type.
bool ecs_term_is_initialized(const ecs_term_t *term)
Test whether a term is set.
ecs_entity_t id
Entity id.
Type that describes a term (single element in a query).
ecs_term_ref_t src
Source of term.
ecs_id_t id
Component id to be matched by term.
int16_t oper
Operator of term.
ecs_term_ref_t second
Second element of pair.
int16_t inout
Access to contents matched by term.
ecs_term_ref_t first
Component or first element of pair.
Class that wraps around a flecs::id_t.
Class that describes a term.