more refactoring and breaking things

This commit is contained in:
Sebastian
2026-01-06 02:44:18 +01:00
parent f086834da6
commit 77a227f40d
25 changed files with 2416 additions and 2304 deletions
-46
View File
@@ -3,7 +3,6 @@
#include "config-node.h"
#include "midi-node.h"
#include "graph-item.h"
#include "node-handle.h"
#include "node.h"
#include "edge.h"
@@ -35,27 +34,6 @@ namespace nlohmann {
}
}
};
/*template <typename T>*/
/*struct adl_serializer<std::shared_ptr<T>> {*/
/* template <typename J>*/
/* static void to_json(J& j, const std::shared_ptr<T>& opt) {*/
/* if (opt) {*/
/* j = *opt;*/
/* } else {*/
/* j = nullptr;*/
/* }*/
/* }*/
/**/
/* template <typename J>*/
/* static void from_json(const J& j, std::shared_ptr<T>& opt) {*/
/* if (j.is_null()) {*/
/* opt = nullptr;*/
/* } else {*/
/* opt.reset(new T(j.template get<T>()));*/
/* }*/
/* }*/
/*};*/
}
namespace VISEQ::GRAPH::EDGES {
@@ -84,36 +62,12 @@ namespace VISEQ::GRAPH::NODES {
/* ------------------- MIDINODE ---------------------- */
/*inline void to_json(json& j, const std::shared_ptr<MidiNode>& N){*/
/* j = *N;*/
/*}*/
/**/
/*inline void from_json(const json& j, std::shared_ptr<MidiNode>& N){*/
/* N.reset(new MidiNode(j.get<MidiNode>()));*/
/*}*/
inline void to_json(json& j, const MidiNode::NodeMidiOut& MO){
j = json{{"port_id", MO.i}, {"enabled", MO.enabled}, {"name", MO.name}};
}
/*template< typename T>*/
/*inline void to_json(json& j, const std::shared_ptr<NodeHandle<T>>& NH){*/
/* j = json{{"position", NH->position}};*/
/*}*/
/* ----------------- CONFIG NODE -----------------*/
/*inline void to_json(json& j, const std::shared_ptr<ConfigNode>& N){*/
/* j = *N;*/
/*}*/
/**/
/*inline void from_json(const json& j, std::shared_ptr<ConfigNode>& N){*/
/* N.reset(new ConfigNode(j.get<ConfigNode>()));*/
/*}*/
/* ------------------- NODE ---------------------- */
inline void to_json(json& j, const Node& N){
if(N.getNodeType() == NodeType::MIDINODE){
j = dynamic_cast<const MidiNode&>(N);