55 desc_.
id = ecs_pair(first, second);
66 template <
typename First>
72 template <
typename Second>
78 template <
typename First,
typename Second>
91 desc_.
kind = the_kind;
96 template <
typename Kind>
113 bool created_ =
false;
ecs_entity_t entity_t
Entity type.
ecs_world_t world_t
World type.
Used with ecs_metric_init() to create metric.
const char * brief
Description of metric.
ecs_entity_t member
Entity associated with member that stores metric value.
ecs_entity_t kind
Must be EcsGauge, EcsCounter, EcsCounterIncrement, or EcsCounterId.
ecs_entity_t entity
Entity associated with metric.
bool targets
If id is a (R, *) wildcard and relationship R has the OneOf property, setting this value to true will...
ecs_id_t id
Tracks whether entities have the specified component ID.
Class that wraps around a flecs::id_t.
Metric builder interface.
operator flecs::entity()
Finalize the metric and return the entity.
metric_builder & id(flecs::entity_t first, flecs::entity_t second)
Set the ID for the metric as a pair.
metric_builder & kind()
Set the metric kind by type.
metric_builder & id(flecs::entity_t second)
Set the ID for the metric as a pair with type First.
~metric_builder()
Destructor.
metric_builder & brief(const char *b)
Set a brief description for the metric.
metric_builder & id(flecs::id_t the_id)
Set the ID for the metric.
metric_builder(flecs::world_t *world, flecs::entity_t entity)
Construct a metric builder.
metric_builder & id_second(flecs::entity_t first)
Set the ID for the metric as a pair with type Second.
metric_builder & id()
Set the ID for the metric by type.
metric_builder & targets(bool value=true)
Set whether to create metrics for targets.
metric_builder & dotmember(const char *name)
Set the member to use for the metric using dot notation.
metric_builder & id()
Set the ID for the metric as a pair with types First and Second.
metric_builder & member(flecs::entity_t e)
Set the member to use for the metric by entity ID.
metric_builder & kind(flecs::entity_t the_kind)
Set the metric kind (e.g., Counter, Gauge).