fpmas-metamodel 1.0
Loading...
Searching...
No Matches
Static Public Member Functions | List of all members
MetaAgentSerialization< AgentType > Struct Template Reference

#include <agent.h>

Static Public Member Functions

static void to_json (nlohmann::json &j, const AgentType *agent)
 
static AgentType * from_json (const nlohmann::json &j)
 
static std::size_t size (const fpmas::io::datapack::ObjectPack &o, const AgentType *agent)
 
static void to_datapack (fpmas::io::datapack::ObjectPack &o, const AgentType *agent)
 
static AgentType * from_datapack (const fpmas::io::datapack::ObjectPack &o)
 

Detailed Description

template<typename AgentType>
struct MetaAgentSerialization< AgentType >

MetaAgent JSON and ObjectPack serialization rules.

Only the list of contacts needs to be serialized, all other fields are automatically handled by FPMAS.

Member Function Documentation

◆ to_json()

template<typename AgentType >
void MetaAgentSerialization< AgentType >::to_json ( nlohmann::json &  j,
const AgentType *  agent 
)
static

Json serialization.

◆ from_json()

template<typename AgentType >
AgentType * MetaAgentSerialization< AgentType >::from_json ( const nlohmann::json &  j)
static

Json deserialization.

◆ size()

template<typename AgentType >
std::size_t MetaAgentSerialization< AgentType >::size ( const fpmas::io::datapack::ObjectPack &  o,
const AgentType *  agent 
)
static

ObjectPack size.

◆ to_datapack()

template<typename AgentType >
void MetaAgentSerialization< AgentType >::to_datapack ( fpmas::io::datapack::ObjectPack &  o,
const AgentType *  agent 
)
static

ObjectPack serialization.

◆ from_datapack()

template<typename AgentType >
AgentType * MetaAgentSerialization< AgentType >::from_datapack ( const fpmas::io::datapack::ObjectPack &  o)
static

ObjectPack deserialization.


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