12345678910111213141516171819202122232425262728293031 |
- #ifndef MDD_ModuleBase_H
- #define MDD_ModuleBase_H
- #include "Input.h"
- #include "IModule.h"
- namespace mdd {
- class ModuleBase : public IModule{
- private:
- std::string _type;
- std::vector<Input> _inputs;
- std::vector<std::shared_ptr<Output>> _outputs;
- public:
- int addInput(const std::string& type, const json& value,
- const std::function<bool(const json&)>& verification = [](
- const json&) { return true; });
- void setType(std:: string type);
- std::string getType() override;
- json& setInputDefaultValue(int handle) override;
- const json& getInputValue(int handle) override;
- bool connectInput(int handle, std::shared_ptr<IOutput> output) override;
- std::vector<std::string> getInputs() override;
- std::vector<std::string> getOutputs() override;
- std::shared_ptr<IOutput> getOutput(int handle) override;
- int addOutput(const std::string& type, const json& initial);
- json &setOutputValue(int handle);
- };
- }
- #endif //MDD_BASEMODULE_H
|