summaryrefslogtreecommitdiffstats
path: root/src/client/ClientStore.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/client/ClientStore.cpp')
-rw-r--r--src/client/ClientStore.cpp25
1 files changed, 25 insertions, 0 deletions
diff --git a/src/client/ClientStore.cpp b/src/client/ClientStore.cpp
index cf9e06a0..4c4e452c 100644
--- a/src/client/ClientStore.cpp
+++ b/src/client/ClientStore.cpp
@@ -429,6 +429,31 @@ ClientStore::new_plugin(const string& uri, const string& type_uri, const string&
void
+ClientStore::new_object(const Shared::GraphObject* object)
+{
+ using namespace Shared;
+
+ const Patch* patch = dynamic_cast<const Patch*>(object);
+ if (patch) {
+ new_patch(patch->path(), patch->internal_polyphony());
+ return;
+ }
+
+ const Node* node = dynamic_cast<const Node*>(object);
+ if (node) {
+ new_node(node->path(), node->plugin()->uri());
+ return;
+ }
+
+ const Port* port = dynamic_cast<const Port*>(object);
+ if (port) {
+ new_port(port->path(), port->type().uri(), port->index(), !port->is_input());
+ return;
+ }
+}
+
+
+void
ClientStore::new_patch(const string& path, uint32_t poly)
{
SharedPtr<PatchModel> p(new PatchModel(path, poly));