Shamrock 2025.10.0
Astrophysical Code
Loading...
Searching...
No Matches
json_variant.hpp File Reference
#include "shambase/exception.hpp"
#include "shambase/string.hpp"
#include <nlohmann/json.hpp>
#include <variant>
Include dependency graph for json_variant.hpp:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  shamrock::variant_to_tuple< std::variant< Ts... > >
struct  shamrock::type_tag< T >

Namespaces

namespace  shamrock
 namespace for the main framework

Typedefs

template<typename T>
using shamrock::variant_to_tuple_t = typename variant_to_tuple<T>::type

Functions

template<class Functor, typename... Ts>
bool shamrock::on_variant_match (const std::string &type_id, Functor &&callback, const std::variant< Ts... > &var)
template<class Functor, typename... Ts>
void shamrock::on_variant_cases (Functor &&callback, const std::variant< Ts... > &var)
template<typename... Ts>
void shamrock::json_deserialize_variant (const nlohmann::json &j, const std::string &type_id, std::variant< Ts... > &var)

Detailed Description

Author
Timothée David–Cléris (tim.s.nosp@m.hamr.nosp@m.ock@p.nosp@m.roto.nosp@m.n.me)

Definition in file json_variant.hpp.