Term builder interface. More...
#include <builder_i.hpp>
Public Member Functions | |
| term_builder_i () | |
| Default constructor. | |
| term_builder_i (ecs_term_t *term_ptr) | |
| Construct from a term pointer. | |
| Base & | term (id_t id) |
| Set the term ID. | |
| template<typename T = void, typename... Args> | |
| Base & | src (Args... args) |
| template<typename T = void, typename... Args> | |
| Base & | first (Args... args) |
| template<typename T = void, typename... Args> | |
| Base & | second (Args... args) |
| Base & | up (flecs::entity_t trav=0) |
| The up flag indicates that the term identifier may be substituted by traversing a relationship upwards. | |
| template<typename Trav> | |
| Base & | up () |
| Traverse upwards using the specified relationship type. | |
| Base & | cascade (flecs::entity_t trav=0) |
| The cascade flag is like up(), but returns results in breadth-first order. | |
| template<typename Trav> | |
| Base & | cascade () |
| Cascade using the specified relationship type. | |
| Base & | desc () |
| Use with cascade() to iterate results in descending (bottom-to-top) order. | |
| Base & | parent () |
| Same as up(). | |
| Base & | trav (flecs::entity_t trav, flecs::flags32_t flags=0) |
| Specify the relationship to traverse, and flags to indicate direction. | |
| Base & | id_flags (id_t flags) |
| Set ID flags for the term. | |
| Base & | inout (flecs::inout_kind_t inout) |
| Set read/write access of the term. | |
| Base & | inout_stage (flecs::inout_kind_t inout) |
| Set read/write access for a stage. | |
| Base & | write () |
| Short for inout_stage(flecs::Out). | |
| Base & | read () |
| Short for inout_stage(flecs::In). | |
| Base & | read_write () |
| Short for inout_stage(flecs::InOut). | |
| Base & | in () |
| Short for inout(flecs::In). | |
| Base & | out () |
| Short for inout(flecs::Out). | |
| Base & | inout () |
| Short for inout(flecs::InOut). | |
| Base & | inout_none () |
| Short for inout(flecs::InOutNone). | |
| Base & | oper (flecs::oper_kind_t oper) |
| Set the operator of the term. | |
| Base & | and_ () |
| Short for oper(flecs::And). | |
| Base & | or_ () |
| Short for oper(flecs::Or). | |
| Base & | not_ () |
| Short for oper(flecs::Not). | |
| Base & | optional () |
| Short for oper(flecs::Optional). | |
| Base & | and_from () |
| Short for oper(flecs::AndFrom). | |
| Base & | or_from () |
| Short for oper(flecs::OrFrom). | |
| Base & | not_from () |
| Short for oper(flecs::NotFrom). | |
| Base & | filter () |
| Mark the term as a filter. | |
| Public Member Functions inherited from flecs::term_ref_builder_i< Base > | |
| term_ref_builder_i () | |
| Default constructor. | |
| virtual | ~term_ref_builder_i () |
| Destructor. | |
| Base & | self () |
| The self flag indicates that the term identifier itself is used. | |
| Base & | id (flecs::entity_t id) |
| Specify the value of the identifier by ID. | |
| Base & | entity (flecs::entity_t entity) |
| Specify the value of the identifier by ID. | |
| Base & | name (const char *name) |
| Specify the value of the identifier by name. | |
| Base & | var (const char *var_name) |
| Specify that the identifier is a variable (resolved at query evaluation time). | |
| Base & | flags (flecs::flags64_t flags) |
| Override the term ID flags. | |
Public Attributes | |
| ecs_term_t * | term_ |
| Pointer to the current term. | |
| Public Attributes inherited from flecs::term_ref_builder_i< Base > | |
| ecs_term_ref_t * | term_ref_ |
| Pointer to the current term reference. | |
Protected Member Functions | |
| virtual flecs::world_t * | world_v () override=0 |
| void | set_term (ecs_term_t *term) |
| Set the current term pointer. | |
| Protected Member Functions inherited from flecs::term_ref_builder_i< Base > | |
| void | assert_term_ref () |
Term builder interface.
A term is a single element of a query expression.
Definition at line 103 of file builder_i.hpp.
|
inline |
Default constructor.
Definition at line 105 of file builder_i.hpp.
|
inline |
Construct from a term pointer.
Definition at line 108 of file builder_i.hpp.
|
inline |
Short for oper(flecs::And).
Definition at line 273 of file builder_i.hpp.
|
inline |
Short for oper(flecs::AndFrom).
Definition at line 293 of file builder_i.hpp.
|
inline |
Cascade using the specified relationship type.
Definition at line 169 of file builder_i.hpp.
|
inline |
The cascade flag is like up(), but returns results in breadth-first order.
Only supported for flecs::query.
Definition at line 157 of file builder_i.hpp.
|
inline |
Use with cascade() to iterate results in descending (bottom-to-top) order.
Definition at line 174 of file builder_i.hpp.
|
inline |
Mark the term as a filter.
Query terms marked as a filter are not triggered by observers.
Definition at line 309 of file builder_i.hpp.
|
inline |
Definition at line 123 of file builder_i.hpp.
|
inline |
Set ID flags for the term.
Definition at line 194 of file builder_i.hpp.
|
inline |
Short for inout(flecs::In).
Definition at line 246 of file builder_i.hpp.
|
inline |
Short for inout(flecs::InOut).
Definition at line 256 of file builder_i.hpp.
|
inline |
Set read/write access of the term.
Definition at line 201 of file builder_i.hpp.
|
inline |
Short for inout(flecs::InOutNone).
Definition at line 261 of file builder_i.hpp.
|
inline |
Set read/write access for a stage.
Use this when a system reads or writes components other than the ones provided by the query. This information can be used by schedulers to insert sync/merge points between systems where deferred operations are flushed.
Setting this is optional. If not set, the value of the accessed component may be out of sync for at most one frame.
Definition at line 215 of file builder_i.hpp.
|
inline |
Short for oper(flecs::Not).
Definition at line 283 of file builder_i.hpp.
|
inline |
Short for oper(flecs::NotFrom).
Definition at line 303 of file builder_i.hpp.
|
inline |
Set the operator of the term.
Definition at line 266 of file builder_i.hpp.
|
inline |
Short for oper(flecs::Optional).
Definition at line 288 of file builder_i.hpp.
|
inline |
Short for oper(flecs::Or).
Definition at line 278 of file builder_i.hpp.
|
inline |
Short for oper(flecs::OrFrom).
Definition at line 298 of file builder_i.hpp.
|
inline |
Short for inout(flecs::Out).
Definition at line 251 of file builder_i.hpp.
|
inline |
|
inline |
Short for inout_stage(flecs::In).
Use when the system uses get().
Definition at line 234 of file builder_i.hpp.
|
inline |
Short for inout_stage(flecs::InOut).
Use when the system uses ensure().
Definition at line 241 of file builder_i.hpp.
|
inline |
Definition at line 128 of file builder_i.hpp.
|
inlineprotected |
Set the current term pointer.
Definition at line 321 of file builder_i.hpp.
|
inline |
Definition at line 118 of file builder_i.hpp.
|
inline |
Set the term ID.
Definition at line 113 of file builder_i.hpp.
|
inline |
Specify the relationship to traverse, and flags to indicate direction.
Definition at line 186 of file builder_i.hpp.
Traverse upwards using the specified relationship type.
Definition at line 151 of file builder_i.hpp.
|
inline |
The up flag indicates that the term identifier may be substituted by traversing a relationship upwards.
For example, substitute the identifier with its parent by traversing the ChildOf relationship.
Definition at line 135 of file builder_i.hpp.
|
overrideprotectedpure virtual |
Implements flecs::term_ref_builder_i< Base >.
|
inline |
Short for inout_stage(flecs::Out).
Use when the system uses add(), remove(), or set().
Definition at line 227 of file builder_i.hpp.
| ecs_term_t* flecs::term_builder_i< Base >::term_ |
Pointer to the current term.
Definition at line 315 of file builder_i.hpp.