![]() |
fpmas 1.5
|
#include <location_manager.h>
Static Public Member Functions | |
| static void | to_json (json &j, const fpmas::api::graph::LocationManager< T > &location_manager) |
| static void | from_json (const json &j, fpmas::api::graph::LocationManager< T > &location_manager) |
Defines json serialization rules for generic fpmas::api::graph::LocationManager instances.
Notice that it is assumed that the internal state of a LocationManager is defined only by the location of its managed nodes. In consequence, the LocationManager::getLocalNodes() and LocationManager::getDistantNodes() lists for example are not considered by the serialization process. It is the responsibility of the DistributedGraph to call LocationManager::setLocal() and LocationManager::setDistant() methods accordingly when the DistributedGraph is unserialized.
|
inlinestatic |
Serializes the location_manager to the json j.
| j | json output |
| location_manager | location manager to serialize |
|
inlinestatic |
Unserializes the json j into the specified location_manager.
Managed nodes read from the input json are added to the location_manager, without considering its current state, so clearing the location_manager before loading data into it might be required, depending on the expected behavior.
| j | json input |
| location_manager | output location manager |