Nameless Engine
Loading...
Searching...
No Matches
ne::FieldSerializerManager Class Reference

#include <FieldSerializerManager.h>

Static Public Member Functions

static void registerEngineFieldSerializers ()
 
static void addFieldSerializer (std::unique_ptr< IFieldSerializer > pFieldSerializer)
 
static void addBinaryFieldSerializer (std::unique_ptr< IBinaryFieldSerializer > pBinaryFieldSerializer)
 
static std::vector< IFieldSerializer * > getFieldSerializers ()
 
static std::vector< IBinaryFieldSerializer * > getBinaryFieldSerializers ()
 

Static Private Attributes

static std::pair< std::mutex, std::vector< std::unique_ptr< IFieldSerializer > > > mtxFieldSerializers
 
static std::pair< std::mutex, std::vector< std::unique_ptr< IBinaryFieldSerializer > > > mtxBinaryFieldSerializers
 

Detailed Description

Stores all enabled field serializers.

Member Function Documentation

◆ addBinaryFieldSerializer()

void ne::FieldSerializerManager::addBinaryFieldSerializer ( std::unique_ptr< IBinaryFieldSerializer pBinaryFieldSerializer)
static

Adds a field serializer that will be automatically used in serialization/deserialization to support specific field types. Use getBinaryFieldSerializers to get array of added serializers.

Remarks
If the serializer of the specified type was already added previously it will not be added again so it is safe to call this function multiple times with the same serializer.
Parameters
pBinaryFieldSerializerField serializer to add.

◆ addFieldSerializer()

void ne::FieldSerializerManager::addFieldSerializer ( std::unique_ptr< IFieldSerializer pFieldSerializer)
static

Adds a field serializer that will be automatically used in serialization/deserialization to support specific field types. Use getFieldSerializers to get array of added serializers.

Remarks
If the serializer of the specified type was already added previously it will not be added again so it is safe to call this function multiple times with the same serializer.
Parameters
pFieldSerializerField serializer to add.

◆ getBinaryFieldSerializers()

std::vector< IBinaryFieldSerializer * > ne::FieldSerializerManager::getBinaryFieldSerializers ( )
static

Returns available binary field serializers that will be automatically used in serialization/deserialization.

Returns
Array of available field serializers. Do not delete (free) returned pointers.

◆ getFieldSerializers()

std::vector< IFieldSerializer * > ne::FieldSerializerManager::getFieldSerializers ( )
static

Returns available field serializers that will be automatically used in serialization/deserialization.

Returns
Array of available field serializers. Do not delete (free) returned pointers.

◆ registerEngineFieldSerializers()

void ne::FieldSerializerManager::registerEngineFieldSerializers ( )
static

Uses addFieldSerializer to add all field serializers implemented in the engine.

Member Data Documentation

◆ mtxBinaryFieldSerializers

std::pair<std::mutex, std::vector<std::unique_ptr<IBinaryFieldSerializer> > > ne::FieldSerializerManager::mtxBinaryFieldSerializers
inlinestaticprivate

Serializers used to serialize/deserialize fields into binary files.

◆ mtxFieldSerializers

std::pair<std::mutex, std::vector<std::unique_ptr<IFieldSerializer> > > ne::FieldSerializerManager::mtxFieldSerializers
inlinestaticprivate

Serializers used to serialize/deserialize fields.


The documentation for this class was generated from the following files: