Nameless Engine
Loading...
Searching...
No Matches
MeshDataBinaryFieldSerializer.h
1#pragma once
2
3// Custom.
4#include "io/serializers/IBinaryFieldSerializer.hpp"
5
6namespace ne {
9 public:
11 virtual ~MeshDataBinaryFieldSerializer() override = default;
12
20 virtual bool isFieldTypeSupported(const rfk::Field* pField) override;
21
33 [[nodiscard]] virtual std::variant<std::string, Error> serializeField(
34 const std::filesystem::path& pathToOutputDirectory,
35 const std::string& sFilenameWithoutExtension,
36 Serializable* pFieldOwner,
37 const rfk::Field* pField) override;
38
48 [[nodiscard]] virtual std::optional<Error> deserializeField(
49 const std::filesystem::path& pathToBinaryFile,
50 Serializable* pFieldOwner,
51 const rfk::Field* pField) override;
52
53 private:
55 static constexpr auto pMeshDataFileExtension = ".mbin";
56 };
57}
Definition: IBinaryFieldSerializer.hpp:24
Definition: MeshDataBinaryFieldSerializer.h:8
virtual std::variant< std::string, Error > serializeField(const std::filesystem::path &pathToOutputDirectory, const std::string &sFilenameWithoutExtension, Serializable *pFieldOwner, const rfk::Field *pField) override
Definition: MeshDataBinaryFieldSerializer.cpp:28
static constexpr auto pMeshDataFileExtension
Definition: MeshDataBinaryFieldSerializer.h:55
virtual std::optional< Error > deserializeField(const std::filesystem::path &pathToBinaryFile, Serializable *pFieldOwner, const rfk::Field *pField) override
Definition: MeshDataBinaryFieldSerializer.cpp:123
virtual bool isFieldTypeSupported(const rfk::Field *pField) override
Definition: MeshDataBinaryFieldSerializer.cpp:13
Definition: Serializable.h:113