FIMS  v0.9.3
Loading...
Searching...
No Matches
growth_base.hpp
Go to the documentation of this file.
1
11#ifndef POPULATION_DYNAMICS_GROWTH_BASE_HPP
12#define POPULATION_DYNAMICS_GROWTH_BASE_HPP
13
15
16namespace fims_popdy {
17
23template <typename Type>
25 // id_g is the ID of the instance of the growthBase class.
26 // this is like a memory tracker.
27 // Assigning each one its own ID is a way to keep track of
28 // all the instances of the growthBase class.
29 static uint32_t id_g;
35 this->id = GrowthBase::id_g++;
36 this->register_self(this->id);
37 }
38
39 virtual ~GrowthBase() {}
40
46 virtual const Type evaluate(int year, const double& a) = 0;
47};
48
49template <typename Type>
51
52} // namespace fims_popdy
53
54#endif /* POPULATION_DYNAMICS_GROWTH_BASE_HPP */
Definition of the FIMSObject structure.
The population dynamics of FIMS.
Definition catch_at_age.hpp:41
void clear_internal()
Clears the internal objects.
Definition rcpp_interface.hpp:236
void register_self(const uint32_t id)
Registers a FIMSObject instance with the memory tracker.
Definition model_object.hpp:35
FIMSObject struct that defines member types and returns the unique id.
Definition model_object.hpp:55
Base class for all growth functors.
Definition growth_base.hpp:24
static uint32_t id_g
Definition growth_base.hpp:29
GrowthBase()
Constructor.
Definition growth_base.hpp:34
virtual const Type evaluate(int year, const double &a)=0
Calculates the growth at the independent variable value.