Connector.h 606 B

12345678910111213141516171819202122232425262728293031323334353637
  1. #ifndef CONNECTOR_H
  2. #define CONNECTOR_H
  3. #include "memory"
  4. #include "json.hpp"
  5. #include "Input.h"
  6. #include "Output.h"
  7. #include <Registration.h>
  8. namespace mdd {
  9. class Connector {
  10. public:
  11. /*
  12. json{
  13. "type": "StandardProcessor",
  14. ("params": [param1, param2,...])
  15. ("subs":[
  16. {
  17. "type": "Math",
  18. "params":[param1,param2,...]
  19. },
  20. {
  21. "type": "Math",
  22. "params":[param1,param2,...]
  23. }
  24. ],
  25. "connections":[[in1,out1],[in2,out2],...]
  26. })
  27. */
  28. static std::shared_ptr<IModule> decode(const json& structure);
  29. static const json& encode(const std::shared_ptr<IModule>& structure);
  30. };
  31. }
  32. #endif