Nemo  2.3.46
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)
- 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...

Private Attributes

double _transmit_rate

Additional Inherited Members

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

Detailed Description

Prototype of the Wolbachia trait.

Constructor & Destructor Documentation

TProtoWolbachia::TProtoWolbachia ( )

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

Referenced by clone().

42 : _transmit_rate(0), _stats(0)
43 {
44  set_paramset("wolbachia", false, this);
45  add_parameter("wolbachia_transmission_rate",DBL,true,false,0,1);
46 }
double _transmit_rate
Definition: ttwolbachia.h:145
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
Definition: types.h:78
TTWolbachiaSH * _stats
Definition: ttwolbachia.h:146
TProtoWolbachia::TProtoWolbachia ( const TProtoWolbachia TP)

References SimComponent::_paramSet.

52 {
53  _paramSet = new ParamSet( *(TP._paramSet) ) ;
54 }
double _transmit_rate
Definition: ttwolbachia.h:145
ParamSet * _paramSet
The parameters container.
Definition: simcomponent.h:48
Parameters container, implemented in each SimComponent.
Definition: param.h:203
TTWolbachiaSH * _stats
Definition: ttwolbachia.h:146
TProtoWolbachia::~TProtoWolbachia ( )

References _stats.

59 {
60  if(_stats != NULL) delete _stats;
61 }
TTWolbachiaSH * _stats
Definition: ttwolbachia.h:146

Member Function Documentation

virtual TProtoWolbachia* TProtoWolbachia::clone ( )

Implements TraitPrototype.

References TProtoWolbachia().

133 {return new TProtoWolbachia(*this);}
virtual trait_t TProtoWolbachia::get_type ( ) const

Implements TraitPrototype.

References WOLB.

135 {return WOLB;}
#define WOLB
Definition: types.h:73
virtual TTWolbachia* TProtoWolbachia::hatch ( )

Implements TraitPrototype.

References _transmit_rate, and TTWolbachia::set_transmit_rate().

127  {
128  TTWolbachia* new_trait = new TTWolbachia();
129  new_trait->set_transmit_rate(_transmit_rate);
130  return new_trait;
131  }
double _transmit_rate
Definition: ttwolbachia.h:145
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:70
virtual void TProtoWolbachia::init ( )
121 {}
virtual void TProtoWolbachia::loadFileServices ( FileServices loader)

Implements SimComponent.

140 {}
void TProtoWolbachia::loadStatServices ( StatServices loader)

Implements SimComponent.

References _stats, and StatServices::attach().

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

Implements TraitPrototype.

122 {}
virtual bool TProtoWolbachia::retrieve_data ( BinaryStorageBuffer reader)

Implements StorableComponent.

138 {return true;}
virtual bool TProtoWolbachia::setParameters ( )

Implements SimComponent.

References _transmit_rate, and SimComponent::get_parameter_value().

124  { _transmit_rate = get_parameter_value("wolbachia_transmission_rate"); return true;}
double _transmit_rate
Definition: ttwolbachia.h:145
virtual double get_parameter_value(std::string name)
Param value getter.
Definition: simcomponent.h:143
virtual void TProtoWolbachia::store_data ( BinaryStorageBuffer saver)

Implements StorableComponent.

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

Member Data Documentation

TTWolbachiaSH* TProtoWolbachia::_stats
double TProtoWolbachia::_transmit_rate

Referenced by hatch(), and setParameters().

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

Generated for Nemo v2.3.0 by  doxygen 1.8.8 --
Catalogued on GSR