![]() |
fpmas 1.5
|
#include <graph.h>
Public Types | |
| typedef PtrWrapper< fpmas::model::GraphCellBase< GraphCellType, Derived > > | Ptr |
Static Public Member Functions | |
| static std::size_t | size (const LightObjectPack &pack, const Ptr &ptr) |
| static void | to_datapack (LightObjectPack &pack, const Ptr &ptr) |
| static Ptr | from_datapack (const LightObjectPack &pack) |
Polymorphic GraphCellBase LightSerializer specialization.
The LightSerializer is directly call on the next Derived type: no data is added to / extracted from the current LightObjectPack.
| Serialization Scheme |
|---|
Derived LightObjectPack serialization |
The Derived part is serialized using the LightSerializer<PtrWrapper<Derived>> serialization, that can be defined externally without additional constraint (and potentially leaves the LightObjectPack empty).
| GraphCellType | final fpmas::model::GraphCellBase type to serialize |
| Derived | next derived class in the polymorphic serialization chain |
| typedef PtrWrapper<fpmas::model::GraphCellBase<GraphCellType, Derived> > fpmas::io::datapack::LightSerializer< PtrWrapper< fpmas::model::GraphCellBase< GraphCellType, Derived > > >::Ptr |
Pointer wrapper to a polymorphic SpatialAgentBase.
|
inlinestatic |
Returns the buffer size required to serialize the polymorphic GraphCellBase pointed to by ptr into pack, i.e. the buffer size required to serialize the Derived part of ptr.
|
inlinestatic |
Serializes the pointer to the polymorphic GraphCellBase into the specified LightObjectPack.
Effectively calls LightSerializer<fpmas::api::utils::PtrWrapper<Derived>>::to_datapack(), without adding any GraphCellBase specific data to the LightObjectPack.
| pack | destination LightObjectPack |
| ptr | agent pointer to serialize |
|
inlinestatic |
Unserializes a polymorphic GraphCellBase from the specified ObjectPack.
Effectively calls LightSerializer<fpmas::api::utils::PtrWrapper<Derived>>::from_datapack(), without extracting any GraphCellBase specific data from the LightObjectPack.
| pack | source LightObjectPack |
Derived instance, unserialized from pack