![]() |
fpmas 1.6
|
#include <model.h>
Static Public Member Functions | |
static std::size_t | size (const ObjectPack &pack, const WeakAgentPtr &ptr) |
static void | to_datapack (ObjectPack &pack, const WeakAgentPtr &ptr) |
static WeakAgentPtr | from_datapack (const ObjectPack &pack) |
fpmas::api::model::WeakAgentPtr fpmas::io::datapack::Serializer serialization rules declaration.
to_datapack
and from_datapack
methods must be defined by the user at compile time, depending on its own Agent types, using the FPMAS_DATAPACK_SET_UP() macro, that must be called from a source file. Otherwise, linker errors will be thrown.
The behavior of the specified methods are equivalent to the corresponding fpmas::io::datapack::Serializer<AgentPtr> definitions, but Agents are wrapped in WeakAgentPtr instance, so that no automatic memory management is performed.
|
static |
Equivalent to fpmas::io::datapack::Serializer<AgentPtr>>:size(const ObjectPack&, const AgentPtr&).
|
static |
|
static |
Equivalent to fpmas::io::datapack::Serializer<AgentPtr>::from_datapack(const ObjectPack& o), but the result is wrapped in an fpmas::api::model::WeakAgentPtr instance.