summaryrefslogtreecommitdiffstats
path: root/src/server/events/CreateGraph.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server/events/CreateGraph.cpp')
-rw-r--r--src/server/events/CreateGraph.cpp38
1 files changed, 20 insertions, 18 deletions
diff --git a/src/server/events/CreateGraph.cpp b/src/server/events/CreateGraph.cpp
index bcc935bb..5df28afa 100644
--- a/src/server/events/CreateGraph.cpp
+++ b/src/server/events/CreateGraph.cpp
@@ -14,35 +14,36 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "events/CreateGraph.hpp"
+#include "CreateGraph.hpp"
#include "BlockImpl.hpp"
#include "Broadcaster.hpp"
#include "CompiledGraph.hpp"
+#include "CreatePort.hpp"
#include "Engine.hpp"
#include "GraphImpl.hpp"
#include "PreProcessContext.hpp"
-#include "events/CreatePort.hpp"
#include "types.hpp"
-#include "ingen/Forge.hpp"
-#include "ingen/Interface.hpp"
-#include "ingen/Node.hpp"
-#include "ingen/Resource.hpp"
-#include "ingen/Status.hpp"
-#include "ingen/Store.hpp"
-#include "ingen/URI.hpp"
-#include "ingen/URIs.hpp"
-#include "ingen/World.hpp"
-#include "ingen/paths.hpp"
-#include "raul/Maid.hpp"
-#include "raul/Path.hpp"
-#include "raul/Symbol.hpp"
+#include <ingen/Forge.hpp>
+#include <ingen/Interface.hpp>
+#include <ingen/Node.hpp>
+#include <ingen/Properties.hpp>
+#include <ingen/Resource.hpp>
+#include <ingen/Status.hpp>
+#include <ingen/Store.hpp>
+#include <ingen/URI.hpp>
+#include <ingen/URIs.hpp>
+#include <ingen/World.hpp>
+#include <ingen/paths.hpp>
+#include <raul/Path.hpp>
+#include <raul/Symbol.hpp>
#include <boost/intrusive/slist.hpp>
#include <map>
#include <memory>
+#include <string>
#include <utility>
namespace ingen::server::events {
@@ -192,7 +193,7 @@ CreateGraph::pre_process(PreProcessContext& ctx)
if (_parent->enabled()) {
_graph->enable();
}
- _compiled_graph = ctx.maybe_compile(*_engine.maid(), *_parent);
+ _compiled_graph = ctx.maybe_compile(*_parent);
}
_graph->activate(*_engine.buffer_factory());
@@ -219,7 +220,8 @@ CreateGraph::execute(RunContext& ctx)
if (_graph) {
if (_parent) {
if (_compiled_graph) {
- _parent->set_compiled_graph(std::move(_compiled_graph));
+ _compiled_graph =
+ _parent->swap_compiled_graph(std::move(_compiled_graph));
}
} else {
_engine.set_root_graph(_graph);
@@ -235,7 +237,7 @@ CreateGraph::execute(RunContext& ctx)
void
CreateGraph::post_process()
{
- Broadcaster::Transfer t(*_engine.broadcaster());
+ const Broadcaster::Transfer t{*_engine.broadcaster()};
if (respond() == Status::SUCCESS) {
_update.send(*_engine.broadcaster());
}