diff options
Diffstat (limited to 'src/server/events/Connect.hpp')
-rw-r--r-- | src/server/events/Connect.hpp | 44 |
1 files changed, 28 insertions, 16 deletions
diff --git a/src/server/events/Connect.hpp b/src/server/events/Connect.hpp index adc80afc..458df0ef 100644 --- a/src/server/events/Connect.hpp +++ b/src/server/events/Connect.hpp @@ -17,15 +17,25 @@ #ifndef INGEN_EVENTS_CONNECT_HPP #define INGEN_EVENTS_CONNECT_HPP -#include "CompiledGraph.hpp" #include "Event.hpp" #include "PortImpl.hpp" #include "types.hpp" +#include <ingen/Message.hpp> +#include <ingen/Properties.hpp> +#include <raul/Maid.hpp> + +#include <memory> + namespace ingen { + +class Interface; + namespace server { class ArcImpl; +class CompiledGraph; +class Engine; class GraphImpl; class InputPort; @@ -38,27 +48,29 @@ namespace events { class Connect : public Event { public: - Connect(Engine& engine, - const SPtr<Interface>& client, - SampleCount timestamp, - const ingen::Connect& msg); + Connect(Engine& engine, + const std::shared_ptr<Interface>& client, + SampleCount timestamp, + const ingen::Connect& msg); + + ~Connect() override; bool pre_process(PreProcessContext& ctx) override; - void execute(RunContext& context) override; + void execute(RunContext& ctx) override; void post_process() override; void undo(Interface& target) override; private: - const ingen::Connect _msg; - GraphImpl* _graph; - InputPort* _head; - MPtr<CompiledGraph> _compiled_graph; - SPtr<ArcImpl> _arc; - MPtr<PortImpl::Voices> _voices; - Properties _tail_remove; - Properties _tail_add; - Properties _head_remove; - Properties _head_add; + const ingen::Connect _msg; + GraphImpl* _graph{nullptr}; + InputPort* _head{nullptr}; + std::unique_ptr<CompiledGraph> _compiled_graph; + std::shared_ptr<ArcImpl> _arc; + raul::managed_ptr<PortImpl::Voices> _voices; + Properties _tail_remove; + Properties _tail_add; + Properties _head_remove; + Properties _head_add; }; } // namespace events |