summaryrefslogtreecommitdiffstats
path: root/src/libs/client/DeprecatedLoader.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-10-08 17:59:56 +0000
committerDavid Robillard <d@drobilla.net>2007-10-08 17:59:56 +0000
commit91ca84684151a67b8e3e1e859b3167e9f687d4d4 (patch)
tree1751b6e4949b47d1880b4c569b6192fef392bfaf /src/libs/client/DeprecatedLoader.cpp
parent507d9ffa4771978b6964b4c4b261ee923ba7e324 (diff)
downloadingen-91ca84684151a67b8e3e1e859b3167e9f687d4d4.tar.gz
ingen-91ca84684151a67b8e3e1e859b3167e9f687d4d4.tar.bz2
ingen-91ca84684151a67b8e3e1e859b3167e9f687d4d4.zip
s/MetadataMap/Variables/ etc.
Removed ancient/unused Controller.hpp. git-svn-id: http://svn.drobilla.net/lad/ingen@852 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/DeprecatedLoader.cpp')
-rw-r--r--src/libs/client/DeprecatedLoader.cpp54
1 files changed, 27 insertions, 27 deletions
diff --git a/src/libs/client/DeprecatedLoader.cpp b/src/libs/client/DeprecatedLoader.cpp
index 22fe1cda..eee9485a 100644
--- a/src/libs/client/DeprecatedLoader.cpp
+++ b/src/libs/client/DeprecatedLoader.cpp
@@ -75,12 +75,12 @@ DeprecatedLoader::translate_load_path(const string& path)
}
-/** Add a piece of data to a MetadataMap, translating from deprecated unqualified keys
+/** Add a piece of data to a Variables, translating from deprecated unqualified keys
*
* Adds a namespace prefix for known keys, and ignores the rest.
*/
void
-DeprecatedLoader::add_metadata(GraphObject::MetadataMap& data, string old_key, string value)
+DeprecatedLoader::add_variable(GraphObject::Variables& data, string old_key, string value)
{
string key = "";
if (old_key == "module-x")
@@ -132,11 +132,11 @@ DeprecatedLoader::add_metadata(GraphObject::MetadataMap& data, string old_key, s
* Returns the path of the newly created patch.
*/
string
-DeprecatedLoader::load_patch(const Glib::ustring& filename,
- boost::optional<Path> parent_path,
- string name,
- GraphObject::MetadataMap initial_data,
- bool existing)
+DeprecatedLoader::load_patch(const Glib::ustring& filename,
+ boost::optional<Path> parent_path,
+ string name,
+ GraphObject::Variables initial_data,
+ bool existing)
{
cerr << "[DeprecatedLoader] Loading patch " << filename << "" << endl;
@@ -147,7 +147,7 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
size_t poly = 0;
/* Use parameter overridden polyphony, if given */
- GraphObject::MetadataMap::iterator poly_param = initial_data.find("ingen:polyphony");
+ GraphObject::Variables::iterator poly_param = initial_data.find("ingen:polyphony");
if (poly_param != initial_data.end() && poly_param->second.type() == Atom::INT)
poly = poly_param->second;
@@ -199,10 +199,10 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
&& xmlStrcmp(cur->name, (const xmlChar*)"subpatch")
&& xmlStrcmp(cur->name, (const xmlChar*)"filename")
&& xmlStrcmp(cur->name, (const xmlChar*)"preset")) {
- // Don't know what this tag is, add it as metadata without overwriting
+ // Don't know what this tag is, add it as variable without overwriting
// (so caller can set arbitrary parameters which will be preserved)
if (key)
- add_metadata(initial_data, (const char*)cur->name, (const char*)key);
+ add_variable(initial_data, (const char*)cur->name, (const char*)key);
}
xmlFree(key);
@@ -217,8 +217,8 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
// Create it, if we're not merging
if (!existing) {
_engine->create_patch(path, poly);
- for (GraphObject::MetadataMap::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
- _engine->set_metadata(path, i->first, i->second);
+ for (GraphObject::Variables::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
+ _engine->set_variable(path, i->first, i->second);
}
// Load nodes
@@ -272,8 +272,8 @@ DeprecatedLoader::load_patch(const Glib::ustring& filename,
xmlCleanupParser();
// Done above.. late enough?
- //for (MetadataMap::const_iterator i = data.begin(); i != data.end(); ++i)
- // _engine->set_metadata(subject, i->first, i->second);
+ //for (Variables::const_iterator i = data.begin(); i != data.end(); ++i)
+ // _engine->set_variable(subject, i->first, i->second);
if (!existing)
_engine->enable_patch(path);
@@ -301,7 +301,7 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
string library_name; // deprecated
string plugin_label; // deprecated
- GraphObject::MetadataMap initial_data;
+ GraphObject::Variables initial_data;
while (cur != NULL) {
key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
@@ -355,9 +355,9 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
nm->add_port(pm);
#endif
- } else { // Don't know what this tag is, add it as metadata
+ } else { // Don't know what this tag is, add it as variable
if (key)
- add_metadata(initial_data, (const char*)cur->name, (const char*)key);
+ add_variable(initial_data, (const char*)cur->name, (const char*)key);
}
xmlFree(key);
key = NULL;
@@ -410,8 +410,8 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
path = new_path;
- for (GraphObject::MetadataMap::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
- _engine->set_metadata(path, i->first, i->second);
+ for (GraphObject::Variables::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
+ _engine->set_variable(path, i->first, i->second);
return SharedPtr<NodeModel>();
@@ -434,8 +434,8 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
else
_engine->create_node(path, plugin_type, library_name, plugin_label, polyphonic);
- for (GraphObject::MetadataMap::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
- _engine->set_metadata(path, i->first, i->second);
+ for (GraphObject::Variables::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
+ _engine->set_variable(path, i->first, i->second);
return true;
}
@@ -443,8 +443,8 @@ DeprecatedLoader::load_node(const Path& parent, xmlDocPtr doc, const xmlNodePtr
// Not deprecated
} else {
_engine->create_node(path, plugin_uri, polyphonic);
- for (GraphObject::MetadataMap::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
- _engine->set_metadata(path, i->first, i->second);
+ for (GraphObject::Variables::const_iterator i = initial_data.begin(); i != initial_data.end(); ++i)
+ _engine->set_variable(path, i->first, i->second);
return true;
}
@@ -462,7 +462,7 @@ DeprecatedLoader::load_subpatch(const Path& parent, xmlDocPtr doc, const xmlNode
string filename = "";
size_t poly = 0;
- GraphObject::MetadataMap initial_data;
+ GraphObject::Variables initial_data;
while (cur != NULL) {
key = xmlNodeListGetString(doc, cur->xmlChildrenNode, 1);
@@ -473,9 +473,9 @@ DeprecatedLoader::load_subpatch(const Path& parent, xmlDocPtr doc, const xmlNode
initial_data.insert(make_pair("ingen::polyphony", (int)poly));
} else if ((!xmlStrcmp(cur->name, (const xmlChar*)"filename"))) {
filename = (const char*)key;
- } else { // Don't know what this tag is, add it as metadata
+ } else { // Don't know what this tag is, add it as variable
if (key != NULL && strlen((const char*)key) > 0)
- add_metadata(initial_data, (const char*)cur->name, (const char*)key);
+ add_variable(initial_data, (const char*)cur->name, (const char*)key);
}
xmlFree(key);
key = NULL;
@@ -483,7 +483,7 @@ DeprecatedLoader::load_subpatch(const Path& parent, xmlDocPtr doc, const xmlNode
cur = cur->next;
}
- // load_patch sets the passed metadata last, so values stored in the parent
+ // load_patch sets the passed variable last, so values stored in the parent
// will override values stored in the child patch file
/*string path = */load_patch(filename, parent, name, initial_data, false);