1#include <entity_type.h>
2#include <stdio.h>
3
6});
7
8int main(int argc, char *argv[]) {
10
12
15
16
17 const TypeWithEntity *ptr =
ecs_get(ecs, e, TypeWithEntity);
19 printf("%s\n", str);
20 ecs_os_free(str);
21
23}
FLECS_API const ecs_entity_t ecs_id(EcsDocDescription)
Component ID for EcsDocDescription.
FLECS_API char * ecs_ptr_to_expr(const ecs_world_t *world, ecs_entity_t type, const void *data)
Serialize value into expression string.
ecs_id_t ecs_entity_t
An entity identifier.
struct ecs_world_t ecs_world_t
A world is the container for all ECS data and supporting features.
#define ecs_get(world, entity, T)
Get a component.
#define ecs_insert(world,...)
Insert a new entity with a list of component values.
#define ecs_value(T,...)
Convenience macro for creating a compound literal value literal.
ecs_entity_t ecs_set_name(ecs_world_t *world, ecs_entity_t entity, const char *name)
Set the name of an entity.
int ecs_fini(ecs_world_t *world)
Delete a world.
ecs_world_t * ecs_init_w_args(int argc, char *argv[])
Create a new world with arguments.