12345678910111213141516171819202122232425262728293031323334353637383940 |
- #ifndef MDD_PROCESSORBASE_H
- #define MDD_PROCESSORBASE_H
- #include <list>
- #include "Input.h"
- #include "IProcessor.h"
- #include "HandlerModule.h"
- namespace mdd {
- class ProcessorBase : public IProcessor{
- private:
- std::string _type;
- //std::vector<Input> _processor_inputs;
- //std::vector<std::shared_ptr<Output>> _processor_outputs;
- std::vector<HandlerModule> _module_inputs;
- std::vector<HandlerModule> _module_outputs;
- std::vector<std::shared_ptr<IModule>> _modules;
- public:
- void setType(std:: string type);
- std::string getType() override;
- int addModule(std::shared_ptr<IModule> module) override ;
- //int addInput(const std::string& type, const json& value,
- // const std::function<bool(const json&)>& verification = [](
- // const json&) { return true; });
- int addInput(int moduleHandler, int inputHandler);
- int addOutput(int moduleHandler, int outputHandler);
- //int addOutput(const std::string& type, const json& initial);
- json& setInputDefaultValue(int handle) override;
- //json& setOutputValue(int handle);
- 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;
- std::vector<std::string> getModules() override;
- std::shared_ptr<IModule> getModule(int handle) override;
- };
- }
- #endif
|