20#ifndef GEODE_PDXSERIALIZER_H_
21#define GEODE_PDXSERIALIZER_H_
23#include "PdxReader.hpp"
24#include "PdxWriter.hpp"
25#include "Serializable.hpp"
35using UserObjectSizer = std::function<size_t(
const std::shared_ptr<const void>&,
58 virtual std::shared_ptr<void>
fromData(
const std::string& className,
66 virtual bool toData(
const std::shared_ptr<const void>& userObject,
67 const std::string& className,
PdxWriter& pdxWriter) = 0;
A PdxReader will be passed to PdxSerializable.fromData or during deserialization of a PDX.
Definition PdxReader.hpp:58
The PdxSerializer class allows domain classes to be serialized and deserialized as PDXs without modif...
Definition PdxSerializer.hpp:46
virtual std::shared_ptr< void > fromData(const std::string &className, PdxReader &pdxReader)=0
Deserialize this object.
virtual UserObjectSizer getObjectSizer(const std::string &className)
Get the function pointer to the user function that returns the size of an instance of a user domain o...
virtual bool toData(const std::shared_ptr< const void > &userObject, const std::string &className, PdxWriter &pdxWriter)=0
Serializes this object in Geode PDX format.
A PdxWriter will be passed to PdxSerializable.toData when it is serializing the domain class.
Definition PdxWriter.hpp:41