more refactoring and breaking things
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user