Nameless Engine
Loading...
Searching...
No Matches
FieldSerializerManager.h
1#pragma once
2
3// Standard.
4#include <mutex>
5
6// Custom.
7#include "io/serializers/IFieldSerializer.hpp"
8#include "io/serializers/IBinaryFieldSerializer.hpp"
9
10namespace ne {
13 public:
14 FieldSerializerManager() = delete;
15
18
28 static void addFieldSerializer(std::unique_ptr<IFieldSerializer> pFieldSerializer);
29
40 static void addBinaryFieldSerializer(std::unique_ptr<IBinaryFieldSerializer> pBinaryFieldSerializer);
41
48 static std::vector<IFieldSerializer*> getFieldSerializers();
49
56 static std::vector<IBinaryFieldSerializer*> getBinaryFieldSerializers();
57
58 private:
60 static inline std::pair<std::mutex, std::vector<std::unique_ptr<IFieldSerializer>>>
62
64 static inline std::pair<std::mutex, std::vector<std::unique_ptr<IBinaryFieldSerializer>>>
66 };
67} // namespace ne
Definition: FieldSerializerManager.h:12
static void addBinaryFieldSerializer(std::unique_ptr< IBinaryFieldSerializer > pBinaryFieldSerializer)
Definition: FieldSerializerManager.cpp:42
static std::pair< std::mutex, std::vector< std::unique_ptr< IBinaryFieldSerializer > > > mtxBinaryFieldSerializers
Definition: FieldSerializerManager.h:65
static std::vector< IFieldSerializer * > getFieldSerializers()
Definition: FieldSerializerManager.cpp:58
static void registerEngineFieldSerializers()
Definition: FieldSerializerManager.cpp:14
static void addFieldSerializer(std::unique_ptr< IFieldSerializer > pFieldSerializer)
Definition: FieldSerializerManager.cpp:27
static std::vector< IBinaryFieldSerializer * > getBinaryFieldSerializers()
Definition: FieldSerializerManager.cpp:69
static std::pair< std::mutex, std::vector< std::unique_ptr< IFieldSerializer > > > mtxFieldSerializers
Definition: FieldSerializerManager.h:61