summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-05 04:44:54 +0000
committerDavid Robillard <d@drobilla.net>2007-10-05 04:44:54 +0000
commitc7ebab1bda68e184ef9f7063b48fe2a65113b961 (patch)
tree0580b6e27e7dd4a50bd5cb652c5bf2466b0fc6ab
parent2f991988c6b3d91652461fe70447e343fb3aa916 (diff)
downloadingen-c7ebab1bda68e184ef9f7063b48fe2a65113b961.tar.gz
ingen-c7ebab1bda68e184ef9f7063b48fe2a65113b961.tar.bz2
ingen-c7ebab1bda68e184ef9f7063b48fe2a65113b961.zip
Fix connection serialisation.
Do hidden graphviz render to /dev/null instead of /home/dave/test.graphviz. Oops. :) git-svn-id: http://svn.drobilla.net/lad/ingen@823 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/libs/client/Serializer.cpp38
1 files changed, 18 insertions, 20 deletions
diff --git a/src/libs/client/Serializer.cpp b/src/libs/client/Serializer.cpp
index 1652e546..aaf9c955 100644
--- a/src/libs/client/Serializer.cpp
+++ b/src/libs/client/Serializer.cpp
@@ -16,38 +16,36 @@
*/
#include <algorithm>
-#include <iostream>
-#include <fstream>
-#include <string>
-#include <vector>
-#include <utility> // pair, make_pair
-#include <stdexcept>
#include <cassert>
#include <cmath>
#include <cstdlib> // atof
-#include <boost/optional/optional.hpp>
#include <cstring>
+#include <fstream>
+#include <iostream>
#include <locale.h>
-#include <raul/RDFWorld.hpp>
-#include <raul/RDFModel.hpp>
-#include <raul/RDFNode.hpp>
-#include <raul/Path.hpp>
+#include <stdexcept>
+#include <string>
+#include <utility> // pair, make_pair
+#include <vector>
#include <raul/Atom.hpp>
#include <raul/AtomRedland.hpp>
+#include <raul/Path.hpp>
+#include <raul/RDFModel.hpp>
+#include <raul/RDFNode.hpp>
+#include <raul/RDFWorld.hpp>
#include <raul/TableImpl.hpp>
#include "interface/EngineInterface.hpp"
-#include "Serializer.hpp"
-#include "PatchModel.hpp"
-#include "NodeModel.hpp"
#include "ConnectionModel.hpp"
+#include "NodeModel.hpp"
+#include "PatchModel.hpp"
+#include "PluginModel.hpp"
#include "PortModel.hpp"
#include "PresetModel.hpp"
-#include "PluginModel.hpp"
+#include "Serializer.hpp"
using namespace std;
using namespace Raul;
using namespace Raul::RDF;
-using boost::optional;
namespace Ingen {
namespace Client {
@@ -158,7 +156,6 @@ Serializer::path_to_node_id(const Path& path)
Node id = _world.blank_id();
assert(id);
_node_map[path] = id;
- assert(_node_map[path]);
return id;
}
}
@@ -421,9 +418,10 @@ Serializer::serialize_connection(SharedPtr<ConnectionModel> connection) throw (s
if (!_model)
throw std::logic_error("serialize_connection called without serialization in progress");
- _model->add_statement(path_to_node_id(connection->dst_port_path()),
- "ingen:connectedTo",
- path_to_node_id(connection->src_port_path()));
+ const Node src_node = path_to_node_id(connection->src_port_path());
+ const Node dst_node = path_to_node_id(connection->dst_port_path());
+
+ _model->add_statement(dst_node, "ingen:connectedTo", src_node);
}