Flecs v3.1
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
world.inl
Go to the documentation of this file.
1
14flecs::string to_expr(flecs::entity_t tid, const void* value) {
15 char *expr = ecs_ptr_to_expr(m_world, tid, value);
16 return flecs::string(expr);
17}
18
20template <typename T>
21flecs::string to_expr(const T* value) {
22 flecs::entity_t tid = _::cpp_type<T>::id(m_world);
23 return to_expr(tid, value);
24}
25
27flecs::meta::cursor cursor(flecs::entity_t tid, void *ptr) {
28 return flecs::meta::cursor(m_world, tid, ptr);
29}
30
32template <typename T>
34 flecs::entity_t tid = _::cpp_type<T>::id(m_world);
35 return cursor(tid, ptr);
36}
37
39flecs::entity primitive(flecs::meta::primitive_kind_t kind);
40
42flecs::entity array(flecs::entity_t elem_id, int32_t array_count);
43
45template <typename T>
46flecs::entity array(int32_t array_count);
47
49flecs::entity vector(flecs::entity_t elem_id);
50
52template <typename T>
54
FLECS_API char * ecs_ptr_to_expr(const ecs_world_t *world, ecs_entity_t type, const void *data)
Serialize value into expression string.
flecs::entity primitive(flecs::meta::primitive_kind_t kind)
Create primitive type.
flecs::entity array(flecs::entity_t elem_id, int32_t array_count)
Create array type.
flecs::meta::cursor cursor(flecs::entity_t tid, void *ptr)
Return meta cursor to value.
Definition: world.inl:27
flecs::meta::cursor cursor(void *ptr)
Return meta cursor to value.
Definition: world.inl:33
flecs::entity array(int32_t array_count)
Create array type.
flecs::entity vector(flecs::entity_t elem_id)
Create vector type.
flecs::string to_expr(flecs::entity_t tid, const void *value)
Convert value to string.
Definition: world.inl:14
flecs::string to_expr(const T *value)
Convert value to string.
Definition: world.inl:21
flecs::entity vector()
Create vector type.
Entity.
Definition: entity.hpp:30
Class for reading/writing dynamic values.
Definition: decl.hpp:125