Skip to content
Flecs v4.1
entity_builder.inl
Go to the documentation of this file.
1/**
2 * @file addons/cpp/mixins/doc/entity_builder.inl
3 * @brief Doc entity builder mixin.
4 */
5
6/** Set human-readable name.
7 * This adds `(flecs.doc.Description, flecs.Name)` to the entity.
8 *
9 * @see ecs_doc_set_name()
10 * @see flecs::doc::set_name()
11 * @see flecs::entity_view::doc_name()
12 *
13 * @memberof flecs::entity_builder
14 * @ingroup cpp_addons_doc
15 */
16const Self& set_doc_name(const char *name) const {
18 return to_base();
19}
20
21/** Set brief description.
22 * This adds `(flecs.doc.Description, flecs.doc.Brief)` to the entity.
23 *
24 * @see ecs_doc_set_brief()
25 * @see flecs::doc::set_brief()
26 * @see flecs::entity_view::doc_brief()
27 *
28 * @memberof flecs::entity_builder
29 * @ingroup cpp_addons_doc
30 */
31const Self& set_doc_brief(const char *brief) const {
33 return to_base();
34}
35
36/** Set detailed description.
37 * This adds `(flecs.doc.Description, flecs.doc.Detail)` to the entity.
38 *
39 * @see ecs_doc_set_detail()
40 * @see flecs::doc::set_detail()
41 * @see flecs::entity_view::doc_detail()
42 *
43 * @memberof flecs::entity_builder
44 * @ingroup cpp_addons_doc
45 */
46const Self& set_doc_detail(const char *detail) const {
48 return to_base();
49}
50
51/** Set link to external documentation.
52 * This adds `(flecs.doc.Description, flecs.doc.Link)` to the entity.
53 *
54 * @see ecs_doc_set_link()
55 * @see flecs::doc::set_link()
56 * @see flecs::entity_view::doc_link()
57 *
58 * @memberof flecs::entity_builder
59 * @ingroup cpp_addons_doc
60 */
61const Self& set_doc_link(const char *link) const {
63 return to_base();
64}
65
66/** Set doc color.
67 * This adds `(flecs.doc.Description, flecs.doc.Color)` to the entity.
68 *
69 * @see ecs_doc_set_color()
70 * @see flecs::doc::set_color()
71 * @see flecs::entity_view::doc_color()
72 *
73 * @memberof flecs::entity_builder
74 * @ingroup cpp_addons_doc
75 */
76const Self& set_doc_color(const char *color) const {
78 return to_base();
79}
80
81/** Set doc UUID.
82 * This adds `(flecs.doc.Description, flecs.doc.Uuid)` to the entity.
83 *
84 * @see ecs_doc_set_uuid()
85 * @see flecs::doc::set_uuid()
86 * @see flecs::entity_view::doc_uuid()
87 *
88 * @memberof flecs::entity_builder
89 * @ingroup cpp_addons_doc
90 */
91const Self& set_doc_uuid(const char *uuid) const {
93 return to_base();
94}
FLECS_API void ecs_doc_set_uuid(ecs_world_t *world, ecs_entity_t entity, const char *uuid)
Add UUID to 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 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 Self & set_doc_uuid(const char *uuid) const
Set doc UUID.
const Self & set_doc_name(const char *name) const
Set human-readable name.
const Self & set_doc_brief(const char *brief) const
Set brief description.
const Self & set_doc_link(const char *link) const
Set link to external documentation.
const Self & set_doc_color(const char *color) const
Set doc color.
const Self & set_doc_detail(const char *detail) const
Set detailed description.
flecs::string_view name() const
Return the entity name.
flecs::id_t id_
The raw ID value.
Definition decl.hpp:154
flecs::world_t * world_
World is optional, but guarantees that entity identifiers extracted from the ID are valid.
Definition decl.hpp:152