Nemo
2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
|
Class to manage the simulation components and prototypes. More...
#include <basicsimulation.h>
Public Member Functions | |
ComponentManager () | |
~ComponentManager () | |
void | build_component_list () |
Clears and builds the list of all components from the lists of trait prototype templates and life cycle event templates. More... | |
void | add_component (SimComponent *cmpt) |
Push a component at the back of the component list. More... | |
void | add_trait (TraitPrototype *trait) |
Add a trait prototype to the template and component lists. More... | |
void | add_LCE (LifeCycleEvent *event) |
Add a life cycle event to the template and component lists. More... | |
TraitPrototype * | get_trait (string name) |
Search for component with "name" in the trait prototype list. More... | |
LifeCycleEvent * | get_LCE (string name) |
Search for component with "name" in the life cycle events list. More... | |
Protected Attributes | |
list< SimComponent * > | _components |
List of all the simulation components. More... | |
list< TraitPrototype * > | _TTrait_Templates |
List of all trait prototypes of the simulation, a subset of _components list. More... | |
list< LifeCycleEvent * > | _LCE_Templates |
List of all the life-cycle events of the simulation, a subset of _components list. More... | |
Class to manage the simulation components and prototypes.
This class stores and provides accessors to the simulation components. It also stores the trait prototype and life cycle event template instances.
|
inline |
|
inline |
|
inline |
Push a component at the back of the component list.
References _components.
|
inline |
Add a life cycle event to the template and component lists.
References _components, and _LCE_Templates.
Referenced by SIMenv::loadDefaultComponents(), and SimBuilder::SimBuilder().
|
inline |
Add a trait prototype to the template and component lists.
References _components, and _TTrait_Templates.
Referenced by SIMenv::loadDefaultComponents(), and SimBuilder::SimBuilder().
void ComponentManager::build_component_list | ( | ) |
Clears and builds the list of all components from the lists of trait prototype templates and life cycle event templates.
References _components, _LCE_Templates, and _TTrait_Templates.
LifeCycleEvent * ComponentManager::get_LCE | ( | string | name | ) |
Search for component with "name" in the life cycle events list.
References _LCE_Templates.
Referenced by SimRunner::Replicate_LOOP().
TraitPrototype * ComponentManager::get_trait | ( | string | name | ) |
Search for component with "name" in the trait prototype list.
References _TTrait_Templates.
|
protected |
List of all the simulation components.
Referenced by add_component(), add_LCE(), add_trait(), SimRunner::attach_pop(), ParamManager::build_allParams(), build_component_list(), and SimBuilder::~SimBuilder().
|
protected |
List of all the life-cycle events of the simulation, a subset of _components list.
Referenced by add_LCE(), build_component_list(), SimBuilder::build_LifeCycle(), get_LCE(), SimBuilder::SimBuilder(), and SimBuilder::~SimBuilder().
|
protected |
List of all trait prototypes of the simulation, a subset of _components list.
Referenced by add_trait(), build_component_list(), SimBuilder::build_currentTraits(), get_trait(), SimBuilder::SimBuilder(), and SimBuilder::~SimBuilder().