Modular Megafauna Model 1.1.5
A physiological, dynamic herbivore simulator in C++.
Loading...
Searching...
No Matches
simulation_unit.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_SIMULATION_UNIT_H
12#define FAUNA_SIMULATION_UNIT_H
13
14#include <memory>
15#include "population_list.h"
16
17namespace Fauna {
18// forward declaration
19class Habitat;
20
21namespace Output {
22class CombinedData;
23}
24
26
28 public:
30
39 SimulationUnit(std::shared_ptr<Habitat> habitat, PopulationList* populations);
40
43
45
47
49
50 const Habitat& get_habitat() const;
51
53
58
60
62
64
65 const PopulationList& get_populations() const;
66
70 }
71
74
75 private:
76 std::shared_ptr<Habitat> habitat;
78 std::unique_ptr<PopulationList> populations;
79};
80
81} // namespace Fauna
82#endif // FAUNA_SIMULATION_UNIT_H
Abstract class of a homogenous spatial unit populated by herbivores.
Definition: habitat.h:29
A habitat with the herbivores that live in it.
Definition: simulation_unit.h:27
PopulationList & get_populations()
The herbivores that live in the habitat.
Definition: simulation_unit.cpp:87
bool is_initial_establishment_done() const
Whether the flag for initial establishment has been set.
Definition: simulation_unit.h:68
Output::CombinedData get_output() const
Get combined output from habitat and herbivores together.
Definition: simulation_unit.cpp:59
void set_initial_establishment_done()
Set the flag that initial establishment has been performed.
Definition: simulation_unit.h:73
bool initial_establishment_done
Definition: simulation_unit.h:77
std::shared_ptr< Habitat > habitat
Definition: simulation_unit.h:76
Habitat & get_habitat()
The habitat where the populations live.
Definition: simulation_unit.cpp:39
std::unique_ptr< PopulationList > populations
Definition: simulation_unit.h:78
~SimulationUnit()
Default Destructor.
Definition: average.h:16
std::vector< std::shared_ptr< PopulationInterface > > PopulationList
Definition: population_list.h:21
A list of herbivore populations in a habitat.
Output data for herbivores and habitat(s).
Definition: combined_data.h:26