![]() |
fpmas 1.5
|
#include <json_serializer.h>
Static Public Member Functions | |
| static void | to_json (light_json &, const fpmas::api::utils::PtrWrapper< AgentType > &) |
| static fpmas::api::utils::PtrWrapper< AgentType > | from_json (const light_json &) |
A default light_serializer specialization for default constructible Agent types.
When a default constructor is available for AgentType, this specialization is automatically selected.
The usage of this specialization is recommended, since its optimal: no json data is required to serialize / unserialize a light_json representing such an AgentType. Moreover, its usage is perfectly safe since AgentType instanciated this way are never used directly within FPMAS (at least a complete ObjectPack import is realized before accessing AgentType data, using a ReadGuard for example).
| AgentType | concrete type of Agent to serialize |
|
inlinestatic |
light_json to_json() implementation for the default constructible AgentType: nothing is serialized.
|
inlinestatic |
light_json from_json() implementation for the default constructible AgentType: a dynamically allocated, default constructed AgentType is returned.
AgentType