VisitorCommon.hpp File Reference

Detailed Description

This file contains useful functions for simple serialization / deserialization of the common types used in score, especially polymorphic types.

The important point is the recursion for serialization. This allows if we have a class hierarchy such as:

IdentifiedObject <- A <- B <- C <- D

to correctly serialize A, B, C, D without needing to call the parent function's serialization function.

Go to the source code of this file.

Namespaces

 score
 Base toolkit upon which the software is built.
 

Functions

template<typename T >
void score::serialize_dyn_impl (DataStream::Serializer &v, const T &t)
 
template<typename T >
void score::serialize_dyn_impl (JSONObject::Serializer &v, const T &t)
 
template<typename TheClass >
void score::serialize_dyn (const VisitorVariant &vis, const TheClass &s)
 
template<typename TheClass >
TheClass & score::deserialize_dyn (const VisitorVariant &vis, TheClass &s)
 
template<typename TheClass >
TheClass score::deserialize_dyn (const VisitorVariant &vis)
 
template<typename Functor >
auto score::deserialize_dyn (const VisitorVariant &vis, Functor &&fun)
 
template<typename Type , typename Object >
auto score::marshall (const Object &obj)
 marshall Serializes a single object More...
 
template<typename Object >
auto score::unmarshall (const rapidjson::Value &obj)
 
template<typename Object >
auto score::unmarshall (const QByteArray &arr)