1#ifndef UTOPIA_CORE_GRAPH_ENTITY_HH
2#define UTOPIA_CORE_GRAPH_ENTITY_HH
21 template<
class>
class CustomLinkContainers=NoCustomLinks>
26 CustomLinkContainers>;
39template<
typename Traits>
41 public Entity<GraphEntity<Traits>, Traits>
48 using State =
typename Traits::State;
74 std::swap(this->state,
ge.state);
An entity is a slightly specialized state container.
Definition entity.hh:83
Traits Traits
The traits of this entity.
Definition entity.hh:90
CustomLinkContainers & custom_links()
Return reference to custom link containers.
Definition entity.hh:139
A graph entity is a slightly specialized state container.
Definition entity.hh:42
IndexType get_id_counter()
Get the id counter.
Definition entity.hh:80
GraphEntity & operator=(GraphEntity ge)
Copy-assign a graph entity.
Definition entity.hh:73
GraphEntity(const State &initial_state)
Construct a graph entity with initial state.
Definition entity.hh:62
typename Traits::State State
The type of the state.
Definition entity.hh:48
GraphEntity(const GraphEntity &ge)
Copy-construct a graph entity.
Definition entity.hh:68
GraphEntity()
Construct a graph entity with empty initial state.
Definition entity.hh:56
static IndexType id_counter
The id counter that counts how many graph entities exist.
Definition entity.hh:52
Container select_entities(const Manager &mngr, const DataIO::Config &sel_cfg)
Select entities according to parameters specified in a configuration.
Definition select.hh:213
@ manual
User chooses update type when calling apply_rule()
std::size_t IndexType
Type for indices, i.e. values used for container indexing, agent IDs, ...
Definition types.hh:40
The entity traits struct gathers types to be used for specializing an entity.
Definition entity.hh:49