20#ifndef GEODE_SERIALIZABLE_H_
21#define GEODE_SERIALIZABLE_H_
27#include "internal/geode_globals.hpp"
44using TypeFactoryMethod = std::function<std::shared_ptr<Serializable>()>;
46using TypeFactoryMethodPdx = std::function<std::shared_ptr<PdxSerializable>()>;
77 static std::shared_ptr<Serializable>
create(_T value);
80 inline static std::shared_ptr<Serializable> create(
81 const std::shared_ptr<_T>& value) {
This base class is the superclass of all user objects in the cache that can be serialized.
Definition: Serializable.hpp:53
virtual size_t objectSize() const
return the size in bytes of the instance being serialized.
virtual std::string toString() const
Display this object as 'string', which depends on the implementation in the subclasses.
static std::shared_ptr< Serializable > create(_T value)
Factory method that creates the Serializable object that matches the type of value.