Antkeeper  0.0.1
ant-phenome.cpp
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2023 Christopher J. Howard
3  *
4  * This file is part of Antkeeper source code.
5  *
6  * Antkeeper source code is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * Antkeeper source code is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with Antkeeper source code. If not, see <http://www.gnu.org/licenses/>.
18  */
19 
20 #include "game/ant/ant-phenome.hpp"
21 
23 {
24  if (genome.antennae)
25  if (auto i = genome.antennae->phene_map.find(caste); i != genome.antennae->phene_map.end())
26  antennae = i->second;
27  if (genome.body_size)
28  if (auto i = genome.body_size->phene_map.find(caste); i != genome.body_size->phene_map.end())
29  body_size = i->second;
30  if (genome.pupa)
31  if (auto i = genome.pupa->phene_map.find(caste); i != genome.pupa->phene_map.end())
32  pupa = i->second;
33  if (genome.diet)
34  if (auto i = genome.diet->phene_map.find(caste); i != genome.diet->phene_map.end())
35  diet = i->second;
36  if (genome.egg)
37  if (auto i = genome.egg->phene_map.find(caste); i != genome.egg->phene_map.end())
38  egg = i->second;
39  if (genome.eyes)
40  if (auto i = genome.eyes->phene_map.find(caste); i != genome.eyes->phene_map.end())
41  eyes = i->second;
42  if (genome.foraging_time)
43  if (auto i = genome.foraging_time->phene_map.find(caste); i != genome.foraging_time->phene_map.end())
44  foraging_time = i->second;
45  if (genome.founding_mode)
46  if (auto i = genome.founding_mode->phene_map.find(caste); i != genome.founding_mode->phene_map.end())
47  founding_mode = i->second;
48  if (genome.gaster)
49  if (auto i = genome.gaster->phene_map.find(caste); i != genome.gaster->phene_map.end())
50  gaster = i->second;
51  if (genome.head)
52  if (auto i = genome.head->phene_map.find(caste); i != genome.head->phene_map.end())
53  head = i->second;
54  if (genome.larva)
55  if (auto i = genome.larva->phene_map.find(caste); i != genome.larva->phene_map.end())
56  larva = i->second;
57  if (genome.legs)
58  if (auto i = genome.legs->phene_map.find(caste); i != genome.legs->phene_map.end())
59  legs = i->second;
60  if (genome.mandibles)
61  if (auto i = genome.mandibles->phene_map.find(caste); i != genome.mandibles->phene_map.end())
62  mandibles = i->second;
63  if (genome.mesosoma)
64  if (auto i = genome.mesosoma->phene_map.find(caste); i != genome.mesosoma->phene_map.end())
65  mesosoma = i->second;
66  if (genome.nest_site)
67  if (auto i = genome.nest_site->phene_map.find(caste); i != genome.nest_site->phene_map.end())
68  nest_site = i->second;
69  if (genome.ocelli)
70  if (auto i = genome.ocelli->phene_map.find(caste); i != genome.ocelli->phene_map.end())
71  ocelli = i->second;
72  if (genome.pigmentation)
73  if (auto i = genome.pigmentation->phene_map.find(caste); i != genome.pigmentation->phene_map.end())
74  pigmentation = i->second;
75  if (genome.pilosity)
76  if (auto i = genome.pilosity->phene_map.find(caste); i != genome.pilosity->phene_map.end())
77  pilosity = i->second;
78  if (genome.sculpturing)
79  if (auto i = genome.sculpturing->phene_map.find(caste); i != genome.sculpturing->phene_map.end())
80  sculpturing = i->second;
81  if (genome.sting)
82  if (auto i = genome.sting->phene_map.find(caste); i != genome.sting->phene_map.end())
83  sting = i->second;
84  if (genome.waist)
85  if (auto i = genome.waist->phene_map.find(caste); i != genome.waist->phene_map.end())
86  waist = i->second;
87  if (genome.wings)
88  if (auto i = genome.wings->phene_map.find(caste); i != genome.wings->phene_map.end())
89  wings = i->second;
90 }
ant_caste_type
Ant caste types.
Complete set of ant genes.
Definition: ant-genome.hpp:50
std::shared_ptr< ant_diet_gene > diet
Definition: ant-genome.hpp:54
std::shared_ptr< ant_larva_gene > larva
Definition: ant-genome.hpp:61
std::shared_ptr< ant_foraging_time_gene > foraging_time
Definition: ant-genome.hpp:57
std::shared_ptr< ant_mesosoma_gene > mesosoma
Definition: ant-genome.hpp:64
std::shared_ptr< ant_mandibles_gene > mandibles
Definition: ant-genome.hpp:63
std::shared_ptr< ant_sculpturing_gene > sculpturing
Definition: ant-genome.hpp:69
std::shared_ptr< ant_gaster_gene > gaster
Definition: ant-genome.hpp:59
std::shared_ptr< ant_pupa_gene > pupa
Definition: ant-genome.hpp:53
std::shared_ptr< ant_head_gene > head
Definition: ant-genome.hpp:60
std::shared_ptr< ant_egg_gene > egg
Definition: ant-genome.hpp:55
std::shared_ptr< ant_pigmentation_gene > pigmentation
Definition: ant-genome.hpp:67
std::shared_ptr< ant_sting_gene > sting
Definition: ant-genome.hpp:70
std::shared_ptr< ant_ocelli_gene > ocelli
Definition: ant-genome.hpp:66
std::shared_ptr< ant_antennae_gene > antennae
Definition: ant-genome.hpp:51
std::shared_ptr< ant_legs_gene > legs
Definition: ant-genome.hpp:62
std::shared_ptr< ant_pilosity_gene > pilosity
Definition: ant-genome.hpp:68
std::shared_ptr< ant_nest_site_gene > nest_site
Definition: ant-genome.hpp:65
std::shared_ptr< ant_founding_mode_gene > founding_mode
Definition: ant-genome.hpp:58
std::shared_ptr< ant_wings_gene > wings
Definition: ant-genome.hpp:72
std::shared_ptr< ant_waist_gene > waist
Definition: ant-genome.hpp:71
std::shared_ptr< ant_body_size_gene > body_size
Definition: ant-genome.hpp:52
std::shared_ptr< ant_eyes_gene > eyes
Definition: ant-genome.hpp:56
const ant_body_size_phene * body_size
Definition: ant-phenome.hpp:65
const ant_diet_phene * diet
Definition: ant-phenome.hpp:67
const ant_sting_phene * sting
Definition: ant-phenome.hpp:83
const ant_sculpturing_phene * sculpturing
Definition: ant-phenome.hpp:82
const ant_pupa_phene * pupa
Definition: ant-phenome.hpp:66
const ant_founding_mode_phene * founding_mode
Definition: ant-phenome.hpp:71
const ant_larva_phene * larva
Definition: ant-phenome.hpp:74
const ant_mandibles_phene * mandibles
Definition: ant-phenome.hpp:76
const ant_legs_phene * legs
Definition: ant-phenome.hpp:75
const ant_pigmentation_phene * pigmentation
Definition: ant-phenome.hpp:80
const ant_ocelli_phene * ocelli
Definition: ant-phenome.hpp:79
const ant_antennae_phene * antennae
Definition: ant-phenome.hpp:64
const ant_wings_phene * wings
Definition: ant-phenome.hpp:85
const ant_waist_phene * waist
Definition: ant-phenome.hpp:84
const ant_head_phene * head
Definition: ant-phenome.hpp:73
const ant_eyes_phene * eyes
Definition: ant-phenome.hpp:69
const ant_foraging_time_phene * foraging_time
Definition: ant-phenome.hpp:70
const ant_gaster_phene * gaster
Definition: ant-phenome.hpp:72
const ant_pilosity_phene * pilosity
Definition: ant-phenome.hpp:81
ant_phenome()=default
Constructs an empty ant phenome.
const ant_egg_phene * egg
Definition: ant-phenome.hpp:68
const ant_nest_site_phene * nest_site
Definition: ant-phenome.hpp:78
const ant_mesosoma_phene * mesosoma
Definition: ant-phenome.hpp:77