![]() |
Flecs v4.1
A fast entity component system (ECS) for C & C++
|
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. | |
| Base & | src () |
| Call prior to setting values for the src identifier. | |
| Base & | first () |
| Call prior to setting values for the first identifier. | |
| Base & | second () |
| Call prior to setting values for the second identifier. | |
| Base & | src (flecs::entity_t id) |
| Select the src identifier, initialize it with an entity ID. | |
| template<typename T > | |
| Base & | src () |
| Select the src identifier, initialize it with the ID associated with the type. | |
| Base & | src (const char *name) |
| Select the src identifier, initialize it with a name. | |
| Base & | first (flecs::entity_t id) |
| Select the first identifier, initialize it with an entity ID. | |
| template<typename T > | |
| Base & | first () |
| Select the first identifier, initialize it with the ID associated with the type. | |
| Base & | first (const char *name) |
| Select the first identifier, initialize it with a name. | |
| Base & | second (flecs::entity_t id) |
| Select the second identifier, initialize it with an entity ID. | |
| template<typename T > | |
| Base & | second () |
| Select the second identifier, initialize it with the ID associated with the type. | |
| Base & | second (const char *name) |
| Select the second identifier, initialize it with a name. | |
| 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 363 of file builder_i.hpp.
|
inline |
Short for oper(flecs::AndFrom).
Definition at line 383 of file builder_i.hpp.
|
inline |
Cascade using the specified relationship type.
Definition at line 259 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 247 of file builder_i.hpp.
|
inline |
Use with cascade() to iterate results in descending (bottom-to-top) order.
Definition at line 264 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 399 of file builder_i.hpp.
|
inline |
Call prior to setting values for the first identifier.
This is either the component identifier, or the first element of a pair (in case the second is populated as well).
Definition at line 127 of file builder_i.hpp.
|
inline |
Select the first identifier, initialize it with the ID associated with the type.
Definition at line 177 of file builder_i.hpp.
|
inline |
Select the first identifier, initialize it with a name.
If the name starts with a $, the name is interpreted as a variable.
Definition at line 184 of file builder_i.hpp.
|
inline |
Select the first identifier, initialize it with an entity ID.
Definition at line 169 of file builder_i.hpp.
|
inline |
Set ID flags for the term.
Definition at line 284 of file builder_i.hpp.
|
inline |
Short for inout(flecs::In).
Definition at line 336 of file builder_i.hpp.
|
inline |
Short for inout(flecs::InOut).
Definition at line 346 of file builder_i.hpp.
|
inline |
Set read/write access of the term.
Definition at line 291 of file builder_i.hpp.
|
inline |
Short for inout(flecs::InOutNone).
Definition at line 351 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 305 of file builder_i.hpp.
|
inline |
Short for oper(flecs::Not).
Definition at line 373 of file builder_i.hpp.
|
inline |
Short for oper(flecs::NotFrom).
Definition at line 393 of file builder_i.hpp.
|
inline |
Set the operator of the term.
Definition at line 356 of file builder_i.hpp.
|
inline |
Short for oper(flecs::Optional).
Definition at line 378 of file builder_i.hpp.
|
inline |
Short for oper(flecs::Or).
Definition at line 368 of file builder_i.hpp.
|
inline |
Short for oper(flecs::OrFrom).
Definition at line 388 of file builder_i.hpp.
|
inline |
Short for inout(flecs::Out).
Definition at line 341 of file builder_i.hpp.
|
inline |
|
inline |
Short for inout_stage(flecs::In).
Use when the system uses get().
Definition at line 324 of file builder_i.hpp.
|
inline |
Short for inout_stage(flecs::InOut).
Use when the system uses ensure().
Definition at line 331 of file builder_i.hpp.
|
inline |
Call prior to setting values for the second identifier.
This is the second element of a pair. Requires that first() is populated as well.
Definition at line 135 of file builder_i.hpp.
|
inline |
Select the second identifier, initialize it with the ID associated with the type.
Definition at line 204 of file builder_i.hpp.
|
inline |
Select the second identifier, initialize it with a name.
If the name starts with a $, the name is interpreted as a variable.
Definition at line 211 of file builder_i.hpp.
|
inline |
Select the second identifier, initialize it with an entity ID.
Definition at line 196 of file builder_i.hpp.
|
inlineprotected |
Set the current term pointer.
Definition at line 411 of file builder_i.hpp.
|
inline |
Call prior to setting values for the src identifier.
Definition at line 118 of file builder_i.hpp.
Select the src identifier, initialize it with the ID associated with the type.
Definition at line 150 of file builder_i.hpp.
|
inline |
Select the src identifier, initialize it with a name.
If the name starts with a $, the name is interpreted as a variable.
Definition at line 157 of file builder_i.hpp.
|
inline |
Select the src identifier, initialize it with an entity ID.
Definition at line 142 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 276 of file builder_i.hpp.
|
inline |
Traverse upwards using the specified relationship type.
Definition at line 241 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 225 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 317 of file builder_i.hpp.
| ecs_term_t* flecs::term_builder_i< Base >::term_ |
Pointer to the current term.
Definition at line 405 of file builder_i.hpp.