|
Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
|
Function object to feed herbivores. More...
#include <feed_herbivores.h>
Public Member Functions | |
| FeedHerbivores (DistributeForage *distribute_forage) | |
| Constructor. More... | |
| FeedHerbivores (FeedHerbivores const &)=delete | |
| Delete copy constructor because of pointer ownership. More... | |
| void | operator= (FeedHerbivores const &)=delete |
| Delete copy assignment because of pointer ownership. More... | |
| ~FeedHerbivores () | |
| Destructor. More... | |
| void | operator() (HabitatForage &available, const HerbivoreVector &herbivores) const |
| Feed the herbivores. More... | |
Private Attributes | |
| std::unique_ptr< DistributeForage > | distribute_forage |
Function object to feed herbivores.
| FeedHerbivores::FeedHerbivores | ( | DistributeForage * | distribute_forage | ) |
Constructor.
| distribute_forage | Strategy object for calculating the forage portions. This must be a newly created object. It will be owned by the FeedHerbivores object. |
| std::invalid_argument | If distribute_forage==NULL. |
|
delete |
Delete copy constructor because of pointer ownership.
| FeedHerbivores::~FeedHerbivores | ( | ) |
Destructor.
| void FeedHerbivores::operator() | ( | HabitatForage & | available, |
| const HerbivoreVector & | herbivores | ||
| ) | const |
Feed the herbivores.
| [in,out] | available | Available forage mass in the habitat. This will be reduced by the amount of eaten forage. |
| [in,out] | herbivores | Herbivore objects that are being fed by calling HerbivoreInterface::eat(). |
|
delete |
Delete copy assignment because of pointer ownership.
|
private |