Nameless Engine
Loading...
Searching...
No Matches
UnorderedMapFieldSerializer.h
1#pragma once
2
3// Custom.
4#include "io/serializers/IFieldSerializer.hpp"
5
6namespace ne {
12 public:
14 virtual ~UnorderedMapFieldSerializer() override = default;
15
23 virtual bool isFieldTypeSupported(const rfk::Field* pField) override;
24
43 [[nodiscard]] virtual std::optional<Error> serializeField(
44 toml::value* pTomlData,
45 Serializable* pFieldOwner,
46 const rfk::Field* pField,
47 const std::string& sSectionName,
48 const std::string& sEntityId,
49 size_t& iSubEntityId,
50 Serializable* pOriginalObject = nullptr) override;
51
67 [[nodiscard]] virtual std::optional<Error> deserializeField(
68 const toml::value* pTomlDocument,
69 const toml::value* pTomlValue,
70 Serializable* pFieldOwner,
71 const rfk::Field* pField,
72 const std::string& sOwnerSectionName,
73 const std::string& sEntityId,
74 std::unordered_map<std::string, std::string>& customAttributes) override;
75
86 [[nodiscard]] virtual std::optional<Error> cloneField(
87 Serializable* pFromInstance,
88 const rfk::Field* pFromField,
89 Serializable* pToInstance,
90 const rfk::Field* pToField) override;
91
103 virtual bool isFieldValueEqual(
104 Serializable* pFieldAOwner,
105 const rfk::Field* pFieldA,
106 Serializable* pFieldBOwner,
107 const rfk::Field* pFieldB) override;
108 };
109} // namespace ne
Definition: IFieldSerializer.hpp:33
Definition: Serializable.h:113
Definition: UnorderedMapFieldSerializer.h:11
virtual bool isFieldTypeSupported(const rfk::Field *pField) override
Definition: UnorderedMapFieldSerializer.cpp:7
virtual std::optional< Error > cloneField(Serializable *pFromInstance, const rfk::Field *pFromField, Serializable *pToInstance, const rfk::Field *pToField) override
Definition: UnorderedMapFieldSerializer.cpp:342
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: UnorderedMapFieldSerializer.cpp:39
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: UnorderedMapFieldSerializer.cpp:263
virtual bool isFieldValueEqual(Serializable *pFieldAOwner, const rfk::Field *pFieldA, Serializable *pFieldBOwner, const rfk::Field *pFieldB) override
Definition: UnorderedMapFieldSerializer.cpp:384