Nemo  2.4.0
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 ( )
41 : _transmit_rate(0), _stats(0)
42 {
43  set_paramset("wolbachia", false, this);
44  add_parameter("wolbachia_transmission_rate",DBL,true,false,0,1);
45 }
virtual void set_paramset(ParamSet *paramset)
Sets the ParamSet member.
Definition: simcomponent.h:85
virtual void add_parameter(Param *param)
Interface to add a parameter to the set.
Definition: simcomponent.h:111
double _transmit_rate
Definition: ttwolbachia.h:160
TTWolbachiaSH * _stats
Definition: ttwolbachia.h:161
@ DBL
Definition: types.h:77

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

References SimComponent::_paramSet.

◆ ~TProtoWolbachia()

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

References _stats.

Member Function Documentation

◆ clone()

virtual TProtoWolbachia* TProtoWolbachia::clone ( )
inlinevirtual

Implements TraitPrototype.

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

References TProtoWolbachia().

◆ get_allele_number()

virtual int TProtoWolbachia::get_allele_number ( )
inlinevirtual

Returns the number of allele per locus.

Implements TraitPrototype.

139 {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.

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

◆ get_locus_number()

virtual int TProtoWolbachia::get_locus_number ( )
inlinevirtual

Returns the number of locus.

Implements TraitPrototype.

141 {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.

137 {return 1;}

◆ get_type()

virtual trait_t TProtoWolbachia::get_type ( ) const
inlinevirtual

Implements TraitPrototype.

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

References WOLB.

◆ hatch()

virtual TTWolbachia* TProtoWolbachia::hatch ( )
inlinevirtual

Implements TraitPrototype.

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

References _transmit_rate, and TTWolbachia::set_transmit_rate().

◆ init()

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

◆ 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.

143 {return false;}

◆ is_mapped()

virtual bool TProtoWolbachia::is_mapped ( )
inlinevirtual

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

Implements TraitPrototype.

145 {return false;}

◆ loadFileServices()

virtual void TProtoWolbachia::loadFileServices ( FileServices loader)
inlinevirtual

Implements SimComponent.

153 {}

◆ loadStatServices()

void TProtoWolbachia::loadStatServices ( StatServices loader)
virtual

Implements SimComponent.

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

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.

155 {return false;}

◆ retrieve_data()

virtual bool TProtoWolbachia::retrieve_data ( BinaryStorageBuffer reader)
inlinevirtual

Implements StorableComponent.

151 {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:142

References _transmit_rate, and SimComponent::get_parameter_value().

◆ store_data()

virtual void TProtoWolbachia::store_data ( BinaryStorageBuffer saver)
inlinevirtual

Implements StorableComponent.

150 {/*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.0 by  doxygen 1.9.1 -- Nemo is hosted on  Download Nemo

Locations of visitors to this page
Catalogued on GSR