FIMS  v0.11.0
Loading...
Searching...
No Matches
base.hpp
Go to the documentation of this file.
1
11#ifndef POPULATION_DYNAMICS_AGE_TO_LENGTH_CONVERSION_BASE_HPP
12#define POPULATION_DYNAMICS_AGE_TO_LENGTH_CONVERSION_BASE_HPP
13
14#include <cstddef>
15
18
19namespace fims_popdy {
20
25template <typename Type>
26struct AgeToLengthConversionBase : public fims_model_object::FIMSObject<Type> {
27 static uint32_t id_g;
28
29 AgeToLengthConversionBase() {
30 this->id = AgeToLengthConversionBase<Type>::id_g++;
31 }
32
33 virtual ~AgeToLengthConversionBase() {}
34
40 virtual bool IsActive() const = 0;
41
47 virtual bool PrepareForCurrentState() = 0;
48
57 size_t year, size_t age, fims::Vector<Type>& out_row) const = 0;
58};
59
60template <typename Type>
61uint32_t AgeToLengthConversionBase<Type>::id_g =
62 0;
63
64} // namespace fims_popdy
65
66#endif /* POPULATION_DYNAMICS_AGE_TO_LENGTH_CONVERSION_BASE_HPP */
Definition fims_vector.hpp:27
Establishes the FIMS Vector class.
Definition of the FIMSObject structure.
The population dynamics of FIMS.
Definition catch_at_age.hpp:45
FIMSObject struct that defines member types and returns the unique id.
Definition model_object.hpp:55
virtual bool IsActive() const =0
Returns whether this age-to-length conversion is active and valid for use.
virtual bool PrepareForCurrentState()=0
Prepare this age-to-length conversion for the current model state.
virtual bool BuildAgeToLengthConversionRow(size_t year, size_t age, fims::Vector< Type > &out_row) const =0
Builds the age-to-length conversion row for a given year and age.