Nemo  2.4.2
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 int get_phenotype_dimension ()
 Returns the dimension of the phenotype of the trait (size of the array accessed with TTrait::getValue() More...
 
virtual int get_allele_number ()
 Returns the number of allele per locus. More...
 
virtual int get_locus_number ()
 Returns the number of locus. More...
 
virtual bool is_mappable ()
 Checks if the trait is mappable, i.e., if the loci can be placed on a genetic map. More...
 
virtual bool is_mapped ()
 Checks if the trait's loci are placed on a genetic map. More...
 
virtual vector< unsigned int > get_locus_map_positions ()
 Returns the map positions of the loci in vector. More...
 
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 set_index (int idx)
 Sets the traits index. More...
 
virtual int get_index ()
 Index getter. More...
 
- Public Member Functions inherited from StorableComponent
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 ( )
40 : _transmit_rate(0), _stats(0)
41 {
42  set_paramset("wolbachia", false, this);
43  add_parameter("wolbachia_transmission_rate",DBL,true,false,0,1);
44 }
virtual void set_paramset(ParamSet *paramset)
Sets the ParamSet member.
Definition: simcomponent.h:84
virtual void add_parameter(Param *param)
Interface to add a parameter to the set.
Definition: simcomponent.h:110
double _transmit_rate
Definition: ttwolbachia.h:159
TTWolbachiaSH * _stats
Definition: ttwolbachia.h:160
@ DBL
Definition: types.h:76

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)
50 {
51  _paramSet = new ParamSet( *(TP._paramSet) ) ;
52 }
Parameters container, implemented in each SimComponent.
Definition: param.h:214
ParamSet * _paramSet
The parameters container.
Definition: simcomponent.h:46

References SimComponent::_paramSet.

◆ ~TProtoWolbachia()

TProtoWolbachia::~TProtoWolbachia ( )
57 {
58  if(_stats != NULL) delete _stats;
59 }

References _stats.

Member Function Documentation

◆ clone()

virtual TProtoWolbachia* TProtoWolbachia::clone ( )
inlinevirtual

Implements TraitPrototype.

132 {return new TProtoWolbachia(*this);}
TProtoWolbachia()
Definition: ttwolbachia.cc:39

References TProtoWolbachia().

◆ get_allele_number()

virtual int TProtoWolbachia::get_allele_number ( )
inlinevirtual

Returns the number of allele per locus.

Implements TraitPrototype.

138 {return 2;}

◆ get_locus_map_positions()

virtual vector< unsigned int > TProtoWolbachia::get_locus_map_positions ( )
inlinevirtual

Returns the map positions of the loci in vector.

Implements TraitPrototype.

146 {return vector<unsigned int>(1,0);}

◆ get_locus_number()

virtual int TProtoWolbachia::get_locus_number ( )
inlinevirtual

Returns the number of locus.

Implements TraitPrototype.

140 {return 1;}

◆ get_phenotype_dimension()

virtual int TProtoWolbachia::get_phenotype_dimension ( )
inlinevirtual

Returns the dimension of the phenotype of the trait (size of the array accessed with TTrait::getValue()

Implements TraitPrototype.

136 {return 1;}

◆ get_type()

virtual trait_t TProtoWolbachia::get_type ( ) const
inlinevirtual

Implements TraitPrototype.

134 {return WOLB;}
#define WOLB
Definition: types.h:71

References WOLB.

◆ hatch()

virtual TTWolbachia* TProtoWolbachia::hatch ( )
inlinevirtual

Implements TraitPrototype.

126  {
127  TTWolbachia* new_trait = new TTWolbachia();
128  new_trait->set_transmit_rate(_transmit_rate);
129  return new_trait;
130  }
Trait used to study the dynamics of spread of Wolbachia, an endosymbiotic parasite causing cytoplasmi...
Definition: ttwolbachia.h:52
void set_transmit_rate(double val)
Definition: ttwolbachia.h:68

References _transmit_rate, and TTWolbachia::set_transmit_rate().

◆ init()

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

◆ is_mappable()

virtual bool TProtoWolbachia::is_mappable ( )
inlinevirtual

Checks if the trait is mappable, i.e., if the loci can be placed on a genetic map.

Implements TraitPrototype.

142 {return false;}

◆ is_mapped()

virtual bool TProtoWolbachia::is_mapped ( )
inlinevirtual

Checks if the trait's loci are placed on a genetic map.

Implements TraitPrototype.

144 {return false;}

◆ loadFileServices()

virtual void TProtoWolbachia::loadFileServices ( FileServices loader)
inlinevirtual

Implements SimComponent.

152 {}

◆ loadStatServices()

void TProtoWolbachia::loadStatServices ( StatServices loader)
virtual

Implements SimComponent.

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

References _stats, and StatServices::attach().

◆ reset()

virtual void TProtoWolbachia::reset ( )
inlinevirtual

Implements TraitPrototype.

121 {}

◆ resetParameterFromSource()

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

Implements SimComponent.

154 {return false;}

◆ retrieve_data()

virtual bool TProtoWolbachia::retrieve_data ( BinaryStorageBuffer reader)
inlinevirtual

Implements StorableComponent.

150 {return true;}

◆ setParameters()

virtual bool TProtoWolbachia::setParameters ( )
inlinevirtual

Implements SimComponent.

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

References _transmit_rate, and SimComponent::get_parameter_value().

◆ store_data()

virtual void TProtoWolbachia::store_data ( BinaryStorageBuffer saver)
inlinevirtual

Implements StorableComponent.

149 {/*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.4.2 by  doxygen 1.9.1

Catalogued on GSR