#ifndef CONNECTOR_H
#define CONNECTOR_H
#include "memory"
#include "json.hpp"

#include "Input.h"
#include "Output.h"

#include "ModuleMerge.h"
#include "ModuleSplitt.h"
#include "ModuleSQL.h"
#include "ModuleSwitch.h"

#include "ProcessorStandard.h"

namespace mdd {
	class Connector {

	public:
		/*
		json{
		"type": "StandardProcessor",
		("params": [param1, param2,...])
		("subs":[
		{
		"type": "Math",
		"params":[param1,param2,...]
		},
		{
		"type": "Math",
		"params":[param1,param2,...]
		}
		],
		"connections":[[in1,out1],[in2,out2],...]
		})
		*/
		static std::shared_ptr<IModule> decode(const json& structure);
		static const json& encode(const std::shared_ptr<IModule>& structure);
	};
}

#endif