Utopia 2
Framework for studying models of complex & adaptive systems.
|
The entity traits struct gathers types to be used for specializing an entity. More...
#include <entity.hh>
Public Types | |
using | State = StateType |
Type of the entitys' state container. | |
using | Tags = EntityTags |
Custom entity tags. | |
template<class EntityContainerType > | |
using | CustomLinks = CustomLinkContainers< EntityContainerType > |
Template template parameter to specify type of custom links. | |
Static Public Attributes | |
static constexpr Update | mode = update_mode |
Whether the entitys should be synchronously updated. | |
static constexpr bool | use_default_state_constructor = use_def_state_constr |
Whether to use the default constructor for constructing a entity state. | |
The entity traits struct gathers types to be used for specializing an entity.
StateType | Type of the entitys' state container |
update_mode | The update mode of the entities. Use Update::manual for choosing the update mode flexibly when calling apply_rule. |
use_def_state_constr | Whether to use the default constructor to construct the entity's state. If false (default), a constructor with DataIO::Config& as argument has to be implemented for StateType. |
Tags | Custom entity tags |
CustomLinkContainers | Template template parameter to specify the types of custom links. This construct is specialized with the actual type of the entity container by the EntityManager, so there's no need to know the entity container type beforehand. To define your own custom links, pass a template to a struct whose members are containers of the objects you want to link to. |
using Utopia::EntityTraits< StateType, update_mode, use_def_state_constr, EntityTags, CustomLinkContainers >::CustomLinks = CustomLinkContainers<EntityContainerType> |
Template template parameter to specify type of custom links.
using Utopia::EntityTraits< StateType, update_mode, use_def_state_constr, EntityTags, CustomLinkContainers >::State = StateType |
Type of the entitys' state container.
using Utopia::EntityTraits< StateType, update_mode, use_def_state_constr, EntityTags, CustomLinkContainers >::Tags = EntityTags |
Custom entity tags.
|
staticconstexpr |
Whether the entitys should be synchronously updated.
|
staticconstexpr |
Whether to use the default constructor for constructing a entity state.