summaryrefslogtreecommitdiffstats
path: root/src/libs/serialisation
diff options
context:
space:
mode:
Diffstat (limited to 'src/libs/serialisation')
-rw-r--r--src/libs/serialisation/Loader.cpp22
-rw-r--r--src/libs/serialisation/Loader.hpp2
-rw-r--r--src/libs/serialisation/Serialiser.cpp18
3 files changed, 21 insertions, 21 deletions
diff --git a/src/libs/serialisation/Loader.cpp b/src/libs/serialisation/Loader.cpp
index 30958198..a52024aa 100644
--- a/src/libs/serialisation/Loader.cpp
+++ b/src/libs/serialisation/Loader.cpp
@@ -46,7 +46,7 @@ Loader::load(SharedPtr<EngineInterface> engine,
boost::optional<Path> parent,
string patch_name,
Glib::ustring patch_uri,
- GraphObject::MetadataMap data)
+ GraphObject::Variables data)
{
setlocale(LC_NUMERIC, "C");
@@ -67,7 +67,7 @@ Loader::load(SharedPtr<EngineInterface> engine,
size_t patch_poly = 1;
/* Use parameter overridden polyphony, if given */
- GraphObject::MetadataMap::iterator poly_param = data.find("ingen:polyphony");
+ GraphObject::Variables::iterator poly_param = data.find("ingen:polyphony");
if (poly_param != data.end() && poly_param->second.type() == Atom::INT) {
patch_poly = poly_param->second.get_int32();
@@ -127,7 +127,7 @@ Loader::load(SharedPtr<EngineInterface> engine,
RDF::Query::Results results = query.run(*rdf_world, model);
- map<const string, const Atom> metadata;
+ map<const string, const Atom> variable;
for (RDF::Query::Results::iterator i = results.begin(); i != results.end(); ++i) {
@@ -146,13 +146,13 @@ Loader::load(SharedPtr<EngineInterface> engine,
created.insert(node_path);
}
- /* Float metadata (FIXME: use using raw predicates is definitely a very
+ /* Float variable (FIXME: use using raw predicates is definitely a very
* bad idea, make an ingen:Variable or something */
const string floatkey = rdf_world->prefixes().qualify((*i)["floatkey"].to_string());
RDF::Node val_node = (*i)["floatval"];
if (floatkey != "" && val_node.is_float())
- engine->set_metadata(node_path, floatkey, val_node.to_float());
+ engine->set_variable(node_path, floatkey, val_node.to_float());
}
@@ -250,7 +250,7 @@ Loader::load(SharedPtr<EngineInterface> engine,
val_node = (*i)["floatval"];
if (floatkey != "" && val_node.is_float())
- engine->set_metadata(patch_path.base() + name, floatkey, Atom(val_node.to_float()));
+ engine->set_variable(patch_path.base() + name, floatkey, Atom(val_node.to_float()));
}
created.clear();
@@ -337,7 +337,7 @@ Loader::load(SharedPtr<EngineInterface> engine,
}
- /* Load metadata */
+ /* Load variable */
query = RDF::Query(*rdf_world, Glib::ustring(
"SELECT DISTINCT ?floatkey ?floatval WHERE {\n") +
@@ -353,13 +353,13 @@ Loader::load(SharedPtr<EngineInterface> engine,
RDF::Node val_node = (*i)["floatval"];
if (floatkey != "" && val_node.is_float())
- engine->set_metadata(patch_path, floatkey, Atom(val_node.to_float()));
+ engine->set_variable(patch_path, floatkey, Atom(val_node.to_float()));
}
- // Set passed metadata last to override any loaded values
- for (GraphObject::MetadataMap::const_iterator i = data.begin(); i != data.end(); ++i)
- engine->set_metadata(patch_path, i->first, i->second);
+ // Set passed variable last to override any loaded values
+ for (GraphObject::Variables::const_iterator i = data.begin(); i != data.end(); ++i)
+ engine->set_variable(patch_path, i->first, i->second);
/* Enable */
diff --git a/src/libs/serialisation/Loader.hpp b/src/libs/serialisation/Loader.hpp
index d363bf28..e81fba4c 100644
--- a/src/libs/serialisation/Loader.hpp
+++ b/src/libs/serialisation/Loader.hpp
@@ -46,7 +46,7 @@ public:
boost::optional<Raul::Path> parent,
std::string patch_name,
Glib::ustring patch_uri = "",
- GraphObject::MetadataMap data = GraphObject::MetadataMap());
+ GraphObject::Variables data = GraphObject::Variables());
};
diff --git a/src/libs/serialisation/Serialiser.cpp b/src/libs/serialisation/Serialiser.cpp
index 15b7f753..b21b7c6d 100644
--- a/src/libs/serialisation/Serialiser.cpp
+++ b/src/libs/serialisation/Serialiser.cpp
@@ -283,8 +283,8 @@ Serialiser::serialize_patch(SharedPtr<Shared::Patch> patch)
"ingen:enabled",
Atom(patch->enabled()));
- for (GraphObject::MetadataMap::const_iterator m = patch->metadata().begin();
- m != patch->metadata().end(); ++m) {
+ for (GraphObject::Variables::const_iterator m = patch->variables().begin();
+ m != patch->variables().end(); ++m) {
if (m->first.find(":") != string::npos) {
_model->add_statement(
patch_id,
@@ -370,8 +370,8 @@ Serialiser::serialize_node(SharedPtr<Shared::Node> node, const RDF::Node& node_i
_model->add_statement(node_id, "ingen:port", port_id);
}
- for (GraphObject::MetadataMap::const_iterator m = node->metadata().begin();
- m != node->metadata().end(); ++m) {
+ for (GraphObject::Variables::const_iterator m = node->variables().begin();
+ m != node->variables().end(); ++m) {
if (m->first.find(":") != string::npos) {
_model->add_statement(
node_id,
@@ -382,8 +382,8 @@ Serialiser::serialize_node(SharedPtr<Shared::Node> node, const RDF::Node& node_i
}
/** Writes a port subject with various information only if there are some
- * predicate/object pairs to go with it (eg if the port has metadata, or a value, or..).
- * Audio output ports with no metadata will not be written, for example.
+ * predicate/object pairs to go with it (eg if the port has variable, or a value, or..).
+ * Audio output ports with no variable will not be written, for example.
*/
void
Serialiser::serialize_port(const Port* port, const RDF::Node& port_id)
@@ -403,9 +403,9 @@ Serialiser::serialize_port(const Port* port, const RDF::Node& port_id)
if (port->type() == DataType::CONTROL && port->is_input())
_model->add_statement(port_id, "ingen:value", port->value());
- if (port->metadata().size() > 0) {
- for (GraphObject::MetadataMap::const_iterator m = port->metadata().begin();
- m != port->metadata().end(); ++m) {
+ if (port->variables().size() > 0) {
+ for (GraphObject::Variables::const_iterator m = port->variables().begin();
+ m != port->variables().end(); ++m) {
if (m->first.find(":") != string::npos) {
_model->add_statement(
port_id,