A habitat with the herbivores that live in it.
More...
#include <simulation_unit.h>
A habitat with the herbivores that live in it.
- See also
- Overview
◆ SimulationUnit()
Constructor.
- Parameters
-
| habitat | A shared pointer to the habitat object. Since the object is created not by the megafauna library, but externally, it is implemented as a shared pointer. The Habitat resource will not be released from memory when the SimulationUnit object dies. |
| populations | Pointer to the habitat object. SimulationUnit will take over exclusive ownership of the pointer. |
- Exceptions
-
| std::invalid_argument | If one of the parameters is NULL. |
◆ ~SimulationUnit()
| SimulationUnit::~SimulationUnit |
( |
| ) |
|
|
default |
◆ get_habitat() [1/2]
| Habitat & SimulationUnit::get_habitat |
( |
| ) |
|
The habitat where the populations live.
- Exceptions
-
| std::logic_error | If the private pointer is NULL. |
◆ get_habitat() [2/2]
| const Habitat & SimulationUnit::get_habitat |
( |
| ) |
const |
Get a readonly reference to the habitat.
- Exceptions
-
| std::logic_error | If the private pointer is NULL. |
◆ get_output()
◆ get_populations() [1/2]
The herbivores that live in the habitat.
- Exceptions
-
| std::logic_error | If the private pointer is NULL. |
◆ get_populations() [2/2]
The read-only handle to all herbivores that live in the habitat.
- Exceptions
-
| std::logic_error | If the private pointer is NULL. |
◆ is_initial_establishment_done()
| bool Fauna::SimulationUnit::is_initial_establishment_done |
( |
| ) |
const |
|
inline |
Whether the flag for initial establishment has been set.
◆ set_initial_establishment_done()
| void Fauna::SimulationUnit::set_initial_establishment_done |
( |
| ) |
|
|
inline |
Set the flag that initial establishment has been performed.
◆ habitat
| std::shared_ptr<Habitat> Fauna::SimulationUnit::habitat |
|
private |
◆ initial_establishment_done
| bool Fauna::SimulationUnit::initial_establishment_done |
|
private |
◆ populations
The documentation for this class was generated from the following files:
- /home/docs/checkouts/readthedocs.org/user_builds/modular-megafauna-model/checkouts/latest/src/Fauna/simulation_unit.h
- /home/docs/checkouts/readthedocs.org/user_builds/modular-megafauna-model/checkouts/latest/src/Fauna/simulation_unit.cpp