![]() |
Shamrock 2025.10.0
Astrophysical Code
|
Customization point controlling how an alternative's fields (if any) are serialized to / parsed from the "parameters" json value carried alongside its name. More...
#include <shamalgs/include/shamalgs/ImplVariant.hpp>
Static Public Member Functions | |
| static nlohmann::json | to_json (const Alt &) |
| Serialize the alternative's fields (default: no fields, empty object). | |
| static Alt | from_json (const nlohmann::json &) |
| Parse the alternative's fields back (default: no fields, ignored). | |
Customization point controlling how an alternative's fields (if any) are serialized to / parsed from the "parameters" json value carried alongside its name.
The default (used by empty/tag alternatives, i.e. most of them) serializes to an empty json object. Alternatives with tunable fields (e.g. a group size) specialize this trait, for example:
Definition at line 84 of file ImplVariant.hpp.
|
inlinestatic |
Parse the alternative's fields back (default: no fields, ignored).
Definition at line 88 of file ImplVariant.hpp.
|
inlinestatic |
Serialize the alternative's fields (default: no fields, empty object).
Definition at line 86 of file ImplVariant.hpp.