diff options
Diffstat (limited to 'src/server/events/CreateBlock.hpp')
-rw-r--r-- | src/server/events/CreateBlock.hpp | 39 |
1 files changed, 25 insertions, 14 deletions
diff --git a/src/server/events/CreateBlock.hpp b/src/server/events/CreateBlock.hpp index 00f58008..0ee6e36f 100644 --- a/src/server/events/CreateBlock.hpp +++ b/src/server/events/CreateBlock.hpp @@ -18,15 +18,24 @@ #define INGEN_EVENTS_CREATEBLOCK_HPP #include "ClientUpdate.hpp" -#include "CompiledGraph.hpp" #include "Event.hpp" +#include "types.hpp" + +#include <raul/Path.hpp> #include <cstdint> +#include <memory> namespace ingen { + +class Interface; +class Properties; + namespace server { class BlockImpl; +class CompiledGraph; +class Engine; class GraphImpl; namespace events { @@ -38,25 +47,27 @@ namespace events { class CreateBlock : public Event { public: - CreateBlock(Engine& engine, - const SPtr<Interface>& client, - int32_t id, - SampleCount timestamp, - const Raul::Path& path, - Properties& properties); + CreateBlock(Engine& engine, + const std::shared_ptr<Interface>& client, + int32_t id, + SampleCount timestamp, + raul::Path path, + Properties& properties); + + ~CreateBlock() 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: - Raul::Path _path; - Properties& _properties; - ClientUpdate _update; - GraphImpl* _graph; - BlockImpl* _block; - MPtr<CompiledGraph> _compiled_graph; + raul::Path _path; + Properties& _properties; + ClientUpdate _update; + GraphImpl* _graph{nullptr}; + BlockImpl* _block{nullptr}; + std::unique_ptr<CompiledGraph> _compiled_graph; }; } // namespace events |