Skip to content
Flecs v4.1

Class that describes a term. More...

#include <impl.hpp>

Public Member Functions

 term (flecs::world_t *world_ptr, ecs_term_t t={})
 term (flecs::world_t *world_ptr, id_t component_id)
 term (flecs::world_t *world_ptr, entity_t first, entity_t second)
 term (id_t component_id)
 term (id_t first, id_t second)
void reset ()
 Reset the term to its default state.
bool is_set ()
 Check if the term is initialized.
flecs::id id ()
 Get the term ID.
flecs::inout_kind_t inout ()
 Get the inout kind of the term.
flecs::oper_kind_t oper ()
 Get the operator kind of the term.
flecs::entity get_src ()
 Get the source entity of the term.
flecs::entity get_first ()
 Get the first element of the term.
flecs::entity get_second ()
 Get the second element of the term.
 operator flecs::term_t () const
 Convert to the underlying term_t.
Public Member Functions inherited from flecs::term_builder_i< term >
 term_builder_i ()
 Default constructor.
term & term (id_t id)
 Set the term ID.
termsrc (Args... args)
termfirst (Args... args)
termsecond (Args... args)
termup (flecs::entity_t trav=0)
 The up flag indicates that the term identifier may be substituted by traversing a relationship upwards.
termcascade (flecs::entity_t trav=0)
 The cascade flag is like up(), but returns results in breadth-first order.
termdesc ()
 Use with cascade() to iterate results in descending (bottom-to-top) order.
termparent ()
 Same as up().
termtrav (flecs::entity_t trav, flecs::flags32_t flags=0)
 Specify the relationship to traverse, and flags to indicate direction.
termid_flags (id_t flags)
 Set ID flags for the term.
terminout (flecs::inout_kind_t inout)
 Set read/write access of the term.
terminout_stage (flecs::inout_kind_t inout)
 Set read/write access for a stage.
termwrite ()
 Short for inout_stage(flecs::Out).
termread ()
 Short for inout_stage(flecs::In).
termread_write ()
 Short for inout_stage(flecs::InOut).
termin ()
 Short for inout(flecs::In).
termout ()
 Short for inout(flecs::Out).
terminout_none ()
 Short for inout(flecs::InOutNone).
termoper (flecs::oper_kind_t oper)
 Set the operator of the term.
termand_ ()
 Short for oper(flecs::And).
termor_ ()
 Short for oper(flecs::Or).
termnot_ ()
 Short for oper(flecs::Not).
termoptional ()
 Short for oper(flecs::Optional).
termand_from ()
 Short for oper(flecs::AndFrom).
termor_from ()
 Short for oper(flecs::OrFrom).
termnot_from ()
 Short for oper(flecs::NotFrom).
termfilter ()
 Mark the term as a filter.
Public Member Functions inherited from flecs::term_ref_builder_i< term >
 term_ref_builder_i ()
 Default constructor.
virtual ~term_ref_builder_i ()
 Destructor.
termself ()
 The self flag indicates that the term identifier itself is used.
termid (flecs::entity_t id)
 Specify the value of the identifier by ID.
termentity (flecs::entity_t entity)
 Specify the value of the identifier by ID.
termname (const char *name)
 Specify the value of the identifier by name.
termvar (const char *var_name)
 Specify that the identifier is a variable (resolved at query evaluation time).
termflags (flecs::flags64_t flags)
 Override the term ID flags.

Public Attributes

flecs::term_t value
 The underlying term value.
Public Attributes inherited from flecs::term_builder_i< term >
ecs_term_tterm_
 Pointer to the current term.
Public Attributes inherited from flecs::term_ref_builder_i< term >
ecs_term_ref_tterm_ref_
 Pointer to the current term reference.

Protected Member Functions

flecs::world_tworld_v () override
Protected Member Functions inherited from flecs::term_builder_i< term >
void set_term (ecs_term_t *term)
 Set the current term pointer.
Protected Member Functions inherited from flecs::term_ref_builder_i< term >
void assert_term_ref ()

Detailed Description

Class that describes a term.

Definition at line 16 of file impl.hpp.

Constructor & Destructor Documentation

◆ term() [1/6]

flecs::term::term ( )
inline

Definition at line 17 of file impl.hpp.

◆ term() [2/6]

flecs::term::term ( flecs::world_t * world_ptr,
ecs_term_t t = {} )
inline

Definition at line 19 of file impl.hpp.

◆ term() [3/6]

flecs::term::term ( flecs::world_t * world_ptr,
id_t component_id )
inline

Definition at line 24 of file impl.hpp.

◆ term() [4/6]

flecs::term::term ( flecs::world_t * world_ptr,
entity_t first,
entity_t second )
inline

Definition at line 34 of file impl.hpp.

◆ term() [5/6]

flecs::term::term ( id_t component_id)
inline

Definition at line 37 of file impl.hpp.

◆ term() [6/6]

flecs::term::term ( id_t first,
id_t second )
inline

Definition at line 39 of file impl.hpp.

Member Function Documentation

◆ get_first()

flecs::entity flecs::term::get_first ( )
inline

Get the first element of the term.

Definition at line 76 of file impl.hpp.

◆ get_second()

flecs::entity flecs::term::get_second ( )
inline

Get the second element of the term.

Definition at line 81 of file impl.hpp.

◆ get_src()

flecs::entity flecs::term::get_src ( )
inline

Get the source entity of the term.

Definition at line 71 of file impl.hpp.

◆ id()

flecs::id flecs::term::id ( )
inline

Get the term ID.

Definition at line 56 of file impl.hpp.

◆ inout()

flecs::inout_kind_t flecs::term::inout ( )
inline

Get the inout kind of the term.

Definition at line 61 of file impl.hpp.

◆ is_set()

bool flecs::term::is_set ( )
inline

Check if the term is initialized.

Definition at line 51 of file impl.hpp.

◆ oper()

flecs::oper_kind_t flecs::term::oper ( )
inline

Get the operator kind of the term.

Definition at line 66 of file impl.hpp.

◆ operator flecs::term_t()

flecs::term::operator flecs::term_t ( ) const
inline

Convert to the underlying term_t.

Definition at line 86 of file impl.hpp.

◆ reset()

void flecs::term::reset ( )
inline

Reset the term to its default state.

Definition at line 45 of file impl.hpp.

◆ world_v()

flecs::world_t * flecs::term::world_v ( )
inlineoverrideprotectedvirtual

Implements flecs::term_builder_i< term >.

Definition at line 94 of file impl.hpp.

Member Data Documentation

◆ value

flecs::term_t flecs::term::value

The underlying term value.

Definition at line 91 of file impl.hpp.


The documentation for this struct was generated from the following file:
  • include/flecs/addons/cpp/mixins/term/impl.hpp