summaryrefslogtreecommitdiffstats
path: root/src/Reactor.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-05-11 12:04:36 -0400
committerDavid Robillard <d@drobilla.net>2021-05-11 13:35:16 -0400
commit75ee1ed27d5d2c60e867abef09ee920446ac13de (patch)
tree7c711813cf6282de24f08c96fd6e5465ea7414e5 /src/Reactor.hpp
parent37ede19b4d1e924f954d8b16d3e071a4768ce278 (diff)
downloadpatchage-75ee1ed27d5d2c60e867abef09ee920446ac13de.tar.gz
patchage-75ee1ed27d5d2c60e867abef09ee920446ac13de.tar.bz2
patchage-75ee1ed27d5d2c60e867abef09ee920446ac13de.zip
Move drivers to a separate object
Towards eliminating dependencies on the Patchage "god object".
Diffstat (limited to 'src/Reactor.hpp')
-rw-r--r--src/Reactor.hpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/src/Reactor.hpp b/src/Reactor.hpp
index 04b699d..9317b0a 100644
--- a/src/Reactor.hpp
+++ b/src/Reactor.hpp
@@ -18,19 +18,18 @@
#define PATCHAGE_REACTOR_HPP
#include "Action.hpp"
-#include "PortID.hpp"
#include "SignalDirection.hpp"
-#include <unordered_map>
-
namespace patchage {
+struct PortID;
+
class CanvasModule;
class CanvasPort;
-class Driver;
+class ClientID;
+class Drivers;
class ILog;
class Patchage;
-class ClientID;
/// Reacts to actions from the user
class Reactor
@@ -48,8 +47,6 @@ public:
~Reactor() = default;
- void add_driver(PortID::Type type, Driver* driver);
-
void operator()(const action::ConnectPorts& action);
void operator()(const action::DisconnectClient& action);
void operator()(const action::DisconnectPort& action);
@@ -64,9 +61,9 @@ private:
CanvasModule* find_module(const ClientID& client, SignalDirection type);
CanvasPort* find_port(const PortID& port);
- Patchage& _patchage;
- ILog& _log;
- std::unordered_map<PortID::Type, Driver*> _drivers;
+ Patchage& _patchage;
+ ILog& _log;
+ Drivers& _drivers;
};
} // namespace patchage