Module property_list

Module property_list 

Source
Expand description

This module supports two user-facing patterns:

  1. initializing a new entity with ContextEntitiesExt::add_entity, and
  2. specifying strata for value-change counting APIs such as ContextEntitiesExt::track_periodic_value_change_counts.

For add_entity, pass either:

  • the entity type directly, such as Person, to use default property values, or
  • with! to provide one or more initial property values, such as with!(Person, Age(25), InfectionStatus::Infected).

For value-change counting APIs, use tuple types in the generic parameter list, such as (InfectionStatus,) or (AgeGroup, InfectionStatus).

In both cases, all properties must belong to the same entity, and property values must be distinct.

Traitsยง

PropertyInitializationList
Values accepted by ContextEntitiesExt::add_entity.
PropertyList