IConnection.h 429 B

123456789101112131415161718192021
  1. #ifndef ICONNECTION_H
  2. #define ICONNECTION_H
  3. #include <vector>
  4. #include <memory>
  5. #include "IUnique.h"
  6. namespace mdd {
  7. template <class T>
  8. class IConnection
  9. {
  10. public:
  11. virtual int addConnection(std::shared_ptr<T> conector) = 0;
  12. virtual int removeConnection(std::shared_ptr<T> conector) = 0;
  13. virtual bool connect(std::shared_ptr<T> conector) = 0;
  14. virtual void disconnect() = 0;
  15. virtual ~IConnection() {};
  16. };
  17. }
  18. #endif