template<typename AgentType, typename Derived>
struct nlohmann::adl_serializer< fpmas::api::utils::PtrWrapper< fpmas::model::GraphCellBase< AgentType, Derived > > >
Polymorphic GraphCellBase nlohmann json serializer specialization.
template<typename AgentType , typename Derived >
Unserializes a polymorphic GraphCellBase from the specified Json.
First, the Derived part, that extends GraphCellBase by definition, is unserialized from j[0] using the adl_serializer<fpmas::api::utils::PtrWrapper<Derived> specialization, that can be defined externally without any constraint. During this operation, a Derived instance is dynamically allocated, that might leave the GraphCellBase members undefined. The specific GraphCellBase member reachable_nodes is then initialized from j[1], and the unserialized Derived instance is returned in the form of a polymorphic GraphCellBase pointer.
- Parameters
-
- Returns
- unserialized pointer to a polymorphic
GraphCellBase