Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
Loading...
Searching...
No Matches
Fauna::CreateHerbivoreCohort Class Reference

Function class constructing HerbivoreCohort objects. More...

#include <create_herbivore_cohort.h>

Inheritance diagram for Fauna::CreateHerbivoreCohort:
Fauna::CreateHerbivoreCommon

Public Member Functions

 CreateHerbivoreCohort (const std::shared_ptr< const Hft > hft, const std::shared_ptr< const Parameters > parameters)
 Constructor. More...
 
virtual HerbivoreCohort operator() (const double ind_per_km2, const int age_years, Sex sex) const
 Create a new object instance. More...
 
- Public Member Functions inherited from Fauna::CreateHerbivoreCommon
const Hftget_hft () const
 The herbivore functional type. More...
 
const Parametersget_params () const
 Global simulation parameters. More...
 

Additional Inherited Members

- Protected Member Functions inherited from Fauna::CreateHerbivoreCommon
 CreateHerbivoreCommon (const std::shared_ptr< const Hft > hft, const std::shared_ptr< const Parameters > parameters)
 Protected constructor. More...
 
double get_body_condition (const int age_days) const
 Fat mass per maximum fat mass. More...
 
- Protected Attributes inherited from Fauna::CreateHerbivoreCommon
const std::shared_ptr< const Hfthft
 
const std::shared_ptr< const Parametersparameters
 

Detailed Description

Function class constructing HerbivoreCohort objects.

Constructor & Destructor Documentation

◆ CreateHerbivoreCohort()

Fauna::CreateHerbivoreCohort::CreateHerbivoreCohort ( const std::shared_ptr< const Hft hft,
const std::shared_ptr< const Parameters parameters 
)
inline

Constructor.

Protected constructor.

Exceptions
std::invalid_argumentIf hft==NULL or parameters==NULL

Member Function Documentation

◆ operator()()

HerbivoreCohort CreateHerbivoreCohort::operator() ( const double  ind_per_km2,
const int  age_years,
Sex  sex 
) const
virtual

Create a new object instance.

Parameters
ind_per_km2Individual density of the new cohort.
age_yearsAge in years.
sexGender of the herbivore.
Returns
New object instance.
Exceptions
std::invalid_argumentif ind_per_km2<=0.0 or age_years<0

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