Flecs v4.1
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
flecs::term_ref_builder_i< Base > Struct Template Referenceabstract

Term identifier builder. More...

#include <builder_i.hpp>

Inheritance diagram for flecs::term_ref_builder_i< Base >:
[legend]

Public Member Functions

 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_ref_tterm_ref_
 Pointer to the current term reference.
 

Protected Member Functions

virtual flecs::world_tworld_v ()=0
 
void assert_term_ref ()
 

Detailed Description

template<typename Base>
struct flecs::term_ref_builder_i< Base >

Term identifier builder.

A term identifier describes a single identifier in a term. Identifier descriptions can reference entities by ID, name, or by variable, which means the entity will be resolved when the term is evaluated.

Definition at line 22 of file builder_i.hpp.

Constructor & Destructor Documentation

◆ term_ref_builder_i()

template<typename Base >
flecs::term_ref_builder_i< Base >::term_ref_builder_i ( )
inline

Default constructor.

Definition at line 24 of file builder_i.hpp.

◆ ~term_ref_builder_i()

template<typename Base >
virtual flecs::term_ref_builder_i< Base >::~term_ref_builder_i ( )
inlinevirtual

Destructor.

Definition at line 27 of file builder_i.hpp.

Member Function Documentation

◆ assert_term_ref()

template<typename Base >
void flecs::term_ref_builder_i< Base >::assert_term_ref ( )
inlineprotected

Definition at line 86 of file builder_i.hpp.

◆ entity()

template<typename Base >
Base & flecs::term_ref_builder_i< Base >::entity ( flecs::entity_t entity)
inline

Specify the value of the identifier by ID.

Almost the same as id(entity_t), but this operation explicitly sets the flecs::IsEntity flag. This forces the ID to be interpreted as an entity, whereas not setting the flag would implicitly convert IDs for built-in variables such as flecs::This to a variable.

This function can also be used to disambiguate id(0), which would match both id(entity_t) and id(const char*).

Definition at line 51 of file builder_i.hpp.

◆ flags()

template<typename Base >
Base & flecs::term_ref_builder_i< Base >::flags ( flecs::flags64_t flags)
inline

Override the term ID flags.

Definition at line 74 of file builder_i.hpp.

◆ id()

template<typename Base >
Base & flecs::term_ref_builder_i< Base >::id ( flecs::entity_t id)
inline

Specify the value of the identifier by ID.

Definition at line 37 of file builder_i.hpp.

◆ name()

template<typename Base >
Base & flecs::term_ref_builder_i< Base >::name ( const char * name)
inline

Specify the value of the identifier by name.

Definition at line 58 of file builder_i.hpp.

◆ self()

template<typename Base >
Base & flecs::term_ref_builder_i< Base >::self ( )
inline

The self flag indicates that the term identifier itself is used.

Definition at line 30 of file builder_i.hpp.

◆ var()

template<typename Base >
Base & flecs::term_ref_builder_i< Base >::var ( const char * var_name)
inline

Specify that the identifier is a variable (resolved at query evaluation time).

Definition at line 66 of file builder_i.hpp.

Member Data Documentation

◆ term_ref_

template<typename Base >
ecs_term_ref_t* flecs::term_ref_builder_i< Base >::term_ref_

Pointer to the current term reference.

Definition at line 81 of file builder_i.hpp.


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