Skip to content

Commit

Permalink
Cleanup serialization
Browse files Browse the repository at this point in the history
  • Loading branch information
sguionni committed Sep 20, 2024
1 parent 54b3330 commit c034a5f
Show file tree
Hide file tree
Showing 33 changed files with 467 additions and 516 deletions.
10 changes: 5 additions & 5 deletions lib/app/include/app/application/ecs/component_meta_function.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
#include "app/application/ecs/registry_manager.hpp"
#include "app/core/ecs/base_entity.hpp"
#include "app/core/ecs/concepts.hpp"
#include "app/core/serialization/serialization.hpp"
#include "app/serialization/serialization_system.hpp"
#include <functional>
#include <map>
#include <string>
Expand All @@ -25,7 +25,7 @@ namespace VTX::App::Application::ECS
{
_mapSerializer[ p_id ] = []( const Core::ECS::BaseEntity & p_entity,
const Application::ECS::RegistryManager & p_registry,
const Core::Serialization::Serialization & p_serializer )
const Serialization::SerializationSystem & p_serializer )
{
const T & component = p_registry.getComponent<T>( p_entity );

Expand All @@ -40,7 +40,7 @@ namespace VTX::App::Application::ECS
};

_mapDeserializer[ p_id ] = []( Application::ECS::RegistryManager & p_registry,
const Core::Serialization::Serialization & p_serializer,
const Serialization::SerializationSystem & p_serializer,
const Util::JSon::Object & p_json,
const Core::ECS::BaseEntity & p_target )
{
Expand All @@ -66,10 +66,10 @@ namespace VTX::App::Application::ECS
private:
using ComponentSerializerFunction = std::function<
const Util::JSon::
Object( const Core::ECS::BaseEntity &, const Application::ECS::RegistryManager &, const Core::Serialization::Serialization & )>;
Object( const Core::ECS::BaseEntity &, const Application::ECS::RegistryManager &, const Serialization::SerializationSystem & )>;

using ComponentDeserializerFunction = std::function<
void( Application::ECS::RegistryManager &, const Core::Serialization::Serialization &, const Util::JSon::Object &, const Core::ECS::BaseEntity & )>;
void( Application::ECS::RegistryManager &, const Serialization::SerializationSystem &, const Util::JSon::Object &, const Core::ECS::BaseEntity & )>;

std::map<ComponentStaticID, ComponentSerializerFunction> _mapSerializer
= std::map<ComponentStaticID, ComponentSerializerFunction>();
Expand Down
6 changes: 3 additions & 3 deletions lib/app/include/app/application/settings/base_setting.hpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#ifndef __VTX_APP_APPLICATION_SETTINGS_BASE_SETTING__
#define __VTX_APP_APPLICATION_SETTINGS_BASE_SETTING__

#include "app/application/system/serializer.hpp"
#include "app/serialization/serialization_system.hpp"
#include <concepts>
#include <memory>
#include <optional>
Expand Down Expand Up @@ -37,10 +37,10 @@ namespace VTX::App::Application::Settings

void set( const T & p_value ) { _value = p_value; }

Util::JSon::BasicJSon serialize() const override { return SERIALIZER().serialize( _value ); }
Util::JSon::BasicJSon serialize() const override { return SERIALIZATION_SYSTEM().serialize( _value ); }
void deserialize( const Util::JSon::BasicJSon & p_json ) override
{
SERIALIZER().deserialize( p_json, _value );
SERIALIZATION_SYSTEM().deserialize( p_json, _value );
}

void reset() override
Expand Down
44 changes: 0 additions & 44 deletions lib/app/include/app/application/system/serializer.hpp

This file was deleted.

58 changes: 0 additions & 58 deletions lib/app/include/app/core/io/reader/serialized_object.hpp

This file was deleted.

46 changes: 0 additions & 46 deletions lib/app/include/app/core/io/writer/serialized_object.hpp

This file was deleted.

5 changes: 0 additions & 5 deletions lib/app/include/app/core/serialization/_fwd.hpp

This file was deleted.

164 changes: 0 additions & 164 deletions lib/app/include/app/core/serialization/serialization.hpp

This file was deleted.

Loading

0 comments on commit c034a5f

Please sign in to comment.