![]() |
Flecs v4.1
A fast entity component system (ECS) for C & C++
|
The metrics module extracts metrics from components and makes them available through a unified component interface. More...
Classes | |
| struct | flecs::metric_builder |
| Metric builder interface. More... | |
| struct | flecs::metrics |
| Metrics module. More... | |
Functions | |
| template<typename... Args> | |
| flecs::metric_builder | flecs::world::metric (Args &&... args) const |
| Create a metric. | |
| template<typename Kind > | |
| untyped_component & | flecs::component< T >::metric (flecs::entity_t parent=0, const char *brief=nullptr, const char *name=nullptr) |
| Register a member as a metric. | |
The metrics module extracts metrics from components and makes them available through a unified component interface.
| untyped_component & metric | ( | flecs::entity_t | parent = 0, |
| const char * | brief = nullptr, | ||
| const char * | name = nullptr ) |
Register a member as a metric.
When no explicit name is provided, this operation will derive the metric name from the member name. When the member name is "value", the operation will use the name of the component.
When the brief parameter is provided, it is set on the metric as if set_doc_brief() is used. The brief description can be obtained with get_doc_brief().
| Kind | Metric kind (Counter, CounterIncrement, or Gauge). |
| parent | Parent entity of the metric (optional). |
| brief | Description for metric (optional). |
| name | Name of metric (optional). |