![]() |
fpmas 1.6
|
#include "serializer_set_up.h"
#include "fpmas/api/model/model.h"
#include "fpmas/io/datapack.h"
#include "fpmas/model/model.h"
Go to the source code of this file.
Namespaces | |
namespace | fpmas |
namespace | fpmas::io |
namespace | fpmas::io::datapack |
Macros | |
#define | FPMAS_BASE_DATAPACK_SET_UP(...) |
#define | FPMAS_BASE_DEFAULT_DATAPACK_SET_UP() |
#define | FPMAS_DEFAULT_DATAPACK(AGENT) |
Agent ObjectPack serialization related objects.
#define FPMAS_BASE_DATAPACK_SET_UP | ( | ... | ) |
Defines the fpmas::io::datapack::Serializer specializations required to handle the object pack serialization of the specified set of Agent types.
Notice that this is only the definitions of the to_datapack
and from_datapack
methods, that are declared (but not defined) in src/fpmas/model/model.h.
In consequence, this macro must be invoked exaclty once from a source file, at the global definition level, in any C++ target using FPMAS.
This macro does not define any rule for AgentPtr json serialization, so using only this macro will produce compile time errors.
Two solutions are available:
#define FPMAS_BASE_DEFAULT_DATAPACK_SET_UP | ( | ) |
Can be used instead of FPMAS_BASE_DATAPACK_SET_UP() to set up json serialization without specifying any Agent type.
#define FPMAS_DEFAULT_DATAPACK | ( | AGENT | ) |
Helper macro to easily define object pack serialization rules for DefaultConstructible Agents.
AGENT | DefaultConstructible Agent type |