template<typename GridCellType, typename Derived>
struct nlohmann::adl_serializer< fpmas::api::utils::PtrWrapper< fpmas::model::GridCellBase< GridCellType, Derived > > >
Polymorphic GridCellBase nlohmann json serializer specialization.
template<typename GridCellType , typename Derived >
Unserializes a polymorphic GridCellBase from the specified Json.
First, the Derived part, that extends GridCellBase 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 GridAgent members undefined. The specific GridAgent member location_point is then initialized from j[1], the internal random number generator is unserialized from j[2], and the unserialized Derived instance is returned in the form of a polymorphic GridCellBase pointer.
- Parameters
-
- Returns
- unserialized pointer to a polymorphic
GridCellBase