Sleeping Wombat Common Library
0.50.0
swCommonLibrary
Main Page
Related Pages
Modules
Namespaces
Classes
Files
File List
File Members
Serialization
PropertySerialization
Serialization.h
Go to the documentation of this file.
1
#pragma once
2
9
#include "
swCommonLib/Serialization/PropertySerialization/EngineObject.h
"
10
#include "swCommonLib/Common/RTTR.h"
11
#include "swCommonLib/Serialization/Serializer.h"
12
#include "
swCommonLib/Serialization/Deserializer.h
"
13
14
#include "swCommonLib/Serialization/PropertySerialization/EngineSerializationContext.h"
15
#include <DirectXMath.h>
16
#include <string>
17
18
19
#include "swCommonLib/System/Path.h"
20
#include "
swCommonLib/System/Dir.h
"
21
22
#include "SerializationContext.h"
23
#include "Core/SerializationCore.h"
24
25
26
namespace
sw
27
{
28
95
class
Serialization
96
{
97
private
:
98
99
SerializationContextPtr m_context;
100
101
protected
:
102
public
:
103
106
explicit
Serialization
();
107
109
explicit
Serialization
( SerializationContextPtr ctx );
110
111
~
Serialization
() =
default
;
112
113
115
bool
Serialize
(
const
filesystem::Path
& filePath,
const
EngineObject
*
object
);
116
118
template
<
typename
Type >
119
bool
Serialize
(
const
filesystem::Path
& filePath,
const
Type&
object
);
120
125
template
<
typename
Type >
126
bool
Serialize
(
ISerializer
& ser,
const
Type&
object
);
127
129
template
<
typename
Type >
130
bool
Deserialize
(
const
filesystem::Path
& filePath,
const
Type&
object
);
131
136
template
<
typename
Type >
137
bool
Deserialize
(
IDeserializer
& deser, Type&
object
);
138
139
private
:
140
141
void
InitializeContext (
SerializationContext
* ctx );
142
};
143
144
145
146
147
148
}
// sw
149
150
151
#include "Serialization.inl"
sw::SerializationContext
Serialization context for automatic serialization.
Definition:
SerializationContext.h:30
filesystem::Path
Definition:
Path.h:26
IDeserializer
Interface for deserializers.
Definition:
Deserializer.h:39
sw
Definition:
Exception.h:11
Deserializer.h
Deklaracja klasy deserializatora.
sw::Serialization::Deserialize
bool Deserialize(const filesystem::Path &filePath, const Type &object)
Deserialize object from file.
Definition:
Serialization.inl:38
ISerializer
Serializers interface.
Definition:
Serializer.h:31
Dir.h
sw::EngineObject
Base class for serializable objects.
Definition:
EngineObject.h:24
sw::Serialization::Serialize
bool Serialize(const filesystem::Path &filePath, const EngineObject *object)
Serialize to file.
Definition:
Serialization.cpp:51
sw::Serialization
Main object which performs serialization and deserialization.
Definition:
Serialization.h:95
EngineObject.h
sw::Serialization::Serialization
Serialization()
Creates serialization object with default serialization context. If your serialization needs custom c...
Definition:
Serialization.cpp:25
Generated on Thu May 31 2018 19:56:00 for Sleeping Wombat Common Library by
1.8.9.1