score::SerializableInterface< T > Class Template Referenceabstract

Generic serialization method for abstract classes. More...

Detailed Description

template<typename T>
class score::SerializableInterface< T >

Generic serialization method for abstract classes.

The problem is reloading polymorphic classes : we have to save the identifier of the factory used to instantiate them.
Base classes should inherit from SerializableInterface, and provide only serialization code for their own data in Visitor<Reader<...>> and Visitor<Writer<...>>.
Likewise, subclasses should only save their own data. These classes ensure that everything will be saved in the correct order.
See visitor_abstract_tag

Public Types

using key_type = UuidKey< T >
 
using is_abstract_base_tag = std::integral_constant< bool, true >
 

Public Member Functions

virtual UuidKey< T > concreteKey () const noexcept=0
 
virtual void serialize_impl (const VisitorVariant &vis) const
 

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