Flecs v4.0
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 |
Event builder interface. More... | |
struct | flecs::metrics |
Functions | |
template<typename... Args> | |
flecs::metric_builder | flecs::world::metric (Args &&... args) const |
Create metric. | |
template<typename Kind > | |
untyped_component & | flecs::component< T >::metric (flecs::entity_t parent=0, const char *brief=nullptr, const char *name=nullptr) |
Register member as 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 member as 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). |