From c11ecf0fd10641218326ae384e80413ba3cdf46c Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 27 May 2009 17:42:51 +0000 Subject: Remove 'new_patch', 'new_node', and 'new_port' from interface in favour of generic 'put'. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2011 a436a847-0d15-0410-975c-d299462d15a1 --- src/shared/Builder.cpp | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) (limited to 'src/shared/Builder.cpp') diff --git a/src/shared/Builder.cpp b/src/shared/Builder.cpp index 45c4badf..ba26d962 100644 --- a/src/shared/Builder.cpp +++ b/src/shared/Builder.cpp @@ -25,6 +25,7 @@ #include "common/interface/Plugin.hpp" using namespace std; +using namespace Raul; namespace Ingen { namespace Shared { @@ -41,8 +42,12 @@ Builder::build(SharedPtr object) { SharedPtr patch = PtrCast(object); if (patch) { - if (!object->path().is_root()) - _interface.new_patch(object->path(), patch->internal_polyphony()); + if (!object->path().is_root()) { + Resource::Properties props; + props.insert(make_pair("rdf:type", Atom(Atom::URI, "ingen:Patch"))); + props.insert(make_pair("ingen:polyphony", Atom(int32_t(patch->internal_polyphony())))); + _interface.put(object->path(), props); + } build_object(object); /*for (Patch::Connections::const_iterator i = patch->connections().begin(); @@ -54,16 +59,17 @@ Builder::build(SharedPtr object) SharedPtr node = PtrCast(object); if (node) { - Raul::Path path = node->path(); - _interface.new_node(path, node->plugin()->uri()); + Resource::Properties props; + props.insert(make_pair("rdf:type", Atom(Atom::URI, "ingen:Node"))); + props.insert(make_pair("rdf:instanceOf", Atom(Atom::URI, node->plugin()->uri().str()))); + _interface.put(node->path(), props); build_object(object); return; } SharedPtr port = PtrCast(object); if (port) { - Raul::Path path = port->path(); - _interface.new_port(path, port->type().uri(), port->index(), !port->is_input()); + _interface.put(port->path(), port->properties()); build_object(object); return; } -- cgit v1.2.1