summaryrefslogtreecommitdiffstats
path: root/src/client/DeprecatedLoader.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-11 18:05:24 +0000
committerDavid Robillard <d@drobilla.net>2009-05-11 18:05:24 +0000
commit698c38587bd4f0133a132dc363098ff8298ec47b (patch)
treeabcab2ab196d995fbcc52a4e62c4f5d496b6a754 /src/client/DeprecatedLoader.cpp
parent9ea901df533b0326e715ced10b9e9970239da515 (diff)
downloadingen-698c38587bd4f0133a132dc363098ff8298ec47b.tar.gz
ingen-698c38587bd4f0133a132dc363098ff8298ec47b.tar.bz2
ingen-698c38587bd4f0133a132dc363098ff8298ec47b.zip
* New ontology.
* Display human names on patch ports on creation, if enabled. * Fix copy/paste of subpatches. * Split properties into "properties" (class properties) and "variables" (instance properties). * Names are kind of a legacy leftover... * Remove special set poly / enable / etc events in favour of just setting properties (less API, extensible, RDF compatible). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1973 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client/DeprecatedLoader.cpp')
-rw-r--r--src/client/DeprecatedLoader.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/src/client/DeprecatedLoader.cpp b/src/client/DeprecatedLoader.cpp
index 794816bb..ac693421 100644
--- a/src/client/DeprecatedLoader.cpp
+++ b/src/client/DeprecatedLoader.cpp
@@ -140,12 +140,12 @@ DeprecatedLoader::translate_load_path(const string& path)
}
-/** Add a piece of data to a Variables, translating from deprecated unqualified keys
+/** Add a piece of data to a Properties, translating from deprecated unqualified keys
*
* Adds a namespace prefix for known keys, and ignores the rest.
*/
void
-DeprecatedLoader::add_variable(GraphObject::Variables& data, string old_key, string value)
+DeprecatedLoader::add_variable(GraphObject::Properties& data, string old_key, string value)
{
string key = "";
if (old_key == "module-x")
@@ -207,7 +207,7 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
bool merge,
boost::optional<Path> parent_path,
boost::optional<Symbol> name,
- GraphObject::Variables initial_data,
+ GraphObject::Properties initial_data,
bool existing)
{
cerr << "[DeprecatedLoader] Loading patch " << filename << " under "
@@ -222,7 +222,7 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
size_t poly = 0;
/* Use parameter overridden polyphony, if given */
- GraphObject::Variables::iterator poly_param = initial_data.find("ingen:polyphony");
+ GraphObject::Properties::iterator poly_param = initial_data.find("ingen:polyphony");
if (poly_param != initial_data.end() && poly_param->second.type() == Atom::INT)
poly = poly_param->second.get_int32();
@@ -291,7 +291,7 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
// Create it, if we're not merging
if (!existing && path != "/") {
_engine->new_patch(path, poly);
- for (GraphObject::Variables::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
+ for (GraphObject::Properties::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
_engine->set_variable(path, i->first, i->second);
}
@@ -346,11 +346,11 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
xmlCleanupParser();
// Done above.. late enough?
- //for (Variables::const_iterator i = data.begin(); i != data.end(); ++i)
+ //for (Properties::const_iterator i = data.begin(); i != data.end(); ++i)
// _engine->set_variable(subject, i->first, i->second);
if (!existing)
- _engine->set_property(path, "ingen:enabled", (bool)true);
+ _engine->set_variable(path, "ingen:enabled", (bool)true);
_load_path_translations.clear();
@@ -375,7 +375,7 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
string library_name; // deprecated
string plugin_label; // deprecated
- GraphObject::Variables initial_data;
+ GraphObject::Properties initial_data;
while (cur != NULL) {
key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
@@ -489,7 +489,7 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
path = new_path;
- for (GraphObject::Variables::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
+ for (GraphObject::Properties::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
_engine->set_variable(path, i->first, i->second);
return SharedPtr<NodeModel>();
@@ -510,9 +510,9 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
else
_engine->new_node_deprecated(path, plugin_type, library_name, plugin_label);
- _engine->set_property(path, "ingen:polyphonic", polyphonic);
+ _engine->set_variable(path, "ingen:polyphonic", bool(polyphonic));
- for (GraphObject::Variables::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
+ for (GraphObject::Properties::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
_engine->set_variable(path, i->first, i->second);
return true;
@@ -521,8 +521,8 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
// Not deprecated
} else {
_engine->new_node(path, plugin_uri);
- _engine->set_property(path, "ingen:polyphonic", polyphonic);
- for (GraphObject::Variables::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
+ _engine->set_variable(path, "ingen:polyphonic", bool(polyphonic));
+ for (GraphObject::Properties::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
_engine->set_variable(path, i->first, i->second);
return true;
}
@@ -541,7 +541,7 @@ DeprecatedLoader::load_subpatch(const string& base_filename, const Path& parent,
string filename = "";
size_t poly = 0;
- GraphObject::Variables initial_data;
+ GraphObject::Properties initial_data;
while (cur != NULL) {
key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);