![]() |
fpmas 1.5
|
#include <grid.h>
Public Types | |
| typedef PtrWrapper< fpmas::model::GridCellBase< GridCellType, Derived > > | Ptr |
Static Public Member Functions | |
| static std::size_t | size (const LightObjectPack &p, const Ptr &ptr) |
| static void | to_datapack (LightObjectPack &pack, const Ptr &cell) |
| static Ptr | from_datapack (const LightObjectPack &pack) |
LightSerializer specialization for an fpmas::model::GridCellBase
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).
| GridCellType | final fpmas::api::model::GridCell type to serialize |
| Derived | next derived class in the polymorphic serialization chain |
| typedef PtrWrapper<fpmas::model::GridCellBase<GridCellType, Derived> > fpmas::io::datapack::LightSerializer< PtrWrapper< fpmas::model::GridCellBase< GridCellType, Derived > > >::Ptr |
Pointer wrapper to a polymorphic GridCellBase.
|
inlinestatic |
Returns the buffer size required to serialize the polymorphic GridCellBase pointed by ptr into p, i.e. the buffer size required to serialize the Derived part of ptr.
|
inlinestatic |
Serializes the pointer to the polymorphic GridCellBase into the specified LightObjectPack.
Effectively calls LightSerializer<fpmas::api::utils::PtrWrapper<Derived>>::to_datapack(), without adding any GridCellBase specific data to the LightObjectPack.
| pack | destination LightObjectPack |
| cell | grid cell to serialize |
|
inlinestatic |
Unserializes a polymorphic GridCellBase from the specified LightObjectPack.
Effectively calls LightSerializer<fpmas::api::utils::PtrWrapper<Derived>>::from_datapack(), without extracting any GridCellBase specific data from the LightObjectPack.
| pack | LightObjectPack |
Derived instance, unserialized from pack