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

Prototype of the Wolbachia trait. More...

#include <ttwolbachia.h>

+ Inheritance diagram for TProtoWolbachia:
+ Collaboration diagram for TProtoWolbachia:

Public Member Functions

 TProtoWolbachia ()
 
 TProtoWolbachia (const TProtoWolbachia &)
 
 ~TProtoWolbachia ()
 
virtual void init ()
 
virtual void reset ()
 
virtual bool setParameters ()
 
virtual TTWolbachiahatch ()
 
virtual TProtoWolbachiaclone ()
 
virtual trait_t get_type () const
 
virtual void store_data (BinaryStorageBuffer *saver)
 
virtual bool retrieve_data (BinaryStorageBuffer *reader)
 
virtual void loadFileServices (FileServices *loader)
 
virtual void loadStatServices (StatServices *loader)
 
virtual bool resetParameterFromSource (std::string param, SimComponent *cmpt)
 
- Public Member Functions inherited from TraitPrototype
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 loadUpdaters (UpdaterServices *loader)
 Loads the parameters and component updater onto the updater manager. 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...
 

Private Attributes

double _transmit_rate
 
TTWolbachiaSH_stats
 

Additional Inherited Members

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

Detailed Description

Prototype of the Wolbachia trait.

Constructor & Destructor Documentation

◆ TProtoWolbachia() [1/2]

TProtoWolbachia::TProtoWolbachia ( )
43{
44 set_paramset("wolbachia", false, this);
45 add_parameter("wolbachia_transmission_rate",DBL,true,false,0,1);
46}
virtual void set_paramset(ParamSet *paramset)
Sets the ParamSet member.
Definition: simcomponent.h:86
virtual void add_parameter(Param *param)
Interface to add a parameter to the set.
Definition: simcomponent.h:112
double _transmit_rate
Definition: ttwolbachia.h:147
TTWolbachiaSH * _stats
Definition: ttwolbachia.h:148
@ DBL
Definition: types.h:78

References SimComponent::add_parameter(), DBL, and SimComponent::set_paramset().

Referenced by clone().

+ Here is the caller graph for this function:

◆ TProtoWolbachia() [2/2]

TProtoWolbachia::TProtoWolbachia ( const TProtoWolbachia TP)
52{
53 _paramSet = new ParamSet( *(TP._paramSet) ) ;
54}
Parameters container, implemented in each SimComponent.
Definition: param.h:206
ParamSet * _paramSet
The parameters container.
Definition: simcomponent.h:48

References SimComponent::_paramSet.

◆ ~TProtoWolbachia()

TProtoWolbachia::~TProtoWolbachia ( )
59{
60 if(_stats != NULL) delete _stats;
61}

References _stats.

Member Function Documentation

◆ clone()

virtual TProtoWolbachia * TProtoWolbachia::clone ( )
inlinevirtual

Implements TraitPrototype.

133{return new TProtoWolbachia(*this);}
TProtoWolbachia()
Definition: ttwolbachia.cc:41

References TProtoWolbachia().

◆ get_type()

virtual trait_t TProtoWolbachia::get_type ( ) const
inlinevirtual

Implements TraitPrototype.

135{return WOLB;}
#define WOLB
Definition: types.h:73

References WOLB.

◆ hatch()

virtual TTWolbachia * TProtoWolbachia::hatch ( )
inlinevirtual

Implements TraitPrototype.

127 {
128 TTWolbachia* new_trait = new TTWolbachia();
130 return new_trait;
131 }
Trait used to study the dynamics of spread of Wolbachia, an endosymbiotic parasite causing cytoplasmi...
Definition: ttwolbachia.h:54
void set_transmit_rate(double val)
Definition: ttwolbachia.h:70

References _transmit_rate, and TTWolbachia::set_transmit_rate().

◆ init()

virtual void TProtoWolbachia::init ( )
inlinevirtual
121{}

◆ loadFileServices()

virtual void TProtoWolbachia::loadFileServices ( FileServices loader)
inlinevirtual

Implements SimComponent.

140{}

◆ loadStatServices()

void TProtoWolbachia::loadStatServices ( StatServices loader)
virtual

Implements SimComponent.

66{
67 if(_stats != NULL)
68 delete _stats;
69 _stats = new TTWolbachiaSH(this);
70 loader->attach(_stats);
71}
virtual void attach(Handler *H)
attach the StatHandler to the current list (_statHandlers) of the StatServices
Definition: statservices.cc:177
StatHandler of the Wolbachia trait.
Definition: ttwolbachia.h:157

References _stats, and StatServices::attach().

◆ reset()

virtual void TProtoWolbachia::reset ( )
inlinevirtual

Implements TraitPrototype.

122{}

◆ resetParameterFromSource()

virtual bool TProtoWolbachia::resetParameterFromSource ( std::string  param,
SimComponent cmpt 
)
inlinevirtual

Implements SimComponent.

142{return false;}

◆ retrieve_data()

virtual bool TProtoWolbachia::retrieve_data ( BinaryStorageBuffer reader)
inlinevirtual

Implements StorableComponent.

138{return true;}

◆ setParameters()

virtual bool TProtoWolbachia::setParameters ( )
inlinevirtual

Implements SimComponent.

124 { _transmit_rate = get_parameter_value("wolbachia_transmission_rate"); return true;}
virtual double get_parameter_value(std::string name)
Param value getter.
Definition: simcomponent.h:143

References _transmit_rate, and SimComponent::get_parameter_value().

◆ store_data()

virtual void TProtoWolbachia::store_data ( BinaryStorageBuffer saver)
inlinevirtual

Implements StorableComponent.

137{/*we have nothing to save...*/}

Member Data Documentation

◆ _stats

TTWolbachiaSH* TProtoWolbachia::_stats
private

◆ _transmit_rate

double TProtoWolbachia::_transmit_rate
private

Referenced by hatch(), and setParameters().


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

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