fpmas 1.6
Classes | Typedefs
fpmas::io::json Namespace Reference

Classes

struct  AgentPtrSerializer
 
struct  AgentPtrSerializer< JsonType, void >
 
struct  basic_datapack_serializer
 
struct  light_serializer
 
struct  light_serializer< fpmas::api::model::AgentPtr >
 
struct  light_serializer< fpmas::api::model::WeakAgentPtr >
 
struct  light_serializer< fpmas::api::utils::PtrWrapper< AgentType >, typename std::enable_if< std::is_base_of< fpmas::api::model::Agent, AgentType >::value &&!std::is_default_constructible< AgentType >::value &&std::is_same< AgentType, typename AgentType::FinalAgentType >::value >::type >
 
struct  light_serializer< fpmas::api::utils::PtrWrapper< AgentType >, typename std::enable_if< std::is_base_of< fpmas::api::model::Agent, AgentType >::value &&std::is_default_constructible< AgentType >::value &&std::is_same< AgentType, typename AgentType::FinalAgentType >::value >::type >
 
struct  light_serializer< NodePtrWrapper< T > >
 
struct  light_serializer< PtrWrapper< fpmas::model::GraphCellBase< AgentType, Derived > > >
 
struct  light_serializer< PtrWrapper< fpmas::model::GridAgent< AgentType, CellType, Derived > > >
 
struct  light_serializer< PtrWrapper< fpmas::model::GridCellBase< GridCellType, Derived > > >
 
struct  light_serializer< PtrWrapper< fpmas::model::SpatialAgentBase< SpatialAgentInterface, AgentType, CellType, Derived > > >
 
struct  light_serializer< T, typename std::enable_if<!std::is_default_constructible< T >::value >::type >
 

Typedefs

typedef nlohmann::basic_json< std::map, std::vector, std::string, bool, std::int64_t, std::uint64_t, double, std::allocator, light_serializerlight_json
 
template<typename T , typename Enable = void>
using datapack_serializer = basic_datapack_serializer< T, fpmas::io::datapack::ObjectPack >
 
typedef nlohmann::basic_json< std::map, std::vector, std::string, bool, std::int64_t, std::uint64_t, double, std::allocator, datapack_serializerdatapack_json
 
template<typename T , typename Enable = void>
using light_datapack_serializer = basic_datapack_serializer< T, fpmas::io::datapack::LightObjectPack >
 
typedef nlohmann::basic_json< std::map, std::vector, std::string, bool, std::int64_t, std::uint64_t, double, std::allocator, light_datapack_serializerlight_datapack_json
 

Detailed Description

Features related to FPMAS Json serialization rules.

Typedef Documentation

◆ light_json

typedef nlohmann::basic_json<std::map, std::vector, std::string, bool, std::int64_t, std::uint64_t, double, std::allocator, light_serializer> fpmas::io::json::light_json

Light json type definition, that might be used to produce "lighter" json than the regular nlohmann::json version.

As an example, the light_json serialization of a DistributedNode might be used to only serialize minimalist DistributedNode information, such as its ID, without considering its weight or data, that are optional to insert a DistributedNode into a DistributedGraph.

See also
light_serializer
light_serializer< NodePtrWrapper< T > >

◆ datapack_serializer

template<typename T , typename Enable = void>
using fpmas::io::json::datapack_serializer = typedef basic_datapack_serializer<T, fpmas::io::datapack::ObjectPack>

An fpmas::io::datapack::ObjectPack based nlohmann::json serializer.

Template Parameters
Ttype to serialize as an ObjectPack instance

◆ datapack_json

typedef nlohmann::basic_json<std::map, std::vector, std::string, bool, std::int64_t, std::uint64_t, double, std::allocator, datapack_serializer> fpmas::io::json::datapack_json

An ObjectPack based nlohmann::basic_json.

◆ light_datapack_serializer

template<typename T , typename Enable = void>
using fpmas::io::json::light_datapack_serializer = typedef basic_datapack_serializer<T, fpmas::io::datapack::LightObjectPack>

An fpmas::io::datapack::LightObjectPack based nlohmann::json serializer. Can be considered as the light version of datapack_serializer.

◆ light_datapack_json

typedef nlohmann::basic_json<std::map, std::vector, std::string, bool, std::int64_t, std::uint64_t, double, std::allocator, light_datapack_serializer> fpmas::io::json::light_datapack_json

An fpmas::io::datapack::LightObjectPack based nlohmann::basic_json. Can be considered as the light version of datapack_json.