1 #ifndef UTOPIA_CORE_GRAPH_ENTITY_HH
2 #define UTOPIA_CORE_GRAPH_ENTITY_HH
6 #include "../entity.hh"
19 template<
typename StateType,
20 typename GraphEntityTags=EmptyTag,
21 template<
class>
class CustomLinkContainers=NoCustomLinks>
26 CustomLinkContainers>;
39 template<
typename Traits>
41 public Entity<GraphEntity<Traits>, Traits>
48 using State =
typename Traits::State;
An entity is a slightly specialized state container.
Definition: entity.hh:83
CustomLinkContainers & custom_links()
Return reference to custom link containers.
Definition: entity.hh:139
Traits Traits
The traits of this entity.
Definition: entity.hh:90
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(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
GraphEntity & operator=(GraphEntity ge)
Copy-assign a graph entity.
Definition: entity.hh:73
static IndexType id_counter
The id counter that counts how many graph entities exist.
Definition: entity.hh:52
void swap(WriteTask< BGB, DW, DB, AWG, AWD > &lhs, WriteTask< BGB, DW, DB, AWG, AWD > &rhs)
Swaps the state of lhs and rhs.
Definition: write_task.hh:240
@ 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