fpmas 1.6
Static Public Member Functions | List of all members
fpmas::io::datapack::Serializer< WeakAgentPtr > Struct Reference

#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)
 

Detailed Description

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.

Member Function Documentation

◆ size()

static std::size_t fpmas::io::datapack::Serializer< WeakAgentPtr >::size ( const ObjectPack pack,
const WeakAgentPtr &  ptr 
)
static

Equivalent to fpmas::io::datapack::Serializer<AgentPtr>>:size(const ObjectPack&, const AgentPtr&).

◆ to_datapack()

static void fpmas::io::datapack::Serializer< WeakAgentPtr >::to_datapack ( ObjectPack pack,
const WeakAgentPtr &  ptr 
)
static

◆ from_datapack()

static WeakAgentPtr fpmas::io::datapack::Serializer< WeakAgentPtr >::from_datapack ( const ObjectPack pack)
static

The documentation for this struct was generated from the following file: