Input.h 537 B

12345678910111213141516171819202122
  1. #ifndef MDD_INPUT_H
  2. #define MDD_INPUT_H
  3. #include <string>
  4. #include <functional>
  5. #include "Output.h"
  6. #include <bits/shared_ptr.h>
  7. namespace mdd {
  8. struct Input {
  9. std::string type;
  10. json value;
  11. std::function<bool(const json &)> verification;
  12. std::shared_ptr <IOutput> output;
  13. Input(const std::string &type, const json &default_value,
  14. const std::function<bool(const json &)> &verification = [](
  15. const json &) { return true; });
  16. };
  17. }
  18. #endif //MDD_INPUT_H