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

#include <model.h>

Static Public Member Functions

static std::size_t size (const LightObjectPack &pack, const WeakAgentPtr &ptr)
 
static void to_datapack (LightObjectPack &pack, const WeakAgentPtr &ptr)
 
static WeakAgentPtr from_datapack (const LightObjectPack &pack)
 

Detailed Description

fpmas::api::model::WeakAgentPtr fpmas::io::datapack::LightSerializer 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::LightSerializer<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::LightSerializer< WeakAgentPtr >::size ( const LightObjectPack pack,
const WeakAgentPtr &  ptr 
)
static

◆ to_datapack()

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

◆ from_datapack()

static WeakAgentPtr fpmas::io::datapack::LightSerializer< WeakAgentPtr >::from_datapack ( const LightObjectPack pack)
static

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