Sleeping Wombat Common Library  0.50.0
swCommonLibrary
Public Member Functions | Private Member Functions | Private Attributes | List of all members
sw::Serialization Class Reference

Main object which performs serialization and deserialization. More...

#include <Serialization.h>

Public Member Functions

 Serialization ()
 Creates serialization object with default serialization context. If your serialization needs custom context use other overload of this function.
 
 Serialization (SerializationContextPtr ctx)
 Creates serialization object with custom context.
 
bool Serialize (const filesystem::Path &filePath, const EngineObject *object)
 Serialize to file.
 
template<typename Type >
bool Serialize (const filesystem::Path &filePath, const Type &object)
 Serialize object to file.
 
template<typename Type >
bool Serialize (ISerializer &ser, const Type &object)
 Serialize object to provided serializer. This serialization doesn't write it's output anywhere. More...
 
template<typename Type >
bool Deserialize (const filesystem::Path &filePath, const Type &object)
 Deserialize object from file.
 
template<typename Type >
bool Deserialize (IDeserializer &deser, Type &object)
 Deserialize object to provided serializer. This deserialization doesn't write it's output anywhere. More...
 

Private Member Functions

void InitializeContext (SerializationContext *ctx)
 

Private Attributes

SerializationContextPtr m_context
 

Detailed Description

Main object which performs serialization and deserialization.

Member Function Documentation

template<typename Type >
bool sw::Serialization::Deserialize ( IDeserializer deser,
Type &  object 
)
inline

Deserialize object to provided serializer. This deserialization doesn't write it's output anywhere.

Note
Deserializer must be initialized with context which is derived from SerializationContext.
template<typename Type >
bool sw::Serialization::Serialize ( ISerializer ser,
const Type &  object 
)
inline

Serialize object to provided serializer. This serialization doesn't write it's output anywhere.

Note
Serializer must be initialized with context which is derived from SerializationContext.

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