Running again. Next step: making connections work again!

This commit is contained in:
Sebastian
2024-12-05 00:01:42 +01:00
parent 036c6f4723
commit b6c2029386
8 changed files with 56 additions and 58 deletions
+18 -28
View File
@@ -20,35 +20,25 @@
typedef std::shared_ptr<VISEQ::GRAPH::GraphItem> SPTR_GraphItem;
typedef std::vector<SPTR_GraphItem> VEC_SPTR_GraphItem;
namespace nlohmann
{
template <typename T>
struct adl_serializer<std::shared_ptr<T>>
{
static void to_json(json& j, const std::shared_ptr<T>& opt)
{
if (opt)
{
j = *opt;
}
else
{
j = nullptr;
}
}
namespace nlohmann {
template <typename T>
struct adl_serializer<std::shared_ptr<T>> {
static void to_json(json& j, const std::shared_ptr<T>& opt) {
if (opt) {
j = *opt;
} else {
j = nullptr;
}
}
static void from_json(const json& j, std::shared_ptr<T>& opt)
{
if (j.is_null())
{
opt = nullptr;
}
else
{
opt.reset(new T(j.get<T>()));
}
}
};
static void from_json(const json& j, std::shared_ptr<T>& opt) {
if (j.is_null()) {
opt = nullptr;
} else {
opt.reset(new T(j.get<T>()));
}
}
};
}
namespace VISEQ::GRAPH::EDGES {