Nemo  2.3.56
Simulate forward-in-time genetic evolution in a spatially explicit, individual-based stochastic simulator
TraitPrototype Class Referenceabstract

TTrait setter. More...

#include <ttrait.h>

+ Inheritance diagram for TraitPrototype:
+ Collaboration diagram for TraitPrototype:

Public Member Functions

virtual void reset ()=0
 Called at the end of a simulation to reset the Traits' prototypes (e.g. More...
 
virtual TTraithatch ()=0
 Creates the trait of which it is the prototype, called by IndFactory::makePrototype(). More...
 
virtual TraitPrototypeclone ()=0
 Returns a copy of itself. More...
 
virtual trait_t get_type () const =0
 Type accessor. More...
 
virtual void set_index (int idx)
 Sets the traits index. More...
 
virtual int get_index ()
 Index getter. More...
 
- Public Member Functions inherited from StorableComponent
virtual void store_data (BinaryStorageBuffer *saver)=0
 Interface to store the component data (e.g. gene values) into a binary buffer. More...
 
virtual bool retrieve_data (BinaryStorageBuffer *reader)=0
 Interface to retrieve the same data from the binary buffer. More...
 
virtual ~StorableComponent ()
 
- Public Member Functions inherited from SimComponent
 SimComponent ()
 
virtual ~SimComponent ()
 
virtual void loadFileServices (FileServices *loader)=0
 Loads the component's FileHandler onto the FileServices. More...
 
virtual void loadStatServices (StatServices *loader)=0
 Loads the component's StatHandler onto the StatServices. More...
 
virtual void loadUpdaters (UpdaterServices *loader)
 Loads the parameters and component updater onto the updater manager. More...
 
virtual bool setParameters ()=0
 Default interface needed to initialize the component's variables from its input parameters value. More...
 
virtual void set_paramset (ParamSet *paramset)
 Sets the ParamSet member. More...
 
virtual void set_paramset (std::string name, bool required, SimComponent *owner)
 Sets a new ParamSet and name it. More...
 
virtual void set_paramsetFromCopy (const ParamSet &PSet)
 Reset the set of parameters from a another set. More...
 
virtual ParamSetget_paramset ()
 ParamSet accessor. More...
 
virtual void add_parameter (Param *param)
 Interface to add a parameter to the set. More...
 
virtual void add_parameter (std::string Name, param_t Type, bool isRequired, bool isBounded, double low_bnd, double up_bnd)
 Interface to add a parameter to the set. More...
 
virtual void add_parameter (std::string Name, param_t Type, bool isRequired, bool isBounded, double low_bnd, double up_bnd, ParamUpdaterBase *updater)
 Interface to add a parameter and its updater to the set. More...
 
virtual Paramget_parameter (std::string name)
 Param getter. More...
 
virtual double get_parameter_value (std::string name)
 Param value getter. More...
 
virtual string get_name ()
 Returnd the name of the ParamSet, i.e. More...
 
virtual bool has_parameter (std::string name)
 Param getter. More...
 
virtual bool resetParameterFromSource (std::string param, SimComponent *cmpt)=0
 

Protected Attributes

int _index
 The trait index in the Individual traits table. More...
 
- Protected Attributes inherited from SimComponent
ParamSet_paramSet
 The parameters container. More...
 

Detailed Description

TTrait setter.

Encapsulates the methods to set the traits parameters and to generate traits. Also stores the position of the trait in the individuals trait table. This class manages the file and stat handlers through its inheritance of the SimComponent interface.

Member Function Documentation

◆ clone()

virtual TraitPrototype * TraitPrototype::clone ( )
pure virtual

Returns a copy of itself.

Note: calls the copy constructor and only copy the parameters state.

Implemented in TProtoBDMI, TProtoDeletMutations_bitstring, TProtoDispersal, TProtoNeutralGenes, TProtoQuanti, and TProtoWolbachia.

◆ get_index()

virtual int TraitPrototype::get_index ( )
inlinevirtual

Index getter.

146{return _index;}
int _index
The trait index in the Individual traits table.
Definition: ttrait.h:129

References _index.

◆ get_type()

virtual trait_t TraitPrototype::get_type ( ) const
pure virtual

◆ hatch()

virtual TTrait * TraitPrototype::hatch ( )
pure virtual

Creates the trait of which it is the prototype, called by IndFactory::makePrototype().

Implemented in TProtoBDMI, TProtoDeletMutations_bitstring, TProtoDispersal, TProtoNeutralGenes, TProtoQuanti, and TProtoWolbachia.

◆ reset()

virtual void TraitPrototype::reset ( )
pure virtual

Called at the end of a simulation to reset the Traits' prototypes (e.g.

unregister genetic maps). Called by IndFactory::clearPrototype.

Implemented in TProtoDeletMutations_bitstring, TProtoDispersal, TProtoNeutralGenes, TProtoQuanti, TTProtoWithMap, and TProtoWolbachia.

◆ set_index()

virtual void TraitPrototype::set_index ( int  idx)
inlinevirtual

Sets the traits index.

Called by IndFactory::makePrototype().

144{_index = idx;}

References _index.

Member Data Documentation

◆ _index

int TraitPrototype::_index
protected

The trait index in the Individual traits table.

Referenced by get_index(), and set_index().


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

Generated for Nemo v2.3.56 by  doxygen 1.9.0 -- Nemo is hosted on  Download Nemo

Locations of visitors to this page
Catalogued on GSR