30 #include "eng3d/string.hpp"
31 #include "eng3d/color.hpp"
87 diff += std::abs(rhs.
min_wage - this->min_wage);
90 diff += std::abs(rhs.
pop_tax - this->pop_tax);
102 template<
bool is_const>
104 template<
bool is_serialize>
106 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.distributism);
107 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.mercantilist);
108 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.capitalism);
113 template<
bool is_const>
115 template<
bool is_serialize>
117 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.individualism);
118 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.state_power);
119 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.equalitarianism);
120 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.secular);
121 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.pluralism);
126 template<
bool is_const>
128 template<
bool is_serialize>
130 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.min_wage);
131 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.industry_profit_tax);
132 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.burgeoise_tax);
133 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.pop_tax);
134 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.private_ownership);
135 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.foreign_ownership);
136 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.collective_ownership);
137 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.individual_ownership);
138 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.education_budget);
139 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.industry_subsidies_budget);
140 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.economic);
141 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.political);
162 template<
bool is_const>
164 template<
bool is_serialize>
166 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.cached_id);
167 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.ref_name);
168 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.name);
169 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.economic);
170 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.political);
176 template<
bool is_const>
178 template<
bool is_serialize>
180 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.cached_id);
181 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.ref_name);
182 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.name);
183 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.color);
184 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.subideologies);
197 template<
bool is_const>
199 template<
bool is_serialize>
201 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.cached_id);
202 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.name);
203 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.ref_name);
204 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.adjective);
205 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.noun);
206 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.combo_form);
207 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.color);
220 template<
bool is_const>
222 template<
bool is_serialize>
224 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.cached_id);
225 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.name);
226 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.ref_name);
227 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.color);
249 template<
bool is_const>
251 template<
bool is_serialize>
253 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.cached_id);
254 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.name);
255 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.ref_name);
256 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.social_value);
257 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.basic_needs_amount);
258 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.luxury_needs_satisfaction);
259 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.luxury_needs_deminishing_factor);
265 Pop& operator=(
const Pop&) =
default;
282 template<
bool is_const>
284 template<
bool is_serialize>
286 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.cached_id);
287 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.type_id);
288 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.
size);
289 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.literacy);
290 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.militancy);
291 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.budget);
292 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.life_needs_met);
293 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.wanted_policies);
314 template<
bool is_const>
316 template<
bool is_serialize>
318 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.cached_id);
319 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.name);
320 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.ref_name);
321 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.description);
322 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.cost);
323 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.req_technologies);
338 template<
bool is_const>
340 template<
bool is_serialize>
342 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.cached_id);
343 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.name);
344 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.ref_name);
345 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.color);
346 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.penalty);
347 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.is_water_body);
constexpr bool operator==(const Pop &rhs) const
A single province, which is used to simulate economy in a "bulk-tiles" way instead of doing economica...
std::string string_format(const std::string_view format, Args &&... args)
String formatter.
Base class that serves as archiver, stores (in memory) the data required for serialization/deserializ...
typename Eng3D::Deser::CondConstType< is_const, Ideology >::type type
static void deser_dynamic(Eng3D::Deser::Archive &ar, type< is_serialize > &obj)
static void deser_dynamic(Eng3D::Deser::Archive &ar, type< is_serialize > &obj)
typename Eng3D::Deser::CondConstType< is_const, Ideology::Subideology >::type type
static void deser_dynamic(Eng3D::Deser::Archive &ar, type< is_serialize > &obj)
typename Eng3D::Deser::CondConstType< is_const, Language >::type type
static void deser_dynamic(Eng3D::Deser::Archive &ar, type< is_serialize > &obj)
typename Eng3D::Deser::CondConstType< is_const, Policies >::type type
typename Eng3D::Deser::CondConstType< is_const, Policies::Economic >::type type
static void deser_dynamic(Eng3D::Deser::Archive &ar, type< is_serialize > &obj)
static void deser_dynamic(Eng3D::Deser::Archive &ar, type< is_serialize > &obj)
typename Eng3D::Deser::CondConstType< is_const, Policies::Political >::type type
typename Eng3D::Deser::CondConstType< is_const, Pop >::type type
static void deser_dynamic(Eng3D::Deser::Archive &ar, type< is_serialize > &obj)
static void deser_dynamic(Eng3D::Deser::Archive &ar, type< is_serialize > &obj)
typename Eng3D::Deser::CondConstType< is_const, PopType >::type type
typename Eng3D::Deser::CondConstType< is_const, Religion >::type type
static void deser_dynamic(Eng3D::Deser::Archive &ar, type< is_serialize > &obj)
static void deser_dynamic(Eng3D::Deser::Archive &ar, type< is_serialize > &obj)
typename Eng3D::Deser::CondConstType< is_const, Technology >::type type
static void deser_dynamic(Eng3D::Deser::Archive &ar, type< is_serialize > &obj)
typename Eng3D::Deser::CondConstType< is_const, TerrainType >::type type
A serializer (base class) which can be used to serialize objects and create per-object optimized clas...
A reference to a string on the global string pool.
const char * c_str() const
An entity which can only be referenced by an (presumably) unique Id this is the base class for the ot...
Policies::Political political
Policies::Economic economic
std::vector< Subideology > subideologies
std::string get_icon_path() const
Eng3D::StringRef combo_form
Eng3D::StringRef adjective
float collective_ownership
float difference(const Policies &rhs) const
struct Policies::Economic economic
float industry_profit_tax
float individual_ownership
struct Policies::Political political
float industry_subsidies_budget
std::vector< float > luxury_needs_satisfaction
std::vector< float > luxury_needs_deminishing_factor
std::vector< float > basic_needs_amount
An entity which can be referenced via a ref_name and also via id.
Eng3D::StringRef ref_name
std::string get_icon_path() const
std::vector< TechnologyId > req_technologies
Eng3D::StringRef description
std::string get_icon_path() const