Flecs v4.1
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
flecs::term Struct Referencefinal

Class that describes a term. More...

#include <impl.hpp>

Inheritance diagram for flecs::term:
[legend]

Public Member Functions

 term ()
 Default constructor.
 
 term (flecs::world_t *world_ptr)
 Construct from a world.
 
 term (flecs::world_t *world_ptr, ecs_term_t t)
 Construct from a world and an existing term descriptor.
 
 term (flecs::world_t *world_ptr, id_t component_id)
 Construct from a world and a component ID.
 
 term (flecs::world_t *world_ptr, entity_t first, entity_t second)
 Construct from a world and a pair of entity IDs.
 
 term (id_t component_id)
 Construct from a component ID (no world).
 
 term (id_t first, id_t second)
 Construct from a pair of IDs (no world).
 
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_builder_i (ecs_term_t *term_ptr)
 Construct from a term pointer.
 
termterm (id_t id)
 Set the term ID.
 
termsrc ()
 Call prior to setting values for the src identifier.
 
termsrc (flecs::entity_t id)
 Select the src identifier, initialize it with an entity ID.
 
termsrc ()
 Select the src identifier, initialize it with the ID associated with the type.
 
termsrc (const char *name)
 Select the src identifier, initialize it with a name.
 
termfirst ()
 Call prior to setting values for the first identifier.
 
termfirst (flecs::entity_t id)
 Select the first identifier, initialize it with an entity ID.
 
termfirst ()
 Select the first identifier, initialize it with the ID associated with the type.
 
termfirst (const char *name)
 Select the first identifier, initialize it with a name.
 
termsecond ()
 Call prior to setting values for the second identifier.
 
termsecond (flecs::entity_t id)
 Select the second identifier, initialize it with an entity ID.
 
termsecond ()
 Select the second identifier, initialize it with the ID associated with the type.
 
termsecond (const char *name)
 Select the second identifier, initialize it with a name.
 
termup (flecs::entity_t trav=0)
 The up flag indicates that the term identifier may be substituted by traversing a relationship upwards.
 
termup ()
 Traverse upwards using the specified relationship type.
 
termcascade (flecs::entity_t trav=0)
 The cascade flag is like up(), but returns results in breadth-first order.
 
termcascade ()
 Cascade using the specified relationship type.
 
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 ()
 Short for inout(flecs::InOut).
 
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< 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

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< Base >
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< Base >
void assert_term_ref ()
 

Detailed Description

Class that describes a term.

Definition at line 16 of file impl.hpp.

Constructor & Destructor Documentation

◆ term() [1/7]

flecs::term::term ( )
inline

Default constructor.

Definition at line 18 of file impl.hpp.

◆ term() [2/7]

flecs::term::term ( flecs::world_t * world_ptr)
inline

Construct from a world.

Definition at line 24 of file impl.hpp.

◆ term() [3/7]

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

Construct from a world and an existing term descriptor.

Definition at line 30 of file impl.hpp.

◆ term() [4/7]

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

Construct from a world and a component ID.

Definition at line 39 of file impl.hpp.

◆ term() [5/7]

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

Construct from a world and a pair of entity IDs.

Definition at line 52 of file impl.hpp.

◆ term() [6/7]

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

Construct from a component ID (no world).

Definition at line 61 of file impl.hpp.

◆ term() [7/7]

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

Construct from a pair of IDs (no world).

Definition at line 73 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 113 of file impl.hpp.

◆ get_second()

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

Get the second element of the term.

Definition at line 118 of file impl.hpp.

◆ get_src()

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

Get the source entity of the term.

Definition at line 108 of file impl.hpp.

◆ id()

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

Get the term ID.

Definition at line 93 of file impl.hpp.

◆ inout()

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

Get the inout kind of the term.

Definition at line 98 of file impl.hpp.

◆ is_set()

bool flecs::term::is_set ( )
inline

Check if the term is initialized.

Definition at line 88 of file impl.hpp.

◆ oper()

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

Get the operator kind of the term.

Definition at line 103 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 123 of file impl.hpp.

◆ reset()

void flecs::term::reset ( )
inline

Reset the term to its default state.

Definition at line 82 of file impl.hpp.

◆ world_v()

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

Implements flecs::term_builder_i< term >.

Definition at line 131 of file impl.hpp.

Member Data Documentation

◆ value

flecs::term_t flecs::term::value

The underlying term value.

Definition at line 128 of file impl.hpp.


The documentation for this struct was generated from the following file: