Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
Loading...
Searching...
No Matches
population_interface.h
Go to the documentation of this file.
1// SPDX-FileCopyrightText: 2020 W. Traylor <wolfgang.traylor@senckenberg.de>
2//
3// SPDX-License-Identifier: LGPL-3.0-or-later
4
11#ifndef FAUNA_POPULATION_INTERFACE_H
12#define FAUNA_POPULATION_INTERFACE_H
13
14#include "herbivore_vector.h"
15
16namespace Fauna {
18
31
33
35
40 virtual void create_offspring(const double ind_per_km2) = 0;
41
43
44 virtual void establish() = 0;
45
47 virtual const double get_ind_per_km2() const;
48
50 virtual const double get_kg_per_km2() const;
51
53
60 virtual ConstHerbivoreVector get_list() const = 0;
61
64
66 virtual void kill_all();
67
69
76 virtual void kill_nonviable() = 0;
77
79
80 virtual void purge_of_dead() = 0;
81};
82
83} // namespace Fauna
84
85#endif // FAUNA_POPULATION_INTERFACE_H
Type definitions of vectors of herbivore pointers.
Definition: average.h:16
std::vector< HerbivoreInterface * > HerbivoreVector
A list of herbivore interface pointers.
Definition: herbivore_vector.h:20
std::vector< const HerbivoreInterface * > ConstHerbivoreVector
A list of read-only herbivore interface pointers.
Definition: herbivore_vector.h:23
A container of herbivore objects.
Definition: population_interface.h:29
virtual ~PopulationInterface()
Virtual destructor.
Definition: population_interface.h:32
virtual void kill_nonviable()=0
Mark those herbivores as dead that are not viable.
virtual void kill_all()
Mark all herbivores as dead (see HerbivoreInterface::kill()).
Definition: population_interface.cpp:34
virtual const double get_ind_per_km2() const
Get individual density of all herbivores together [ind/km²].
Definition: population_interface.cpp:25
virtual HerbivoreVector get_list()=0
Get pointers to the herbivores (including dead ones).
virtual const double get_kg_per_km2() const
Get mass density of all herbivores together [kg/km²].
Definition: population_interface.cpp:16
virtual ConstHerbivoreVector get_list() const =0
Get pointers to the herbivores (including dead ones).
virtual void establish()=0
Create a set of new herbivores to establish a population.
virtual void purge_of_dead()=0
Delete all dead herbivores.
virtual void create_offspring(const double ind_per_km2)=0
Give birth to new herbivores.