![]() |
ALMaSS
1.2 (after EcoStack, March 2024)
The Animal, Landscape and Man Simulation System
|
A class to manage simple farmer list functionality. More...
#include <Farm.h>
Public Member Functions | |
FarmerList () | |
FarmerList constructor. More... | |
void | AddFarmer (Farmer *a_farmer) |
Adds a farmer to the end of the list. More... | |
Farmer * | GetFarmer (int i) |
Gets a farmer point if an index is available. More... | |
void | ReplaceFarmer (int i, Farmer *a_farmer) |
Replace a farmer. More... | |
int | GetSize () |
Gets the list length. More... | |
APoint | GetLocation (int i) |
Gets location of a farmer in ALMaSS coordinates. More... | |
void | UpdateSocialNetworks (bool a_geographic, bool a_associative, bool a_virtual) |
Forces update of one or more social networks for each farmer. More... | |
void | ResetAllDone () |
Sets all farmers AllDone to false ready for the next day. More... | |
Protected Attributes | |
vector< Farmer * > | m_TheFarmers |
The list of farmers. More... | |
A class to manage simple farmer list functionality.
|
inline |
FarmerList constructor.
Only resizes the list of farmers to zero length ready for input
References m_TheFarmers.
|
inline |
Adds a farmer to the end of the list.
References m_TheFarmers.
Referenced by FarmManager::CreateFarms().
|
inline |
Gets a farmer point if an index is available.
References m_TheFarmers.
Referenced by FarmManager::FarmManagement(), FarmManager::GetFarmer(), and FarmManager::PrintLocationAndArea().
APoint FarmerList::GetLocation | ( | int | i | ) |
Gets location of a farmer in ALMaSS coordinates.
References m_TheFarmers.
|
inline |
Gets the list length.
References m_TheFarmers.
Referenced by FarmManager::FarmManagement(), and FarmManager::PrintLocationAndArea().
|
inline |
void FarmerList::ResetAllDone | ( | ) |
Sets all farmers AllDone to false ready for the next day.
Ensures that all farmers can start their activity the next day
References m_TheFarmers.
Referenced by FarmManager::FarmManagement().
void FarmerList::UpdateSocialNetworks | ( | bool | a_geographic, |
bool | a_associative, | ||
bool | a_virtual | ||
) |
Forces update of one or more social networks for each farmer.
Simply loops through all the farmers and tells them to update their networks if the corresponding flag is set If social networks are disabled, then this is not called.
References m_TheFarmers.
Referenced by FarmManager::InitiateManagement().
|
protected |
The list of farmers.
Referenced by AddFarmer(), FarmerList(), GetFarmer(), GetLocation(), GetSize(), ReplaceFarmer(), ResetAllDone(), and UpdateSocialNetworks().