#pragma once #include #include "Input.h" #include "Output.h" #include "IProcessor.h" #include "Registration.h" namespace mdd { class Registration; class ProcessorBase : public IProcessor { private: std::weak_ptr _parent; std::string _name = ""; int _appendix = 0; protected: json _base_config; ProcessorBase(const std::string& base_config); std::string type = "processor"; std::string key; std::vector>processor_inputs; std::vector> processor_outputs; std::vector> modules; std::vector> inputs; std::vector> outputs; bool configureChild(const json& config) override; public: bool configure(const json& config) override; const json& getConfiguration() override; void setParent(std::shared_ptr parent) override; std::vector getParentID() override; std::string getGeneratorKey() override; std::string getType() override; std::string setName(const std::string& name) override; std::string getName() override; std::string setAppendix(int appendix) override; int getAppendix() override; std::string getID() override; std::string addModule(std::shared_ptr module) override ; void removeModule(std::shared_ptr module) override; std::vector>& getInputParams() override; std::vector>& getOutputParams() override; size_t getNumInputs() override; size_t getNumOutputs() override; std::shared_ptr getInput(const std::string& id) override; std::shared_ptr getInput(size_t index) override; std::shared_ptr getOutput(const std::string& id) override; std::shared_ptr getOutput(size_t index) override; std::vector> getOptimizableInputs() override; std::vector> getOptimizableOutputs() override; std::vector>& getModules(); size_t getNumModuls() override; std::shared_ptr getModule(size_t index) override; std::shared_ptr getModule(const std::string& id) override; bool connect(const std::string& output_id, const std::vector& input_ids); void disconnect() override; void load(const json& j) override; json dump() override; json getIdentifier() override; }; } //*/