fpmas 1.6
Static Public Attributes | Protected Member Functions | List of all members
fpmas::model::SpatialAgentBuilderBase< CellType, MappingCellType > Class Template Reference

#include <spatial_model.h>

Inheritance diagram for fpmas::model::SpatialAgentBuilderBase< CellType, MappingCellType >:
Inheritance graph
[legend]
Collaboration diagram for fpmas::model::SpatialAgentBuilderBase< CellType, MappingCellType >:
Collaboration graph
[legend]

Static Public Attributes

static const api::model::GroupId TEMP_GROUP_ID = -2
 

Protected Member Functions

void build_agents (api::model::SpatialModel< CellType > &model, api::model::GroupList groups, api::model::SpatialAgentFactory< CellType > &factory, api::model::SpatialAgentMapping< MappingCellType > &agent_mapping)
 
void build_agents (api::model::SpatialModel< CellType > &model, api::model::GroupList groups, std::function< api::model::SpatialAgent< CellType > *()> factory, api::model::SpatialAgentMapping< MappingCellType > &agent_mapping)
 

Additional Inherited Members

- Public Member Functions inherited from fpmas::api::model::SpatialAgentBuilder< CellType, MappingCellType >
virtual void build (SpatialModel< CellType > &model, GroupList groups, SpatialAgentFactory< CellType > &factory, SpatialAgentMapping< MappingCellType > &agent_mapping)=0
 
virtual void build (SpatialModel< CellType > &model, GroupList groups, std::function< SpatialAgent< CellType > *()> factory, SpatialAgentMapping< MappingCellType > &agent_mapping)=0
 

Detailed Description

template<typename CellType, typename MappingCellType>
class fpmas::model::SpatialAgentBuilderBase< CellType, MappingCellType >

Base implementation of an api::model::SpatialAgentBuilder.

The build_agents() methods implements the generic agent creation process.

Extensions must finalize the api::model::SpatialAgentBuilder implementation by implementing the build() methods, eventually using the provided build_agents() methods and adding model specific behaviors.

Template Parameters
CellTypefinal Cell type on which agents are moving
MappingCellTypeCell type used by the SpatialAgentMapping. MappingCellType must be a base of CellType.

Member Function Documentation

◆ build_agents() [1/2]

template<typename CellType , typename MappingCellType >
void fpmas::model::SpatialAgentBuilderBase< CellType, MappingCellType >::build_agents ( api::model::SpatialModel< CellType > &  model,
api::model::GroupList  groups,
api::model::SpatialAgentFactory< CellType > &  factory,
api::model::SpatialAgentMapping< MappingCellType > &  agent_mapping 
)
protected

◆ build_agents() [2/2]

template<typename CellType , typename MappingCellType >
void fpmas::model::SpatialAgentBuilderBase< CellType, MappingCellType >::build_agents ( api::model::SpatialModel< CellType > &  model,
api::model::GroupList  groups,
std::function< api::model::SpatialAgent< CellType > *()>  factory,
api::model::SpatialAgentMapping< MappingCellType > &  agent_mapping 
)
protected

Member Data Documentation

◆ TEMP_GROUP_ID

template<typename CellType , typename MappingCellType >
const api::model::GroupId fpmas::model::SpatialAgentBuilderBase< CellType, MappingCellType >::TEMP_GROUP_ID = -2
static

FPMAS reserved group id used by the SpatialAgentBuilder temporary group used to build() agents.


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