Utopia
2
Framework for studying models of complex & adaptive systems.
|
A graph entity is a slightly specialized state container. More...
#include <entity.hh>
Public Types | |
using | Self = GraphEntity< Traits > |
The type of this GraphEntity. More... | |
using | State = typename Traits::State |
The type of the state. More... | |
Public Types inherited from Utopia::Entity< GraphEntity< Traits >, Traits > | |
using | Traits = Traits |
The traits of this entity. More... | |
using | Self = Entity< GraphEntity< Traits >, Traits > |
The type of this entity. More... | |
using | State = typename Traits::State |
The type of the state of this entity. More... | |
using | Tags = typename Traits::Tags |
The tags associated with this entity. More... | |
using | CustomLinkContainers = typename Traits::template CustomLinks< EntityContainer< GraphEntity< Traits > > > |
A construct that has as members containers for custom-linked entities. More... | |
Public Member Functions | |
GraphEntity () | |
Construct a graph entity with empty initial state. More... | |
GraphEntity (const State &initial_state) | |
Construct a graph entity with initial state. More... | |
GraphEntity (const GraphEntity &ge) | |
Copy-construct a graph entity. More... | |
GraphEntity & | operator= (GraphEntity ge) |
Copy-assign a graph entity. More... | |
IndexType | get_id_counter () |
Get the id counter. More... | |
Public Member Functions inherited from Utopia::Entity< GraphEntity< Traits >, Traits > | |
Entity (const IndexType id, const State initial_state) | |
Construct an entity. More... | |
const IndexType & | id () const |
Return const reference to entity ID. More... | |
CustomLinkContainers & | custom_links () |
Return reference to custom link containers. More... | |
const CustomLinkContainers & | custom_links () const |
Return const reference to custom link containers. More... | |
Static Private Attributes | |
static IndexType | id_counter = 0 |
The id counter that counts how many graph entities exist. More... | |
Additional Inherited Members | |
Static Public Attributes inherited from Utopia::Entity< GraphEntity< Traits >, Traits > | |
static constexpr Update | mode |
Whether this entity is updated synchronously. More... | |
A graph entity is a slightly specialized state container.
It can be extended with the use of tags and can be associated with so-called "custom links". These specializations are carried into the graph entity by means of the GraphEntityTraits struct. A graph entity should be used as the base class for a Vertex and an Edge that is placed on a boost::graph graph object.
Traits | Valid Utopia::EntityTraits, describing the type of graph entity |
using Utopia::GraphEntity< Traits >::Self = GraphEntity<Traits> |
The type of this GraphEntity.
using Utopia::GraphEntity< Traits >::State = typename Traits::State |
The type of the state.
|
inline |
Construct a graph entity with empty initial state.
|
inline |
Construct a graph entity with initial state.
|
inline |
Copy-construct a graph entity.
|
inline |
Get the id counter.
|
inline |
Copy-assign a graph entity.
|
inlinestaticprivate |
The id counter that counts how many graph entities exist.