![]() |
Flecs v4.1
A fast entity component system (ECS) for C & C++
|
Metric builder interface. More...
#include <builder.hpp>
Public Member Functions | |
| metric_builder (flecs::world_t *world, flecs::entity_t entity) | |
| Construct a metric builder. | |
| ~metric_builder () | |
| Destructor. | |
| metric_builder & | member (flecs::entity_t e) |
| Set the member to use for the metric by entity ID. | |
| metric_builder & | member (const char *name) |
| Set the member to use for the metric by name. | |
| template<typename T> | |
| metric_builder & | member (const char *name) |
| Set the member to use for the metric by type and name. | |
| metric_builder & | dotmember (const char *name) |
| Set the member to use for the metric using dot notation. | |
| template<typename T> | |
| metric_builder & | dotmember (const char *name) |
| Set the member to use for the metric by type using dot notation. | |
| metric_builder & | id (flecs::id_t the_id) |
| Set the ID for the metric. | |
| metric_builder & | id (flecs::entity_t first, flecs::entity_t second) |
| Set the ID for the metric as a pair. | |
| template<typename T> | |
| metric_builder & | id () |
| Set the ID for the metric by type. | |
| template<typename First> | |
| metric_builder & | id (flecs::entity_t second) |
| Set the ID for the metric as a pair with type First. | |
| template<typename Second> | |
| metric_builder & | id_second (flecs::entity_t first) |
| Set the ID for the metric as a pair with type Second. | |
| template<typename First, typename Second> | |
| metric_builder & | id () |
| Set the ID for the metric as a pair with types First and Second. | |
| metric_builder & | targets (bool value=true) |
| Set whether to create metrics for targets. | |
| metric_builder & | kind (flecs::entity_t the_kind) |
| Set the metric kind (e.g., Counter, Gauge). | |
| template<typename Kind> | |
| metric_builder & | kind () |
| Set the metric kind by type. | |
| metric_builder & | brief (const char *b) |
| Set a brief description for the metric. | |
| operator flecs::entity () | |
| Finalize the metric and return the entity. | |
Protected Attributes | |
| flecs::world_t * | world_ |
| ecs_metric_desc_t | desc_ = {} |
| bool | created_ = false |
Metric builder interface.
Definition at line 16 of file builder.hpp.
|
inline |
Construct a metric builder.
Definition at line 18 of file builder.hpp.
|
inline |
|
inline |
Set a brief description for the metric.
Definition at line 102 of file builder.hpp.
|
inline |
|
inline |
|
inline |
Set the ID for the metric as a pair with types First and Second.
Definition at line 79 of file builder.hpp.
|
inline |
Set the ID for the metric by type.
Definition at line 61 of file builder.hpp.
|
inline |
Set the ID for the metric as a pair.
Definition at line 54 of file builder.hpp.
|
inline |
Set the ID for the metric as a pair with type First.
Definition at line 67 of file builder.hpp.
|
inline |
Set the ID for the metric.
Definition at line 48 of file builder.hpp.
|
inline |
Set the ID for the metric as a pair with type Second.
Definition at line 73 of file builder.hpp.
|
inline |
Set the metric kind by type.
Definition at line 97 of file builder.hpp.
|
inline |
Set the metric kind (e.g., Counter, Gauge).
Definition at line 90 of file builder.hpp.
|
inline |
|
inline |
|
inline |
Set the member to use for the metric by entity ID.
Definition at line 28 of file builder.hpp.
|
inline |
|
inline |
Set whether to create metrics for targets.
Definition at line 84 of file builder.hpp.
|
protected |
Definition at line 113 of file builder.hpp.
|
protected |
Definition at line 112 of file builder.hpp.
|
protected |
Definition at line 111 of file builder.hpp.