![]() |
fpmas 1.5
|
#include <spatial_model.h>
Public Types | |
| typedef PtrWrapper< fpmas::model::SpatialAgentBase< SpatialAgentInterface, AgentType, CellType, Derived > > | Ptr |
Static Public Member Functions | |
| static std::size_t | size (const LightObjectPack &p, const Ptr &ptr) |
| static void | to_datapack (LightObjectPack &o, const Ptr &agent) |
| static Ptr | from_datapack (const LightObjectPack &o) |
LightSerializer specialization for an fpmas::model::SpatialAgentBase
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 Agent 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::SpatialAgentBase<SpatialAgentInterface, AgentType, CellType, Derived> > fpmas::io::datapack::LightSerializer< PtrWrapper< fpmas::model::SpatialAgentBase< SpatialAgentInterface, AgentType, CellType, Derived > > >::Ptr |
Pointer wrapper to a polymorphic SpatialAgentBase.
|
inlinestatic |
Returns the buffer size required to serialize the polymorphic Agent pointed to by ptr to p.
|
inlinestatic |
LightObjectPack to_datapack() implementation for an fpmas::model::SpatialAgentBase.
Effectively calls LightSerializer<fpmas::api::utils::PtrWrapper<Derived>>::to_datapack(), without adding any SpatialAgentBase specific data to the LightObjectPack o.
| o | object pack output |
| agent | agent to serialize |
|
inlinestatic |
LightObjectPack from_datapack() implementation for an fpmas::model::SpatialAgentBase.
Effectively calls LightObjectPack<fpmas::api::utils::PtrWrapper<Derived>>::from_datapack(), without extracting any SpatialAgentBase specific data from the LightObjectPack j.
| o | object pack input |
Derived instance, unserialized from j