![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Declare a class to register and retrieve nodes and edges from a unique container. More...
#include "shambase/exception.hpp"#include "shamsolvergraph/JsonSerializable.hpp"#include "shamsolvergraph/SolverGraph.hpp"Go to the source code of this file.
Classes | |
| class | shamrock::solvergraph::SolverGraphSerializable |
Namespaces | |
| namespace | shamrock |
| namespace for the main framework | |
Functions | |
| void | shamrock::solvergraph::to_json (nlohmann::json &j, const SolverGraphSerializable &p) |
| Serialize a SolverGraphSerializable to JSON. | |
| void | shamrock::solvergraph::from_json (const nlohmann::json &j, SolverGraphSerializable &p) |
| Deserialize a SolverGraphSerializable from JSON. | |
Declare a class to register and retrieve nodes and edges from a unique container.
Definition in file SolverGraphSerializable.hpp.
|
inline |
Deserialize a SolverGraphSerializable from JSON.
Expects an "edges" object. Each entry is reconstructed via JsonSerializable::from_json and registered under its key. Edge types must already be registered in JsonSerializable_registry.
Population is all-or-nothing: edges are first registered into a temporary graph, and p is only replaced after every edge has been deserialized successfully. On any exception, p is left unchanged.
Definition at line 83 of file SolverGraphSerializable.hpp.
|
inline |
Serialize a SolverGraphSerializable to JSON.
Writes an "edges" object keyed by edge name. Each edge value includes the polymorphic "type" discriminator and fields from JsonSerializable::to_json.
Definition at line 49 of file SolverGraphSerializable.hpp.