IInput.h 805 B

1234567891011121314151617181920212223242526272829303132
  1. #ifndef MDD_IINPUT_H
  2. #define MDD_IINPUT_H
  3. //#include "json.hpp"
  4. #include <memory>
  5. #include "IInteractive.h"
  6. #include "IOutput.h"
  7. #include <vector>
  8. namespace mdd{
  9. struct limits {
  10. std::vector<double> min;
  11. std::vector<double> max;
  12. std::vector<double> step;
  13. std::string rule;
  14. std::vector<std::vector<double>> elements;
  15. };
  16. class IInput
  17. : public IInteractive<IOutput>
  18. {
  19. public:
  20. typedef std::shared_ptr<IInput> Ptr;
  21. virtual const std::shared_ptr<limits> getLimits() = 0;
  22. virtual std::shared_ptr<limits>& setLimits() = 0;
  23. virtual std::shared_ptr<IOutput> getConnection() = 0;
  24. virtual ~IInput() = default;
  25. int removeConnection(std::shared_ptr<IOutput> output = nullptr) = 0;
  26. };
  27. }
  28. #endif