Flecs: include/flecs/addons/cpp/entity_view.hpp Source File
Description: A fast entity component system (ECS) for C & C++

| Flecs v4.0 A fast entity component system (ECS) for C & C++

Loading...
Searching...
No Matches
entity_view.hpp
Go to the documentation of this file.
1
12
13#pragma once
14
16 * @ingroup cpp_entities
17 * @{
18 */
19
20namespace flecs
21{
22
28 struct entity_view : public id {
29
30 entity_view() : flecs::id() { }
31
32
35 * @param id The entity id.
36 */
37 explicit entity_view(flecs::world_t *world, flecs::id_t id)
38 : flecs::id(world
39 ? const_cast<flecs::world_t*>(ecs_get_world(world))
40 : nullptr
41 , id ) { }
42
44 entity_view(entity_t id)
45 : flecs::id( nullptr, id ) { }
46
50 entity_t id() const {
51 return id_;
52 }
53
55 *
56 * @return True if the entity is alive, false otherwise.
57 */
58 bool is_valid() const {
59 return world_ && ecs_is_valid(world_, id_);
60 }
61
62 explicit operator bool() const {
63 return is_valid();
64 }
65
67
68 * @return True if the entity is alive, false otherwise.
69 */
70 bool is_alive() const {
71 return world_ && ecs_is_alive(world_, id_);
72 }
73
78 flecs::string_view name() const {
79 return flecs::string_view(ecs_get_name(world_, id_));
80 }
81
84
86 flecs::string_view symbol() const {
87 return flecs::string_view(ecs_get_symbol(world_, id_));
88 }
89
94 flecs::string path(const char *sep = "::", const char *init_sep = "::") const {
95 return path_from(0, sep, init_sep);
96 }
97
101
102 flecs::string path_from(flecs::entity_t parent, const char *sep = "::", const char *init_sep = "::") const {
103 char *path = ecs_get_path_w_sep(world_, parent, id_, sep, init_sep);
104 return flecs::string(path);
105 }
106
111 template <typename Parent>
112 flecs::string path_from(const char *sep = "::", const char *init_sep = "::") const {
113 return path_from(_::type<Parent>::id(world_), sep, init_sep);
114 }
115
116 bool enabled() const {
117 return !ecs_has_id(world_, id_, flecs::Disabled);
118 }
119
124 flecs::type type() const;
125
130 flecs::table table() const;
131
139 flecs::table_range range() const;
140
150 template <typename Func>
151 void each(const Func& func) const;
152
162 template <typename Func>
163 void each(flecs::id_t first, flecs::id_t second, const Func& func) const;
164
175 template <typename Func>
176 void each(const flecs::entity_view& rel, const Func& func) const;
177
188 template <typename First, typename Func>
189 void each(const Func& func) const {
190 return each(_::type<First>::id(world_), func);
191 }
192
203 template <typename Func>
204 void children(flecs::entity_t rel, Func&& func) const {
205 /* When the entity is a wildcard, this would attempt to query for all
206 * entities with (ChildOf, *) or (ChildOf, _) instead of querying for
207 * the children of the wildcard entity. */
208 if (id_ == flecs::Wildcard || id_ == flecs::Any) {
209 /* This is correct, wildcard entities don't have children */
210 return;
211 }
212
213 flecs::world world(world_);
214
215 ecs_iter_t it = ecs_each_id(world_, ecs_pair(rel, id_));
216 while (ecs_each_next(&it)) {
217 _::each_delegate<Func>(FLECS_MOV(func)).invoke(&it);
218 }
219 }
220
231 template <typename Rel, typename Func>
232 void children(Func&& func) const {
233 children(_::type<Rel>::id(world_), FLECS_MOV(func));
234 }
235
247 template <typename Func>
248 void children(Func&& func) const {
249 children(flecs::ChildOf, FLECS_MOV(func));
250 }
251
258 template <typename T, if_t< is_actual<T>::value > = 0>
259 const T* get() const {
260 auto comp_id = _::type<T>::id(world_);
261 ecs_assert(_::type<T>::size() != 0, ECS_INVALID_PARAMETER,
262 "operation invalid for empty type");
263 return static_cast<const T*>(ecs_get_id(world_, id_, comp_id));
264 }
265
274 template <typename T, typename A = actual_type_t<T>,
275 if_t< flecs::is_pair<T>::value > = 0>
276 const A* get() const {
277 auto comp_id = _::type<T>::id(world_);
278 ecs_assert(_::type<A>::size() != 0, ECS_INVALID_PARAMETER,
279 "operation invalid for empty type");
280 return static_cast<const A*>(ecs_get_id(world_, id_, comp_id));
281 }
282
289 template <typename First, typename Second, typename P = pair<First, Second>,
290 typename A = actual_type_t<P>, if_not_t< flecs::is_pair<First>::value > = 0>
291 const A* get() const {
292 return this->get<P>();
293 }
294
301 template<typename First, typename Second, if_not_t< is_enum<Second>::value> = 0>
302 const First* get(Second second) const {
303 auto first = _::type<First>::id(world_);
304 ecs_assert(_::type<First>::size() != 0, ECS_INVALID_PARAMETER,
305 "operation invalid for empty type");
306 return static_cast<const First*>(
307 ecs_get_id(world_, id_, ecs_pair(first, second)));
308 }
309
316 template<typename First, typename Second, if_t<is_enum<Second>::value> = 0>
317 const First* get(Second constant) const {
318 const auto& et = enum_type<Second>(this->world_);
319 flecs::entity_t target = et.entity(constant);
320 return get<First>(target);
321 }
322
329 const void* get(flecs::id_t comp) const {
330 return ecs_get_id(world_, id_, comp);
331 }
332
341 const void* get(flecs::entity_t first, flecs::entity_t second) const {
342 return ecs_get_id(world_, id_, ecs_pair(first, second));
343 }
344
379 template <typename Func, if_t< is_callable<Func>::value > = 0>
380 bool get(const Func& func) const;
381
387 template <typename T, if_t< is_enum<T>::value > = 0>
388 const T* get() const;
389
397 template<typename Second>
398 const Second* get_second(flecs::entity_t first) const {
399 auto second = _::type<Second>::id(world_);
400 ecs_assert( ecs_get_type_info(world_, ecs_pair(first, second)) != NULL,
401 ECS_INVALID_PARAMETER, "pair is not a component");
402 ecs_assert( ecs_get_type_info(world_, ecs_pair(first, second))->component == second,
403 ECS_INVALID_PARAMETER, "type of pair is not Second");
404 ecs_assert(_::type<Second>::size() != 0, ECS_INVALID_PARAMETER,
405 "operation invalid for empty type");
406 return static_cast<const Second*>(
407 ecs_get_id(world_, id_, ecs_pair(first, second)));
408 }
409
417 template<typename First, typename Second>
418 const Second* get_second() const {
419 return get<pair_object<First, Second>>();
420 }
421
428 template <typename T, if_t< is_actual<T>::value > = 0>
429 T* get_mut() const {
430 auto comp_id = _::type<T>::id(world_);
431 ecs_assert(_::type<T>::size() != 0, ECS_INVALID_PARAMETER,
432 "operation invalid for empty type");
433 return static_cast<T*>(ecs_get_mut_id(world_, id_, comp_id));
434 }
435
444 template <typename T, typename A = actual_type_t<T>,
445 if_t< flecs::is_pair<T>::value > = 0>
446 A* get_mut() const {
447 auto comp_id = _::type<T>::id(world_);
448 ecs_assert(_::type<A>::size() != 0, ECS_INVALID_PARAMETER,
449 "operation invalid for empty type");
450 return static_cast<A*>(ecs_get_mut_id(world_, id_, comp_id));
451 }
452
459 template <typename First, typename Second, typename P = pair<First, Second>,
460 typename A = actual_type_t<P>, if_not_t< flecs::is_pair<First>::value > = 0>
461 A* get_mut() const {
462 return this->get_mut<P>();
463 }
464
471 template<typename First, typename Second, if_not_t< is_enum<Second>::value> = 0>
472 First* get_mut(Second second) const {
473 auto first = _::type<First>::id(world_);
474 ecs_assert(_::type<First>::size() != 0, ECS_INVALID_PARAMETER,
475 "operation invalid for empty type");
476 return static_cast<First*>(
477 ecs_get_mut_id(world_, id_, ecs_pair(first, second)));
478 }
479
486 template<typename First, typename Second, if_t<is_enum<Second>::value> = 0>
487 First* get_mut(Second constant) const {
488 const auto& et = enum_type<Second>(this->world_);
489 flecs::entity_t target = et.entity(constant);
490 return get_mut<First>(target);
491 }
492
499 void* get_mut(flecs::id_t comp) const {
500 return ecs_get_mut_id(world_, id_, comp);
501 }
502
511 void* get_mut(flecs::entity_t first, flecs::entity_t second) const {
512 return ecs_get_mut_id(world_, id_, ecs_pair(first, second));
513 }
514
522 template<typename Second>
523 Second* get_mut_second(flecs::entity_t first) const {
524 auto second = _::type<Second>::id(world_);
525 ecs_assert( ecs_get_type_info(world_, ecs_pair(first, second)) != NULL,
526 ECS_INVALID_PARAMETER, "pair is not a component");
527 ecs_assert( ecs_get_type_info(world_, ecs_pair(first, second))->component == second,
528 ECS_INVALID_PARAMETER, "type of pair is not Second");
529 ecs_assert(_::type<Second>::size() != 0, ECS_INVALID_PARAMETER,
530 "operation invalid for empty type");
531 return static_cast<Second*>(
532 ecs_get_mut_id(world_, id_, ecs_pair(first, second)));
533 }
534
542 template<typename First, typename Second>
543 Second* get_mut_second() const {
544 return get_mut<pair_object<First, Second>>();
545 }
546
555 template<typename First>
556 flecs::entity target(int32_t index = 0) const;
557
566 flecs::entity target(flecs::entity_t first, int32_t index = 0) const;
567
586 flecs::entity target_for(flecs::entity_t relationship, flecs::id_t id) const;
587
588 template <typename T>
589 flecs::entity target_for(flecs::entity_t relationship) const;
590
591 template <typename First, typename Second>
592 flecs::entity target_for(flecs::entity_t relationship) const;
593
599 int32_t depth(flecs::entity_t rel) const {
600 return ecs_get_depth(world_, id_, rel);
601 }
602
608 template<typename Rel>
609 int32_t depth() const {
610 return this->depth(_::type<Rel>::id(world_));
611 }
612
618 flecs::entity parent() const;
619
628 flecs::entity lookup(const char *path, bool search_path = false) const;
629
635 bool has(flecs::id_t e) const {
636 return ecs_has_id(world_, id_, e);
637 }
638
644 template <typename T>
645 bool has() const {
646 flecs::id_t cid = _::type<T>::id(world_);
647 bool result = ecs_has_id(world_, id_, cid);
648 if (result) {
649 return result;
650 }
651
652 if (is_enum<T>::value) {
653 return ecs_has_pair(world_, id_, cid, flecs::Wildcard);
654 }
655
656 return false;
657 }
658
665 template <typename E, if_t< is_enum<E>::value > = 0>
666 bool has(E value) const {
667 auto r = _::type<E>::id(world_);
668 auto o = enum_type<E>(world_).entity(value);
669 ecs_assert(o, ECS_INVALID_PARAMETER,
670 "Constant was not found in Enum reflection data."
671 " Did you mean to use has<E>() instead of has(E)?");
672 return ecs_has_pair(world_, id_, r, o);
673 }
674
681 template <typename First, typename Second>
682 bool has() const {
683 return this->has<First>(_::type<Second>::id(world_));
684 }
685
692 template<typename First, typename Second, if_not_t< is_enum<Second>::value > = 0>
693 bool has(Second second) const {
694 auto comp_id = _::type<First>::id(world_);
695 return ecs_has_id(world_, id_, ecs_pair(comp_id, second));
696 }
697
704 template <typename Second>
705 bool has_second(flecs::entity_t first) const {
706 return this->has(first, _::type<Second>::id(world_));
707 }
708
715 template<typename First, typename E, if_t< is_enum<E>::value > = 0>
716 bool has(E value) const {
717 const auto& et = enum_type<E>(this->world_);
718 flecs::entity_t second = et.entity(value);
719 return has<First>(second);
720 }
721
728 bool has(flecs::id_t first, flecs::id_t second) const {
729 return ecs_has_id(world_, id_, ecs_pair(first, second));
730 }
731
738 bool owns(flecs::id_t e) const {
739 return ecs_owns_id(world_, id_, e);
740 }
741
748 template <typename First>
749 bool owns(flecs::id_t second) const {
750 auto comp_id = _::type<First>::id(world_);
751 return owns(ecs_pair(comp_id, second));
752 }
753
760 bool owns(flecs::id_t first, flecs::id_t second) const {
761 return owns(ecs_pair(first, second));
762 }
763
770 template <typename T>
771 bool owns() const {
772 return owns(_::type<T>::id(world_));
773 }
774
782 template <typename First, typename Second>
783 bool owns() const {
784 return owns(
785 _::type<First>::id(world_),
786 _::type<Second>::id(world_));
787 }
788
794 bool enabled(flecs::id_t id) const {
795 return ecs_is_enabled_id(world_, id_, id);
796 }
797
803 template<typename T>
804 bool enabled() const {
805 return this->enabled(_::type<T>::id(world_));
806 }
807
814 bool enabled(flecs::id_t first, flecs::id_t second) const {
815 return this->enabled(ecs_pair(first, second));
816 }
817
824 template <typename First>
825 bool enabled(flecs::id_t second) const {
826 return this->enabled(_::type<First>::id(world_), second);
827 }
828
835 template <typename First, typename Second>
836 bool enabled() const {
837 return this->enabled<First>(_::type<Second>::id(world_));
838 }
839
840 flecs::entity clone(bool clone_value = true, flecs::entity_t dst_id = 0) const;
841
861 flecs::entity mut(const flecs::world& stage) const;
862
870 flecs::entity mut(const flecs::iter& it) const;
871
880 flecs::entity mut(const flecs::entity_view& e) const;
881
882# ifdef FLECS_JSON
883# include "mixins/json/entity_view.inl"
884# endif
885# ifdef FLECS_DOC
886# include "mixins/doc/entity_view.inl"
887# endif
888# ifdef FLECS_ALERTS
889# include "mixins/alerts/entity_view.inl"
890# endif
891
892# include "mixins/enum/entity_view.inl"
893# include "mixins/event/entity_view.inl"
894
895private:
896 flecs::entity set_stage(world_t *stage);
897};
898
899}
900
entity_view.inl
Alerts entity mixin.
entity_view.inl
Doc entity view mixin.
entity_view.inl
Enum entity view mixin.
entity_view.inl
Event entity mixin.
ecs_assert
#define ecs_assert(condition, error_code,...)
Assert.
Definition log.h:368
ecs_get_type_info
const ecs_type_info_t * ecs_get_type_info(const ecs_world_t *world, ecs_id_t id)
Get the type for an id.
flecs::component::constant
untyped_component & constant(const char *name, int32_t value)
Add constant.
Definition untyped_component.inl:191
ecs_each_next
bool ecs_each_next(ecs_iter_t *it)
Progress an iterator created with ecs_each_id().
ecs_each_id
ecs_iter_t ecs_each_id(const ecs_world_t *world, ecs_id_t id)
Iterate all entities with specified (component id).
ecs_is_enabled_id
bool ecs_is_enabled_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Test if component is enabled.
ecs_has_id
bool ecs_has_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Test if an entity has an id.
ecs_owns_id
bool ecs_owns_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Test if an entity owns an id.
ecs_get_depth
int32_t ecs_get_depth(const ecs_world_t *world, ecs_entity_t entity, ecs_entity_t rel)
Return depth for entity in tree for the specified relationship.
ecs_get_mut_id
void * ecs_get_mut_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Get a mutable pointer to a component.
ecs_get_id
const void * ecs_get_id(const ecs_world_t *world, ecs_entity_t entity, ecs_id_t id)
Get an immutable pointer to a component.
ecs_is_valid
bool ecs_is_valid(const ecs_world_t *world, ecs_entity_t e)
Test whether an entity is valid.
ecs_is_alive
bool ecs_is_alive(const ecs_world_t *world, ecs_entity_t e)
Test whether an entity is alive.
ecs_get_path_w_sep
char * ecs_get_path_w_sep(const ecs_world_t *world, ecs_entity_t parent, ecs_entity_t child, const char *sep, const char *prefix)
Get a path identifier for an entity.
ecs_get_symbol
const char * ecs_get_symbol(const ecs_world_t *world, ecs_entity_t entity)
Get the symbol of an entity.
ecs_get_name
const char * ecs_get_name(const ecs_world_t *world, ecs_entity_t entity)
Get the name of an entity.
ecs_get_world
const ecs_world_t * ecs_get_world(const ecs_poly_t *poly)
Get world from poly.
entity_view.inl
JSON entity mixin.
ecs_iter_t
Iterator.
Definition flecs.h:1099
flecs::_::each_delegate
Definition flecs.hpp:41
flecs::_::type
Definition flecs.hpp:38
flecs::component
Component class.
Definition flecs.hpp:30
flecs::entity_view
Entity view.
Definition entity_view.hpp:28
flecs::entity_view::type
flecs::type type() const
Get the entity's type.
Definition impl.hpp:104
flecs::entity_view::get_mut
A * get_mut() const
Get mutable component value.
Definition entity_view.hpp:446
flecs::entity_view::get
const T * get() const
Get component value.
Definition entity_view.hpp:259
flecs::entity_view::entity_view
entity_view(entity_t id)
Implicit conversion from flecs::entity_t to flecs::entity_view.
Definition entity_view.hpp:44
flecs::entity_view::depth
int32_t depth(flecs::entity_t rel) const
Get depth for given relationship.
Definition entity_view.hpp:599
flecs::entity_view::enabled
bool enabled() const
Test if pair is enabled.
Definition entity_view.hpp:836
flecs::entity_view::has
bool has(flecs::id_t first, flecs::id_t second) const
Check if entity has the provided pair.
Definition entity_view.hpp:728
flecs::entity_view::get
const First * get(Second second) const
Get a pair.
Definition entity_view.hpp:302
flecs::entity_view::name
flecs::string_view name() const
Return the entity name.
Definition entity_view.hpp:78
flecs::entity_view::owns
bool owns(flecs::id_t second) const
Check if entity owns the provided pair.
Definition entity_view.hpp:749
flecs::entity_view::get_second
const Second * get_second(flecs::entity_t first) const
Get the second part for a pair.
Definition entity_view.hpp:398
flecs::entity_view::get_second
const Second * get_second() const
Get the second part for a pair.
Definition entity_view.hpp:418
flecs::entity_view::is_valid
bool is_valid() const
Check if entity is valid.
Definition entity_view.hpp:58
flecs::entity_view::path
flecs::string path(const char *sep="::", const char *init_sep="::") const
Return the entity path.
Definition entity_view.hpp:94
flecs::entity_view::symbol
flecs::string_view symbol() const
Return the entity symbol.
Definition entity_view.hpp:86
flecs::entity_view::each
void each(const Func &func) const
Iterate targets for a given relationship.
Definition entity_view.hpp:189
flecs::entity_view::range
flecs::table_range range() const
Get table range for the entity.
Definition impl.hpp:112
flecs::entity_view::get_mut
void * get_mut(flecs::entity_t first, flecs::entity_t second) const
Get a mutable pair (untyped).
Definition entity_view.hpp:511
flecs::entity_view::owns
bool owns() const
Check if entity owns the provided pair.
Definition entity_view.hpp:783
flecs::entity_view::has
bool has(E value) const
Check if entity has the provided pair.
Definition entity_view.hpp:716
flecs::entity_view::depth
int32_t depth() const
Get depth for given relationship.
Definition entity_view.hpp:609
flecs::entity_view::entity_view
entity_view(flecs::world_t *world, flecs::id_t id)
Wrap an existing entity id.
Definition entity_view.hpp:37
flecs::entity_view::enabled
bool enabled(flecs::id_t id) const
Test if id is enabled.
Definition entity_view.hpp:794
flecs::entity_view::target_for
flecs::entity target_for(flecs::entity_t relationship, flecs::id_t id) const
Get the target of a pair for a given relationship id.
Definition impl.hpp:60
flecs::entity_view::has_second
bool has_second(flecs::entity_t first) const
Check if entity has the provided pair.
Definition entity_view.hpp:705
flecs::entity_view::get
const A * get() const
Get component value.
Definition entity_view.hpp:276
flecs::entity_view::lookup
flecs::entity lookup(const char *path, bool search_path=false) const
Lookup an entity by name.
Definition impl.hpp:182
flecs::entity_view::children
void children(Func &&func) const
Iterate children for entity.
Definition entity_view.hpp:232
flecs::entity_view::owns
bool owns(flecs::id_t e) const
Check if entity owns the provided entity.
Definition entity_view.hpp:738
flecs::entity_view::get_mut
T * get_mut() const
Get mutable component value.
Definition entity_view.hpp:429
flecs::entity_view::table
flecs::table table() const
Get the entity's table.
Definition impl.hpp:108
flecs::entity_view::path_from
flecs::string path_from(flecs::entity_t parent, const char *sep="::", const char *init_sep="::") const
Return the entity path relative to a parent.
Definition entity_view.hpp:102
flecs::entity_view::get_mut_second
Second * get_mut_second() const
Get the second part for a pair.
Definition entity_view.hpp:543
flecs::entity_view::enabled
bool enabled(flecs::id_t second) const
Test if pair is enabled.
Definition entity_view.hpp:825
flecs::entity_view::has
bool has(Second second) const
Check if entity has the provided pair.
Definition entity_view.hpp:693
flecs::entity_view::has
bool has(flecs::id_t e) const
Check if entity has the provided entity.
Definition entity_view.hpp:635
flecs::entity_view::owns
bool owns() const
Check if entity owns the provided component.
Definition entity_view.hpp:771
flecs::entity_view::parent
flecs::entity parent() const
Get parent of entity.
Definition impl.hpp:78
flecs::entity_view::get
const First * get(Second constant) const
Get a pair.
Definition entity_view.hpp:317
flecs::entity_view::get_mut
void * get_mut(flecs::id_t comp) const
Get mutable component value (untyped).
Definition entity_view.hpp:499
flecs::entity_view::get
const A * get() const
Get a pair.
Definition entity_view.hpp:291
flecs::entity_view::each
void each(const Func &func) const
Iterate (component) ids of an entity.
Definition impl.hpp:122
flecs::entity_view::get
const void * get(flecs::entity_t first, flecs::entity_t second) const
Get a pair (untyped).
Definition entity_view.hpp:341
flecs::entity_view::is_alive
bool is_alive() const
Check if entity is alive.
Definition entity_view.hpp:70
flecs::entity_view::get_mut
First * get_mut(Second constant) const
Get a mutable pair.
Definition entity_view.hpp:487
flecs::entity_view::has
bool has() const
Check if entity has the provided component.
Definition entity_view.hpp:645
flecs::entity_view::owns
bool owns(flecs::id_t first, flecs::id_t second) const
Check if entity owns the provided pair.
Definition entity_view.hpp:760
flecs::entity_view::get_mut
First * get_mut(Second second) const
Get a mutable pair.
Definition entity_view.hpp:472
flecs::entity_view::children
void children(Func &&func) const
Iterate children for entity.
Definition entity_view.hpp:248
flecs::entity_view::get_mut_second
Second * get_mut_second(flecs::entity_t first) const
Get the second part for a pair.
Definition entity_view.hpp:523
flecs::entity_view::id
entity_t id() const
Get entity id.
Definition entity_view.hpp:50
flecs::entity_view::target
flecs::entity target(int32_t index=0) const
Get target for a given pair.
Definition impl.hpp:46
flecs::entity_view::get
const void * get(flecs::id_t comp) const
Get component value (untyped).
Definition entity_view.hpp:329
flecs::entity_view::has
bool has() const
Check if entity has the provided pair.
Definition entity_view.hpp:682
flecs::entity_view::path_from
flecs::string path_from(const char *sep="::", const char *init_sep="::") const
Return the entity path relative to a parent.
Definition entity_view.hpp:112
flecs::entity_view::enabled
bool enabled() const
Test if component is enabled.
Definition entity_view.hpp:804
flecs::entity_view::children
void children(flecs::entity_t rel, Func &&func) const
Iterate children for entity.
Definition entity_view.hpp:204
flecs::entity_view::get_mut
A * get_mut() const
Get a mutable pair.
Definition entity_view.hpp:461
flecs::entity_view::mut
flecs::entity mut(const flecs::world &stage) const
Return mutable entity handle for current stage When an entity handle created from the world is used w...
Definition impl.hpp:82
flecs::entity_view::has
bool has(E value) const
Check if entity has the provided enum constant.
Definition entity_view.hpp:666
flecs::entity_view::enabled
bool enabled(flecs::id_t first, flecs::id_t second) const
Test if pair is enabled.
Definition entity_view.hpp:814
flecs::entity
Entity.
Definition entity.hpp:30
flecs::id::second
flecs::entity second() const
Get second element from a pair.
Definition impl.hpp:31
flecs::id::first
flecs::entity first() const
Get first element from a pair.
Definition impl.hpp:20
flecs::iter
Class for iterating over query results.
Definition iter.hpp:68
flecs::string_view
Definition string.hpp:146
flecs::string
Definition string.hpp:13
flecs::table_range
Definition table.hpp:317
flecs::table
Definition table.hpp:18
flecs::type
Type class.
Definition type.hpp:21
flecs::world
The world.
Definition world.hpp:137