Flecs v4.0
A fast entity component system (ECS) for C & C++
Loading...
Searching...
No Matches
impl.hpp
Go to the documentation of this file.
1
6#pragma once
7
8namespace flecs {
9namespace doc {
10
19inline const char* get_uuid(const flecs::entity_view& e) {
20 return ecs_doc_get_uuid(e.world(), e);
21}
22
31inline const char* get_name(const flecs::entity_view& e) {
32 return ecs_doc_get_name(e.world(), e);
33}
34
43inline const char* get_brief(const flecs::entity_view& e) {
44 return ecs_doc_get_brief(e.world(), e);
45}
46
55inline const char* get_detail(const flecs::entity_view& e) {
56 return ecs_doc_get_detail(e.world(), e);
57}
58
67inline const char* get_link(const flecs::entity_view& e) {
68 return ecs_doc_get_link(e.world(), e);
69}
70
79inline const char* get_color(const flecs::entity_view& e) {
80 return ecs_doc_get_color(e.world(), e);
81}
82
91inline void set_uuid(flecs::entity& e, const char *uuid) {
92 ecs_doc_set_uuid(e.world(), e, uuid);
93}
94
103inline void set_name(flecs::entity& e, const char *name) {
104 ecs_doc_set_name(e.world(), e, name);
105}
106
115inline void set_brief(flecs::entity& e, const char *description) {
116 ecs_doc_set_brief(e.world(), e, description);
117}
118
127inline void set_detail(flecs::entity& e, const char *description) {
128 ecs_doc_set_detail(e.world(), e, description);
129}
130
139inline void set_link(flecs::entity& e, const char *link) {
140 ecs_doc_set_link(e.world(), e, link);
141}
142
151inline void set_color(flecs::entity& e, const char *color) {
152 ecs_doc_set_color(e.world(), e, color);
153}
154
156namespace _ {
157
159inline void init(flecs::world& world) {
160 world.component<doc::Description>("flecs::doc::Description");
161}
162
163} // namespace _
164} // namespace doc
165} // namespace flecs
FLECS_API void ecs_doc_set_uuid(ecs_world_t *world, ecs_entity_t entity, const char *uuid)
Add UUID to entity.
FLECS_API const char * ecs_doc_get_name(const ecs_world_t *world, ecs_entity_t entity)
Get human readable name from entity.
FLECS_API const char * ecs_doc_get_color(const ecs_world_t *world, ecs_entity_t entity)
Get color from entity.
FLECS_API const char * ecs_doc_get_uuid(const ecs_world_t *world, ecs_entity_t entity)
Get UUID from entity.
FLECS_API void ecs_doc_set_brief(ecs_world_t *world, ecs_entity_t entity, const char *description)
Add brief description to entity.
FLECS_API const char * ecs_doc_get_link(const ecs_world_t *world, ecs_entity_t entity)
Get link to external documentation from entity.
FLECS_API const char * ecs_doc_get_detail(const ecs_world_t *world, ecs_entity_t entity)
Get detailed description from entity.
FLECS_API const char * ecs_doc_get_brief(const ecs_world_t *world, ecs_entity_t entity)
Get brief description from entity.
FLECS_API void ecs_doc_set_detail(ecs_world_t *world, ecs_entity_t entity, const char *description)
Add detailed description to entity.
FLECS_API void ecs_doc_set_link(ecs_world_t *world, ecs_entity_t entity, const char *link)
Add link to external documentation to entity.
FLECS_API void ecs_doc_set_color(ecs_world_t *world, ecs_entity_t entity, const char *color)
Add color to entity.
FLECS_API void ecs_doc_set_name(ecs_world_t *world, ecs_entity_t entity, const char *name)
Add human-readable name to entity.
const char * get_color(const flecs::entity_view &e)
Get color for an entity.
Definition impl.hpp:79
void set_uuid(flecs::entity &e, const char *uuid)
Set UUID for an entity.
Definition impl.hpp:91
void set_link(flecs::entity &e, const char *link)
Set link to external documentation for an entity.
Definition impl.hpp:139
void set_name(flecs::entity &e, const char *name)
Set human readable name for an entity.
Definition impl.hpp:103
const char * get_brief(const flecs::entity_view &e)
Get brief description for an entity.
Definition impl.hpp:43
const char * get_detail(const flecs::entity_view &e)
Get detailed description for an entity.
Definition impl.hpp:55
void set_brief(flecs::entity &e, const char *description)
Set brief description for an entity.
Definition impl.hpp:115
const char * get_link(const flecs::entity_view &e)
Get link to external documentation for an entity.
Definition impl.hpp:67
const char * get_name(const flecs::entity_view &e)
Get human readable name for an entity.
Definition impl.hpp:31
void set_color(flecs::entity &e, const char *color)
Set color for an entity.
Definition impl.hpp:151
const char * get_uuid(const flecs::entity_view &e)
Get UUID for an entity.
Definition impl.hpp:19
void set_detail(flecs::entity &e, const char *description)
Set detailed description for an entity.
Definition impl.hpp:127
flecs::component< T > component(Args &&... args) const
Find or register component.
Component that stores description.
Definition doc.h:67
Entity.
Definition entity.hpp:30
The world.
Definition world.hpp:137