30 #include "eng3d/string.hpp"
179 template<
bool is_const>
182 template<
bool is_serialize>
184 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj->sender_id);
185 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj->receiver_id);
186 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj->days_duration);
187 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj->done);
188 if constexpr(is_serialize) {
189 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj->type);
193 Eng3D::Deser::deser_dynamic<is_serialize>(ar, dyn_clause.province_ids);
197 Eng3D::Deser::deser_dynamic<is_serialize>(ar, dyn_clause.province_ids);
198 Eng3D::Deser::deser_dynamic<is_serialize>(ar, dyn_clause.liberated_id);
202 Eng3D::Deser::deser_dynamic<is_serialize>(ar, dyn_clause.imposed);
206 Eng3D::Deser::deser_dynamic<is_serialize>(ar, dyn_clause.amount);
210 Eng3D::Deser::deser_dynamic<is_serialize>(ar, dyn_clause.amount);
220 Eng3D::Deser::deser_dynamic<is_serialize>(ar,
type);
225 Eng3D::Deser::deser_dynamic<is_serialize>(ar, dyn_clause.province_ids);
230 Eng3D::Deser::deser_dynamic<is_serialize>(ar, dyn_clause.province_ids);
231 Eng3D::Deser::deser_dynamic<is_serialize>(ar, dyn_clause.liberated_id);
236 Eng3D::Deser::deser_dynamic<is_serialize>(ar, dyn_clause.imposed);
241 Eng3D::Deser::deser_dynamic<is_serialize>(ar, dyn_clause.amount);
246 Eng3D::Deser::deser_dynamic<is_serialize>(ar, dyn_clause.amount);
275 std::vector<TreatyClause::BaseClause*>
clauses;
281 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.name);
288 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.receiver_id);
289 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.sender_id);
290 Eng3D::Deser::deser_dynamic<is_serialize>(ar, obj.approval_status);
A single province, which is used to simulate economy in a "bulk-tiles" way instead of doing economica...
std::vector< ProvinceId > province_ids
virtual bool in_effect() const
virtual ~BaseClause()=default
enum TreatyClauseType type
std::vector< ProvinceId > province_ids
bool is_foe(Nation &us, Nation &them)
bool is_friend(Nation &us, Nation &them)
Base class that serves as archiver, stores (in memory) the data required for serialization/deserializ...
typename Eng3D::Deser::CondConstType< is_const, Treaty >::type type
static void deser_dynamic(Eng3D::Deser::Archive &ar, type< is_serialize > &obj)
typename Eng3D::Deser::CondConstType< is_const, TreatyClause::BaseClause >::type type
static void deser_dynamic(Eng3D::Deser::Archive &ar, type< is_serialize > *&obj)
A serializer (base class) which can be used to serialize objects and create per-object optimized clas...
typename CondConstType< is_const, T >::type type
A serializer optimized to memcpy directly the element into the byte stream use only when the object c...
A reference to a string on the global string pool.
An entity which can only be referenced by an (presumably) unique Id this is the base class for the ot...
std::vector< std::pair< NationId, TreatyApproval > > approval_status
bool does_participate(const Nation &nation) const
std::vector< TreatyClause::BaseClause * > clauses