The PdxSerializer class allows domain classes to be serialized and deserialized as PDXs without modification of the domain class.
More...
#include <PdxSerializer.hpp>
|
virtual std::shared_ptr< void > | fromData (const std::string &className, PdxReader &pdxReader)=0 |
| Deserialize this object. More...
|
|
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 object. More...
|
|
virtual bool | toData (const std::shared_ptr< const void > &userObject, const std::string &className, PdxWriter &pdxWriter)=0 |
| Serializes this object in Geode PDX format. More...
|
|
The PdxSerializer class allows domain classes to be serialized and deserialized as PDXs without modification of the domain class.
A domain class should register function Serializable::registerPdxSerializer
to create a new instance of type for de-serialization.
◆ fromData()
virtual std::shared_ptr< void > apache::geode::client::PdxSerializer::fromData |
( |
const std::string & |
className, |
|
|
PdxReader & |
pdxReader |
|
) |
| |
|
pure virtual |
Deserialize this object.
- Parameters
-
className | the class name whose object needs to be de-serialized |
pdxReader | the PdxReader stream to use for reading the object data |
◆ getObjectSizer()
virtual UserObjectSizer apache::geode::client::PdxSerializer::getObjectSizer |
( |
const std::string & |
className | ) |
|
|
virtual |
Get the function pointer to the user function that returns the size of an instance of a user domain object.
- Parameters
-
className | to help select an object sizer for the correct class |
◆ toData()
virtual bool apache::geode::client::PdxSerializer::toData |
( |
const std::shared_ptr< const void > & |
userObject, |
|
|
const std::string & |
className, |
|
|
PdxWriter & |
pdxWriter |
|
) |
| |
|
pure virtual |
Serializes this object in Geode PDX format.
- Parameters
-
userObject | the object which needs to be serialized |
pdxWriter | the PdxWriter object to use for serializing the object |