Utopia  2
Framework for studying models of complex & adaptive systems.
Public Types | Public Member Functions | Static Private Attributes | List of all members
Utopia::GraphEntity< Traits > Class Template Reference

A graph entity is a slightly specialized state container. More...

#include <entity.hh>

Inheritance diagram for Utopia::GraphEntity< Traits >:
Inheritance graph
[legend]
Collaboration diagram for Utopia::GraphEntity< Traits >:
Collaboration graph
[legend]

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...
 
GraphEntityoperator= (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 IndexTypeid () const
 Return const reference to entity ID. More...
 
CustomLinkContainerscustom_links ()
 Return reference to custom link containers. More...
 
const CustomLinkContainerscustom_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...
 

Detailed Description

template<typename Traits>
class Utopia::GraphEntity< Traits >

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.

Template Parameters
TraitsValid Utopia::EntityTraits, describing the type of graph entity

Member Typedef Documentation

◆ Self

template<typename Traits >
using Utopia::GraphEntity< Traits >::Self = GraphEntity<Traits>

The type of this GraphEntity.

◆ State

template<typename Traits >
using Utopia::GraphEntity< Traits >::State = typename Traits::State

The type of the state.

Constructor & Destructor Documentation

◆ GraphEntity() [1/3]

template<typename Traits >
Utopia::GraphEntity< Traits >::GraphEntity ( )
inline

Construct a graph entity with empty initial state.

◆ GraphEntity() [2/3]

template<typename Traits >
Utopia::GraphEntity< Traits >::GraphEntity ( const State initial_state)
inline

Construct a graph entity with initial state.

◆ GraphEntity() [3/3]

template<typename Traits >
Utopia::GraphEntity< Traits >::GraphEntity ( const GraphEntity< Traits > &  ge)
inline

Copy-construct a graph entity.

Member Function Documentation

◆ get_id_counter()

template<typename Traits >
IndexType Utopia::GraphEntity< Traits >::get_id_counter ( )
inline

Get the id counter.

◆ operator=()

template<typename Traits >
GraphEntity& Utopia::GraphEntity< Traits >::operator= ( GraphEntity< Traits ge)
inline

Copy-assign a graph entity.

Member Data Documentation

◆ id_counter

template<typename Traits >
IndexType Utopia::GraphEntity< Traits >::id_counter = 0
inlinestaticprivate

The id counter that counts how many graph entities exist.


The documentation for this class was generated from the following file: