![]() |
fpmas 1.5
|
#include <grid.h>
Public Types | |
| typedef PtrWrapper< fpmas::model::GridAgent< AgentType, CellType, 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 &agent) |
| static Ptr | from_datapack (const LightObjectPack &pack) |
LightSerializer specialization for an fpmas::model::GridAgent
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).
| AgentType | final fpmas::api::model::GridAgent type to serialize |
| CellType | type of cells used by the spatial model |
| Derived | next derived class in the polymorphic serialization chain |
| typedef PtrWrapper<fpmas::model::GridAgent<AgentType, CellType, Derived> > fpmas::io::datapack::LightSerializer< PtrWrapper< fpmas::model::GridAgent< AgentType, CellType, Derived > > >::Ptr |
Pointer wrapper to a polymorphic GridAgent.
|
inlinestatic |
Returns the buffer size required to serialize the polymorphic GridAgent 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 GridAgent into the specified LightObjectPack.
Effectively calls LightSerializer<fpmas::api::utils::PtrWrapper<Derived>>::to_datapack(), without adding any GridAgent specific data to the LightObjectPack.
| pack | destination LightObjectPack |
| agent | grid agent to serialize |
|
inlinestatic |
Unserializes a polymorphic GridAgent from the specified LightObjectPack.
Effectively calls LightSerializer<fpmas::api::utils::PtrWrapper<Derived>>::from_datapack(), without extracting any GridAgent specific data from the LightObjectPack.
| pack | source LightObjectPack |
Derived instance, unserialized from pack