7#include "io/serializers/IFieldSerializer.hpp"
50 toml::value* pTomlData,
51 const std::string& sFieldName,
52 const std::string& sSectionName,
53 const std::string& sEntityId,
72 [[nodiscard]]
static std::optional<Error>
93 const toml::value* pTomlDocument,
94 const toml::value* pTomlValue,
95 const std::string& sFieldName,
97 const std::string& sOwnerSectionName,
98 const std::string& sEntityId,
99 std::unordered_map<std::string, std::string>& customAttributes);
174 toml::value* pTomlData,
176 const rfk::Field* pField,
177 const std::string& sSectionName,
178 const std::string& sEntityId,
179 size_t& iSubEntityId,
198 const toml::value* pTomlDocument,
199 const toml::value* pTomlValue,
201 const rfk::Field* pField,
202 const std::string& sOwnerSectionName,
203 const std::string& sEntityId,
204 std::unordered_map<std::string, std::string>& customAttributes)
override;
216 [[nodiscard]]
virtual std::optional<Error>
cloneField(
218 const rfk::Field* pFromField,
220 const rfk::Field* pToField)
override;
235 const rfk::Field* pFieldA,
237 const rfk::Field* pFieldB)
override;
247 static void checkGuidUniqueness();
255 static void collectGuids(
256 const rfk::Struct* pArchetypeToAnalyze, std::unordered_map<std::string, std::string>& vAllGuids);
269 const std::string& sCanonicalTypeName,
const rfk::Namespace* pNamespace);
Definition: GameManager.h:34
Definition: IFieldSerializer.hpp:33
Definition: SerializableObjectFieldSerializer.h:19
static bool isFieldSerializable(rfk::Field const &field)
Definition: SerializableObjectFieldSerializer.cpp:393
static bool isDerivedFromSerializable(rfk::Archetype const *pArchetype)
Definition: SerializableObjectFieldSerializer.cpp:410
virtual bool isFieldValueEqual(Serializable *pFieldAOwner, const rfk::Field *pFieldA, Serializable *pFieldBOwner, const rfk::Field *pFieldB) override
Definition: SerializableObjectFieldSerializer.cpp:541
virtual bool isFieldTypeSupported(const rfk::Field *pField) override
Definition: SerializableObjectFieldSerializer.cpp:14
virtual std::optional< Error > serializeField(toml::value *pTomlData, Serializable *pFieldOwner, const rfk::Field *pField, const std::string &sSectionName, const std::string &sEntityId, size_t &iSubEntityId, Serializable *pOriginalObject=nullptr) override
Definition: SerializableObjectFieldSerializer.cpp:19
static std::optional< Error > cloneSerializableObject(Serializable *pFrom, Serializable *pTo, bool bNotifyAboutDeserialized)
Definition: SerializableObjectFieldSerializer.cpp:52
static const auto sSubEntityFieldNameKey
Definition: SerializableObjectFieldSerializer.h:272
static bool isTypeDerivesFromSerializable(const std::string &sCanonicalTypeName)
Definition: SerializableObjectFieldSerializer.cpp:335
static std::optional< Error > serializeFieldObject(Serializable *pObject, toml::value *pTomlData, const std::string &sFieldName, const std::string &sSectionName, const std::string &sEntityId, size_t &iSubEntityId, Serializable *pOriginalObject=nullptr)
Definition: SerializableObjectFieldSerializer.cpp:635
static std::variant< std::unique_ptr< Serializable >, Error > deserializeSerializableObject(const toml::value *pTomlDocument, const toml::value *pTomlValue, const std::string &sFieldName, Serializable *pTarget, const std::string &sOwnerSectionName, const std::string &sEntityId, std::unordered_map< std::string, std::string > &customAttributes)
Definition: SerializableObjectFieldSerializer.cpp:140
virtual std::optional< Error > cloneField(Serializable *pFromInstance, const rfk::Field *pFromField, Serializable *pToInstance, const rfk::Field *pToField) override
Definition: SerializableObjectFieldSerializer.cpp:513
virtual std::optional< Error > deserializeField(const toml::value *pTomlDocument, const toml::value *pTomlValue, Serializable *pFieldOwner, const rfk::Field *pField, const std::string &sOwnerSectionName, const std::string &sEntityId, std::unordered_map< std::string, std::string > &customAttributes) override
Definition: SerializableObjectFieldSerializer.cpp:472
static bool isSerializableObjectValueEqual(Serializable *pObjectA, Serializable *pObjectB)
Definition: SerializableObjectFieldSerializer.cpp:262
Definition: Serializable.h:113