summaryrefslogtreecommitdiffstats
path: root/src/libs/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/engine')
-rw-r--r--src/libs/engine/EngineStore.cpp14
-rw-r--r--src/libs/engine/GraphObjectImpl.hpp2
-rw-r--r--src/libs/engine/LV2Plugin.cpp17
-rw-r--r--src/libs/engine/LV2Plugin.hpp5
4 files changed, 21 insertions, 17 deletions
diff --git a/src/libs/engine/EngineStore.cpp b/src/libs/engine/EngineStore.cpp
index 5f5e41e5..9fcd3806 100644
--- a/src/libs/engine/EngineStore.cpp
+++ b/src/libs/engine/EngineStore.cpp
@@ -82,19 +82,7 @@ EngineStore::add(GraphObject* obj)
assert(ThreadManager::current_thread_id() == THREAD_PRE_PROCESS);
- if (find(o->path()) != end()) {
- cerr << "[EngineStore] ERROR: Attempt to add duplicate object " << o->path() << endl;
- return;
- }
-
- insert(make_pair(o->path(), o));
-
- NodeImpl* node = dynamic_cast<NodeImpl*>(o);
- if (node) {
- for (uint32_t i=0; i < node->num_ports(); ++i) {
- add(node->port_impl(i));
- }
- }
+ Store::add(obj);
}
diff --git a/src/libs/engine/GraphObjectImpl.hpp b/src/libs/engine/GraphObjectImpl.hpp
index d1896b1b..bee10c98 100644
--- a/src/libs/engine/GraphObjectImpl.hpp
+++ b/src/libs/engine/GraphObjectImpl.hpp
@@ -87,6 +87,8 @@ public:
const Variables& variables() const { return _variables; }
const Properties& properties() const { return _properties; }
+ Variables& variables() { return _variables; }
+ Properties& properties() { return _properties; }
/** The Patch this object is a child of. */
virtual PatchImpl* parent_patch() const;
diff --git a/src/libs/engine/LV2Plugin.cpp b/src/libs/engine/LV2Plugin.cpp
index 871050e4..53d317b4 100644
--- a/src/libs/engine/LV2Plugin.cpp
+++ b/src/libs/engine/LV2Plugin.cpp
@@ -47,9 +47,8 @@ LV2Plugin::symbol() const
const string
LV2Plugin::name() const
{
- SLV2Value name = slv2_plugin_get_name(_slv2_plugin);
- if (name)
- return slv2_value_as_string(name);
+ if (_name)
+ return slv2_value_as_string(_name);
else
return "(no name)";
}
@@ -70,9 +69,21 @@ LV2Plugin::instantiate(const string& name,
delete n;
n = NULL;
}
+
+
return n;
}
+
+
+void
+LV2Plugin::slv2_plugin(SLV2Plugin p)
+{
+ _slv2_plugin = p;
+ if (_name)
+ slv2_value_free(_name);
+ _name = slv2_plugin_get_name(_slv2_plugin);
+}
} // namespace Ingen
diff --git a/src/libs/engine/LV2Plugin.hpp b/src/libs/engine/LV2Plugin.hpp
index effdefdc..827e7e89 100644
--- a/src/libs/engine/LV2Plugin.hpp
+++ b/src/libs/engine/LV2Plugin.hpp
@@ -53,6 +53,8 @@ class LV2Plugin : public PluginImpl
public:
LV2Plugin(SharedPtr<LV2Info> lv2_info, const string& uri)
: PluginImpl(Plugin::LV2, uri)
+ , _name(NULL)
+ , _slv2_plugin(NULL)
, _lv2_info(lv2_info)
{}
@@ -68,9 +70,10 @@ public:
SharedPtr<LV2Info> lv2_info() const { return _lv2_info; }
SLV2Plugin slv2_plugin() const { return _slv2_plugin; }
- void slv2_plugin(SLV2Plugin p) { _slv2_plugin = p; }
+ void slv2_plugin(SLV2Plugin p);
private:
+ SLV2Value _name;
SLV2Plugin _slv2_plugin;
SharedPtr<LV2Info> _lv2_info;
};