diff options
author | David Robillard <d@drobilla.net> | 2012-07-30 22:10:00 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-07-30 22:10:00 +0000 |
commit | 921881813d7fb2e46a0e65d1e888f6cd9a928945 (patch) | |
tree | 258bc29a691d2a8964afe8b66698e5e3d8307094 /src/shared | |
parent | 155f4c422735cdb7400d9290dc6defca8f580a1b (diff) | |
download | ingen-921881813d7fb2e46a0e65d1e888f6cd9a928945.tar.gz ingen-921881813d7fb2e46a0e65d1e888f6cd9a928945.tar.bz2 ingen-921881813d7fb2e46a0e65d1e888f6cd9a928945.zip |
Simplify Builder (which is kind of useless anyway but remains for now).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4575 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/Builder.cpp | 48 |
1 files changed, 1 insertions, 47 deletions
diff --git a/src/shared/Builder.cpp b/src/shared/Builder.cpp index b3f005f1..944b00ce 100644 --- a/src/shared/Builder.cpp +++ b/src/shared/Builder.cpp @@ -16,10 +16,6 @@ #include "ingen/Edge.hpp" #include "ingen/Interface.hpp" -#include "ingen/Node.hpp" -#include "ingen/Patch.hpp" -#include "ingen/Plugin.hpp" -#include "ingen/Port.hpp" #include "ingen/shared/Builder.hpp" #include "ingen/shared/URIs.hpp" #include "raul/Atom.hpp" @@ -39,42 +35,7 @@ Builder::Builder(Shared::URIs& uris, Interface& interface) void Builder::build(SharedPtr<const GraphObject> object) { - SharedPtr<const Patch> patch = PtrCast<const Patch>(object); - if (patch) { - if (!object->path().is_root()) { - Resource::Properties props; - props.insert(make_pair(_uris.rdf_type, - _uris.forge.alloc_uri(_uris.ingen_Patch.str()))); - props.insert(make_pair(_uris.ingen_polyphony, - _uris.forge.make(int32_t(patch->internal_poly())))); - _interface.put(object->path(), props); - } - - build_object(object); - /*for (Patch::Edges::const_iterator i = patch->edges().begin(); - i != patch->edges().end(); ++i) { - _interface.connect((*i)->src_port_path(), (*i)->dst_port_path()); - }*/ - return; - } - - SharedPtr<const Node> node = PtrCast<const Node>(object); - if (node) { - Resource::Properties props; - props.insert(make_pair(_uris.rdf_type, _uris.ingen_Node)); - props.insert(make_pair(_uris.ingen_prototype, - _uris.forge.alloc_uri(node->plugin()->uri().str()))); - _interface.put(node->path(), props); - build_object(object); - return; - } - - SharedPtr<const Port> port = PtrCast<const Port>(object); - if (port) { - _interface.put(port->path(), port->properties()); - build_object(object); - return; - } + _interface.put(object->path(), object->properties()); } void @@ -90,12 +51,5 @@ Builder::connect(SharedPtr<const GraphObject> object) } } -void -Builder::build_object(SharedPtr<const GraphObject> object) -{ - typedef GraphObject::Properties::const_iterator iterator; - _interface.put(object->uri(), object->properties()); -} - } // namespace Shared } // namespace Ingen |