12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667 |
- #pragma once
- #include "memory"
- #include "json.hpp"
- #include <filesystem>
- #include <iostream>
- #include <iomanip>
- #include <fstream>
- #include "Input.h"
- #include "Output.h"
- #include <Registration.h>
- #include <ProcessorStandard.h>
- namespace mdd {
- class Connector {
- private:
- Registration regi = Registration();
- IProcessor::Ptr _root;
- IOptimizer::Ptr _opt;
- const std::map<const std::string, std::function<json(const json&)>> _ops = {//const std::map<const std::string, const json& (Connector::*)(const json&)> _ops = {
- {"add", std::bind(&Connector::add,this,std::placeholders::_1) },
- {"change", std::bind(&Connector::change,this,std::placeholders::_1)},
- {"load", std::bind(&Connector::load,this,std::placeholders::_1)},
- {"remove", std::bind(&Connector::remove,this,std::placeholders::_1)},
- {"save", std::bind(&Connector::save,this,std::placeholders::_1)},
- {"state", std::bind(&Connector::state,this,std::placeholders::_1)}
- };
- /**
- *subject
- *object
- **/
- //refernece funktioniert nicht!????
- json add(const json& args);
- /**
- *subject
- *object
- **/
- json remove(const json& args);
- /**
- *subject
- *object
- **/
- json change(const json& args);
- /**
- *subject
- *object
- **/
- json state(const json& args);
- json save(const json& args);
- json load(const json& args);
- public:
- Connector();
- json decode(const json& request);
- json encode();
- };
- }
|