IModule.h 1.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445
  1. #ifndef MDD_IModule_H
  2. #define MDD_IModule_H
  3. #include "IOutput.h"
  4. #include "IInput.h"
  5. #include "IManager.h"
  6. #include "state.h"
  7. #include <string>
  8. #include <vector>
  9. #include <memory>
  10. namespace mdd {
  11. class IModule
  12. : public IUnique
  13. , public IManager
  14. {
  15. public:
  16. typedef std::shared_ptr<IModule> Ptr;
  17. virtual size_t getNumInputs() = 0;
  18. virtual size_t getNumOutputs() = 0;
  19. //"Processor1/Math1/Value1"
  20. //Proc2/MAth1;Value1
  21. //Proc2->get(MAth1;Value1)
  22. //MAth1;Value1
  23. //MAth1->get(Value1)
  24. //Value1
  25. virtual std::shared_ptr<IInput> getInput(const std::string& id) = 0;
  26. virtual std::shared_ptr<IInput> getInput(size_t index) = 0;
  27. virtual std::shared_ptr<IOutput> getOutput(const std::string& id) = 0;
  28. virtual std::shared_ptr<IOutput> getOutput(size_t index) = 0;
  29. virtual std::vector<std::shared_ptr<IInput>> getOptimizableInputs() = 0;
  30. virtual std::vector<std::shared_ptr<IOutput>> getOptimizableOutputs() = 0;
  31. //virtual std::vector <std::vector <std::shared_ptr<IInput>>> getConnectionsOf(Input) = 0;
  32. //virtual std::vector <std::shared_ptr<IInput>> getOptimizable() = 0;
  33. virtual state update() = 0;
  34. virtual void disconnect() = 0;
  35. virtual ~IModule() = default;
  36. };
  37. }
  38. #endif