summaryrefslogtreecommitdiffstats
path: root/src/libs
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
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')
-rw-r--r--src/libs/client/DeprecatedLoader.cpp54
-rw-r--r--src/libs/client/DeprecatedLoader.hpp12
-rw-r--r--src/libs/client/DirectSigClientInterface.hpp4
-rw-r--r--src/libs/client/NodeModel.cpp4
-rw-r--r--src/libs/client/OSCClientReceiver.cpp8
-rw-r--r--src/libs/client/OSCClientReceiver.hpp2
-rw-r--r--src/libs/client/OSCEngineSender.cpp8
-rw-r--r--src/libs/client/OSCEngineSender.hpp4
-rw-r--r--src/libs/client/ObjectModel.cpp28
-rw-r--r--src/libs/client/ObjectModel.hpp14
-rw-r--r--src/libs/client/PortModel.cpp6
-rw-r--r--src/libs/client/SigClientInterface.hpp6
-rw-r--r--src/libs/client/Store.cpp30
-rw-r--r--src/libs/client/Store.hpp10
-rw-r--r--src/libs/client/ThreadedSigClientInterface.hpp8
-rw-r--r--src/libs/engine/ClientBroadcaster.cpp8
-rw-r--r--src/libs/engine/ClientBroadcaster.hpp2
-rw-r--r--src/libs/engine/Controller.hpp83
-rw-r--r--src/libs/engine/GraphObjectImpl.hpp16
-rw-r--r--src/libs/engine/LADSPANode.cpp4
-rw-r--r--src/libs/engine/MidiControlNode.cpp14
-rw-r--r--src/libs/engine/MidiNoteNode.cpp12
-rw-r--r--src/libs/engine/MidiTriggerNode.cpp8
-rw-r--r--src/libs/engine/OSCClientSender.cpp16
-rw-r--r--src/libs/engine/OSCClientSender.hpp2
-rw-r--r--src/libs/engine/OSCEngineReceiver.cpp26
-rw-r--r--src/libs/engine/OSCEngineReceiver.hpp6
-rw-r--r--src/libs/engine/ObjectSender.cpp24
-rw-r--r--src/libs/engine/QueuedEngineInterface.cpp4
-rw-r--r--src/libs/engine/QueuedEngineInterface.hpp4
-rw-r--r--src/libs/engine/events/RequestMetadataEvent.cpp6
-rw-r--r--src/libs/engine/events/RequestMetadataEvent.hpp2
-rw-r--r--src/libs/engine/events/SetMetadataEvent.cpp4
-rw-r--r--src/libs/engine/events/SetMetadataEvent.hpp2
-rw-r--r--src/libs/gui/App.hpp2
-rw-r--r--src/libs/gui/Configuration.hpp2
-rw-r--r--src/libs/gui/ConnectWindow.hpp1
-rw-r--r--src/libs/gui/LoadPatchWindow.cpp2
-rw-r--r--src/libs/gui/LoadPatchWindow.hpp4
-rw-r--r--src/libs/gui/LoadPluginWindow.cpp6
-rw-r--r--src/libs/gui/LoadPluginWindow.hpp4
-rw-r--r--src/libs/gui/LoadRemotePatchWindow.cpp2
-rw-r--r--src/libs/gui/LoadRemotePatchWindow.hpp4
-rw-r--r--src/libs/gui/LoadSubpatchWindow.cpp2
-rw-r--r--src/libs/gui/LoadSubpatchWindow.hpp4
-rw-r--r--src/libs/gui/NewSubpatchWindow.cpp6
-rw-r--r--src/libs/gui/NewSubpatchWindow.hpp4
-rw-r--r--src/libs/gui/NodeModule.cpp16
-rw-r--r--src/libs/gui/NodeModule.hpp2
-rw-r--r--src/libs/gui/ObjectMenu.hpp1
-rw-r--r--src/libs/gui/PatchCanvas.cpp26
-rw-r--r--src/libs/gui/PatchCanvas.hpp2
-rw-r--r--src/libs/gui/PatchPortModule.cpp20
-rw-r--r--src/libs/gui/PatchPortModule.hpp2
-rw-r--r--src/libs/gui/PatchPropertiesWindow.cpp12
-rw-r--r--src/libs/gui/PatchWindow.cpp2
-rw-r--r--src/libs/gui/Port.cpp4
-rw-r--r--src/libs/gui/Port.hpp2
-rw-r--r--src/libs/gui/PortPropertiesWindow.cpp14
-rw-r--r--src/libs/gui/PortPropertiesWindow.hpp2
-rw-r--r--src/libs/gui/ThreadedLoader.cpp12
-rw-r--r--src/libs/gui/ThreadedLoader.hpp12
-rw-r--r--src/libs/gui/UploadPatchWindow.cpp12
-rw-r--r--src/libs/gui/WindowFactory.cpp10
-rw-r--r--src/libs/gui/WindowFactory.hpp10
-rw-r--r--src/libs/serialisation/Loader.cpp22
-rw-r--r--src/libs/serialisation/Loader.hpp2
-rw-r--r--src/libs/serialisation/Serialiser.cpp18
68 files changed, 300 insertions, 387 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);
diff --git a/src/libs/client/DeprecatedLoader.hpp b/src/libs/client/DeprecatedLoader.hpp
index 19dbf5cb..1baf9271 100644
--- a/src/libs/client/DeprecatedLoader.hpp
+++ b/src/libs/client/DeprecatedLoader.hpp
@@ -62,14 +62,14 @@ public:
string find_file(const string& filename, const string& additional_path = "");
- string load_patch(const Glib::ustring& filename,
- boost::optional<Path> parent_path,
- string name,
- GraphObject::MetadataMap initial_data,
- bool existing = false);
+ string load_patch(const Glib::ustring& filename,
+ boost::optional<Path> parent_path,
+ string name,
+ GraphObject::Variables initial_data,
+ bool existing = false);
private:
- void add_metadata(GraphObject::MetadataMap& data, string key, string value);
+ void add_variable(GraphObject::Variables& data, string key, string value);
string nameify_if_invalid(const string& name);
string translate_load_path(const string& path);
diff --git a/src/libs/client/DirectSigClientInterface.hpp b/src/libs/client/DirectSigClientInterface.hpp
index 72265d11..721a7f74 100644
--- a/src/libs/client/DirectSigClientInterface.hpp
+++ b/src/libs/client/DirectSigClientInterface.hpp
@@ -98,8 +98,8 @@ private:
virtual void disconnection(const string& src_port_path, const string& dst_port_path)
{ disconnection_sig.emit(src_port_path, dst_port_path); }
- virtual void metadata_update(const string& subject_path, const string& predicate, const string& value)
- { metadata_update_sig.emit(subject_path, predicate, value); }
+ virtual void variable_change(const string& subject_path, const string& predicate, const string& value)
+ { variable_change_sig.emit(subject_path, predicate, value); }
virtual void control_change(const string& port_path, float value)
{ control_change_sig.emit(port_path, value); }
diff --git a/src/libs/client/NodeModel.cpp b/src/libs/client/NodeModel.cpp
index b8c8e901..1ee67dcf 100644
--- a/src/libs/client/NodeModel.cpp
+++ b/src/libs/client/NodeModel.cpp
@@ -173,8 +173,8 @@ NodeModel::port_value_range(SharedPtr<PortModel> port, float& min, float& max)
#endif
// Possibly overriden
- const Atom& min_atom = port->get_metadata("ingen:minimum");
- const Atom& max_atom = port->get_metadata("ingen:maximum");
+ const Atom& min_atom = port->get_variable("ingen:minimum");
+ const Atom& max_atom = port->get_variable("ingen:maximum");
if (min_atom.type() == Atom::FLOAT)
min = min_atom.get_float();
if (max_atom.type() == Atom::FLOAT)
diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp
index 0a1fa105..a4197797 100644
--- a/src/libs/client/OSCClientReceiver.cpp
+++ b/src/libs/client/OSCClientReceiver.cpp
@@ -158,7 +158,7 @@ OSCClientReceiver::setup_callbacks()
lo_server_thread_add_method(_st, "/ingen/new_port", "ssi", new_port_cb, this);
lo_server_thread_add_method(_st, "/ingen/polyphonic", "sT", polyphonic_cb, this);
lo_server_thread_add_method(_st, "/ingen/polyphonic", "sF", polyphonic_cb, this);
- lo_server_thread_add_method(_st, "/ingen/metadata_update", NULL, metadata_update_cb, this);
+ lo_server_thread_add_method(_st, "/ingen/variable_change", NULL, variable_change_cb, this);
lo_server_thread_add_method(_st, "/ingen/control_change", "sf", control_change_cb, this);
lo_server_thread_add_method(_st, "/ingen/port_activity", "s", port_activity_cb, this);
lo_server_thread_add_method(_st, "/ingen/program_add", "siis", program_add_cb, this);
@@ -301,10 +301,10 @@ OSCClientReceiver::_polyphonic_cb(const char* path, const char* types, lo_arg**
}
-/** Notification of a new or updated piece of metadata.
+/** Notification of a new or updated piece of variable.
*/
int
-OSCClientReceiver::_metadata_update_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCClientReceiver::_variable_change_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
if (argc != 3 || types[0] != 's' || types[1] != 's')
return 1;
@@ -314,7 +314,7 @@ OSCClientReceiver::_metadata_update_cb(const char* path, const char* types, lo_a
Atom value = AtomLiblo::lo_arg_to_atom(types[2], argv[2]);
- metadata_update(obj_path, key, value);
+ variable_change(obj_path, key, value);
return 0;
}
diff --git a/src/libs/client/OSCClientReceiver.hpp b/src/libs/client/OSCClientReceiver.hpp
index 82c4ff4c..8963d3ca 100644
--- a/src/libs/client/OSCClientReceiver.hpp
+++ b/src/libs/client/OSCClientReceiver.hpp
@@ -97,7 +97,7 @@ private:
LO_HANDLER(new_node);
LO_HANDLER(new_port);
LO_HANDLER(polyphonic);
- LO_HANDLER(metadata_update);
+ LO_HANDLER(variable_change);
LO_HANDLER(control_change);
LO_HANDLER(port_activity);
LO_HANDLER(program_add);
diff --git a/src/libs/client/OSCEngineSender.cpp b/src/libs/client/OSCEngineSender.cpp
index e3183f78..345f4be3 100644
--- a/src/libs/client/OSCEngineSender.cpp
+++ b/src/libs/client/OSCEngineSender.cpp
@@ -494,7 +494,7 @@ OSCEngineSender::midi_learn(const string& node_path)
void
-OSCEngineSender::set_metadata(const string& obj_path,
+OSCEngineSender::set_variable(const string& obj_path,
const string& predicate,
const Raul::Atom& value)
{
@@ -505,7 +505,7 @@ OSCEngineSender::set_metadata(const string& obj_path,
lo_message_add_string(m, obj_path.c_str());
lo_message_add_string(m, predicate.c_str());
Raul::AtomLiblo::lo_message_add_atom(m, value);
- lo_send_message(_engine_addr, "/ingen/set_metadata", m);
+ lo_send_message(_engine_addr, "/ingen/set_variable", m);
}
@@ -549,10 +549,10 @@ OSCEngineSender::request_port_value(const string& port_path)
}
void
-OSCEngineSender::request_metadata(const string& object_path, const string& key)
+OSCEngineSender::request_variable(const string& object_path, const string& key)
{
assert(_engine_addr);
- lo_send(_engine_addr, "/ingen/request_metadata", "iss",
+ lo_send(_engine_addr, "/ingen/request_variable", "iss",
next_id(),
object_path.c_str(),
key.c_str());
diff --git a/src/libs/client/OSCEngineSender.hpp b/src/libs/client/OSCEngineSender.hpp
index c97c4e94..eb6dd2ee 100644
--- a/src/libs/client/OSCEngineSender.hpp
+++ b/src/libs/client/OSCEngineSender.hpp
@@ -143,7 +143,7 @@ public:
void midi_learn(const string& node_path);
- void set_metadata(const string& obj_path,
+ void set_variable(const string& obj_path,
const string& predicate,
const Raul::Atom& value);
@@ -157,7 +157,7 @@ public:
void request_port_value(const string& port_path);
- void request_metadata(const string& path, const string& key);
+ void request_variable(const string& path, const string& key);
void request_plugins();
diff --git a/src/libs/client/ObjectModel.cpp b/src/libs/client/ObjectModel.cpp
index 7d144faf..1d22c8eb 100644
--- a/src/libs/client/ObjectModel.cpp
+++ b/src/libs/client/ObjectModel.cpp
@@ -72,17 +72,17 @@ ObjectModel::find_child(const string& name) const
}
-/** Get a piece of metadata for this object.
+/** Get a piece of variable for this object.
*
* @return Metadata value with key @a key, empty string otherwise.
*/
const Atom&
-ObjectModel::get_metadata(const string& key) const
+ObjectModel::get_variable(const string& key) const
{
static const Atom null_atom;
- MetadataMap::const_iterator i = _metadata.find(key);
- if (i != _metadata.end())
+ Variables::const_iterator i = _variables.find(key);
+ if (i != _variables.end())
return i->second;
else
return null_atom;
@@ -90,11 +90,11 @@ ObjectModel::get_metadata(const string& key) const
void
-ObjectModel::add_metadata(const MetadataMap& data)
+ObjectModel::add_variable(const Variables& data)
{
- for (MetadataMap::const_iterator i = data.begin(); i != data.end(); ++i) {
- _metadata[i->first] = i->second;
- signal_metadata.emit(i->first, i->second);
+ for (Variables::const_iterator i = data.begin(); i != data.end(); ++i) {
+ _variables[i->first] = i->second;
+ signal_variable.emit(i->first, i->second);
}
}
@@ -117,18 +117,18 @@ ObjectModel::set(SharedPtr<ObjectModel> model)
{
assert(_path == model->path());
- for (MetadataMap::const_iterator other = model->metadata().begin();
- other != model->metadata().end(); ++other) {
+ for (Variables::const_iterator other = model->variables().begin();
+ other != model->variables().end(); ++other) {
- MetadataMap::const_iterator mine = _metadata.find(other->first);
+ Variables::const_iterator mine = _variables.find(other->first);
- if (mine != _metadata.end()) {
+ if (mine != _variables.end()) {
cerr << "WARNING: " << _path << "Client/Server data mismatch: " << other->first << endl;
cerr << "Setting server value " << other->second;
}
- _metadata[other->first] = other->second;
- signal_metadata.emit(other->first, other->second);
+ _variables[other->first] = other->second;
+ signal_variable.emit(other->first, other->second);
}
}
diff --git a/src/libs/client/ObjectModel.hpp b/src/libs/client/ObjectModel.hpp
index 3c13b227..f9be4fa6 100644
--- a/src/libs/client/ObjectModel.hpp
+++ b/src/libs/client/ObjectModel.hpp
@@ -59,11 +59,11 @@ class ObjectModel : virtual public Ingen::Shared::GraphObject, public boost::non
public:
virtual ~ObjectModel();
- const Atom& get_metadata(const string& key) const;
- void set_metadata(const string& key, const Atom& value)
- { _metadata.insert(make_pair(key, value)); signal_metadata.emit(key, value); }
+ const Atom& get_variable(const string& key) const;
+ void set_variable(const string& key, const Atom& value)
+ { _variables.insert(make_pair(key, value)); signal_variable.emit(key, value); }
- const MetadataMap& metadata() const { return _metadata; }
+ const Variables& variables() const { return _variables; }
const Path path() const { return _path; }
const string name() const { return _path.name(); }
SharedPtr<ObjectModel> parent() const { return _parent; }
@@ -76,7 +76,7 @@ public:
// Signals
sigc::signal<void, SharedPtr<ObjectModel> > signal_new_child;
sigc::signal<void, SharedPtr<ObjectModel> > signal_removed_child;
- sigc::signal<void, const string&, const Atom&> signal_metadata;
+ sigc::signal<void, const string&, const Atom&> signal_variable;
sigc::signal<void, bool> signal_polyphonic;
sigc::signal<void> signal_destroyed;
sigc::signal<void> signal_renamed;
@@ -91,7 +91,7 @@ protected:
virtual void add_child(SharedPtr<ObjectModel> c) {}
virtual bool remove_child(SharedPtr<ObjectModel> c) { return true; }
- void add_metadata(const MetadataMap& data);
+ void add_variable(const Variables& data);
void set_polyphonic(bool);
void set(SharedPtr<ObjectModel> model);
@@ -101,7 +101,7 @@ protected:
bool _polyphonic;
SharedPtr<ObjectModel> _parent;
- MetadataMap _metadata;
+ Variables _variables;
};
diff --git a/src/libs/client/PortModel.cpp b/src/libs/client/PortModel.cpp
index ed59c8ca..6b727747 100644
--- a/src/libs/client/PortModel.cpp
+++ b/src/libs/client/PortModel.cpp
@@ -25,7 +25,7 @@ namespace Client {
bool
PortModel::is_logarithmic() const
{
- const Atom& hint = get_metadata("ingen:logarithmic");
+ const Atom& hint = get_variable("ingen:logarithmic");
return (hint && hint > 0);
}
@@ -33,7 +33,7 @@ PortModel::is_logarithmic() const
bool
PortModel::is_integer() const
{
- const Atom& hint = get_metadata("ingen:integer");
+ const Atom& hint = get_variable("ingen:integer");
return (hint && hint > 0);
}
@@ -41,7 +41,7 @@ PortModel::is_integer() const
bool
PortModel::is_toggle() const
{
- const Atom& hint = get_metadata("ingen:toggled");
+ const Atom& hint = get_variable("ingen:toggled");
return (hint && hint > 0);
}
diff --git a/src/libs/client/SigClientInterface.hpp b/src/libs/client/SigClientInterface.hpp
index 895b4cde..27469f9e 100644
--- a/src/libs/client/SigClientInterface.hpp
+++ b/src/libs/client/SigClientInterface.hpp
@@ -62,7 +62,7 @@ public:
sigc::signal<void, string> signal_object_destroyed;
sigc::signal<void, string, string> signal_connection;
sigc::signal<void, string, string> signal_disconnection;
- sigc::signal<void, string, string, Raul::Atom> signal_metadata_update;
+ sigc::signal<void, string, string, Raul::Atom> signal_variable_change;
sigc::signal<void, string, float> signal_control_change;
sigc::signal<void, string> signal_port_activity;
sigc::signal<void, string, uint32_t, uint32_t, string> signal_program_add;
@@ -129,8 +129,8 @@ protected:
void disconnection(const string& src_port_path, const string& dst_port_path)
{ signal_disconnection.emit(src_port_path, dst_port_path); }
- void metadata_update(const string& path, const string& key, const Raul::Atom& value)
- { signal_metadata_update.emit(path, key, value); }
+ void variable_change(const string& path, const string& key, const Raul::Atom& value)
+ { signal_variable_change.emit(path, key, value); }
void control_change(const string& port_path, float value)
{ signal_control_change.emit(port_path, value); }
diff --git a/src/libs/client/Store.cpp b/src/libs/client/Store.cpp
index ae07fa08..ab2ea280 100644
--- a/src/libs/client/Store.cpp
+++ b/src/libs/client/Store.cpp
@@ -49,7 +49,7 @@ Store::Store(SharedPtr<EngineInterface> engine, SharedPtr<SigClientInterface> em
emitter->signal_patch_cleared.connect(sigc::mem_fun(this, &Store::patch_cleared_event));
emitter->signal_connection.connect(sigc::mem_fun(this, &Store::connection_event));
emitter->signal_disconnection.connect(sigc::mem_fun(this, &Store::disconnection_event));
- emitter->signal_metadata_update.connect(sigc::mem_fun(this, &Store::metadata_update_event));
+ emitter->signal_variable_change.connect(sigc::mem_fun(this, &Store::variable_change_event));
emitter->signal_control_change.connect(sigc::mem_fun(this, &Store::control_change_event));
emitter->signal_port_activity.connect(sigc::mem_fun(this, &Store::port_activity_event));
}
@@ -158,38 +158,38 @@ Store::add_orphan(SharedPtr<ObjectModel> child)
void
-Store::add_metadata_orphan(const Path& subject_path, const string& predicate, const Atom& value)
+Store::add_variable_orphan(const Path& subject_path, const string& predicate, const Atom& value)
{
Raul::PathTable<list<std::pair<string, Atom> > >::iterator orphans
- = _metadata_orphans.find(subject_path);
+ = _variable_orphans.find(subject_path);
_engine->request_object(subject_path);
- if (orphans != _metadata_orphans.end()) {
+ if (orphans != _variable_orphans.end()) {
orphans->second.push_back(std::pair<string, Atom>(predicate, value));
} else {
list<std::pair<string, Atom> > l;
l.push_back(std::pair<string, Atom>(predicate, value));
- _metadata_orphans[subject_path] = l;
+ _variable_orphans[subject_path] = l;
}
}
void
-Store::resolve_metadata_orphans(SharedPtr<ObjectModel> subject)
+Store::resolve_variable_orphans(SharedPtr<ObjectModel> subject)
{
Raul::PathTable<list<std::pair<string, Atom> > >::iterator v
- = _metadata_orphans.find(subject->path());
+ = _variable_orphans.find(subject->path());
- if (v != _metadata_orphans.end()) {
+ if (v != _variable_orphans.end()) {
list<std::pair<string, Atom> > values = v->second; // take a copy
- _metadata_orphans.erase(subject->path());
+ _variable_orphans.erase(subject->path());
for (list<std::pair<string, Atom> >::iterator i = values.begin();
i != values.end(); ++i) {
- subject->set_metadata(i->first, i->second);
+ subject->set_variable(i->first, i->second);
}
}
}
@@ -236,7 +236,7 @@ Store::add_object(SharedPtr<ObjectModel> object)
_objects[object->path()] = object;
signal_new_object.emit(object);
- resolve_metadata_orphans(parent);
+ resolve_variable_orphans(parent);
resolve_orphans(parent);
SharedPtr<PortModel> port = PtrCast<PortModel>(object);
@@ -487,15 +487,15 @@ Store::patch_cleared_event(const Path& path)
void
-Store::metadata_update_event(const Path& subject_path, const string& predicate, const Atom& value)
+Store::variable_change_event(const Path& subject_path, const string& predicate, const Atom& value)
{
SharedPtr<ObjectModel> subject = object(subject_path);
if (subject) {
- subject->set_metadata(predicate, value);
+ subject->set_variable(predicate, value);
} else {
- add_metadata_orphan(subject_path, predicate, value);
- cerr << "WARNING: metadata for unknown object " << subject_path << endl;
+ add_variable_orphan(subject_path, predicate, value);
+ cerr << "WARNING: variable for unknown object " << subject_path << endl;
}
}
diff --git a/src/libs/client/Store.hpp b/src/libs/client/Store.hpp
index dad403d0..2849afc3 100644
--- a/src/libs/client/Store.hpp
+++ b/src/libs/client/Store.hpp
@@ -91,8 +91,8 @@ private:
void add_plugin_orphan(SharedPtr<NodeModel> orphan);
void resolve_plugin_orphans(SharedPtr<PluginModel> plugin);
- void add_metadata_orphan(const Path& subject, const string& predicate, const Atom& value);
- void resolve_metadata_orphans(SharedPtr<ObjectModel> subject);
+ void add_variable_orphan(const Path& subject, const string& predicate, const Atom& value);
+ void resolve_variable_orphans(SharedPtr<ObjectModel> subject);
// Slots for SigClientInterface signals
void destruction_event(const Path& path);
@@ -106,7 +106,7 @@ private:
void patch_disabled_event(const Path& path);
void patch_polyphony_event(const Path& path, uint32_t poly);
void patch_cleared_event(const Path& path);
- void metadata_update_event(const Path& subject_path, const string& predicate, const Atom& value);
+ void variable_change_event(const Path& subject_path, const string& predicate, const Atom& value);
void control_change_event(const Path& port_path, float value);
void port_activity_event(const Path& port_path);
void connection_event(const Path& src_port_path, const Path& dst_port_path);
@@ -128,8 +128,8 @@ private:
* It's unfortunate everything doesn't just have a URI and this was the same.. ahem.. */
Raul::Table<string, list<SharedPtr<NodeModel> > > _plugin_orphans;
- /** Not orphans OF metadata like the above, but orphans which are metadata */
- Raul::PathTable<list<std::pair<string, Atom> > > _metadata_orphans;
+ /** Not orphans OF variable like the above, but orphans which are variable */
+ Raul::PathTable<list<std::pair<string, Atom> > > _variable_orphans;
/** Ditto */
list<std::pair<Path, Path> > _connection_orphans;
diff --git a/src/libs/client/ThreadedSigClientInterface.hpp b/src/libs/client/ThreadedSigClientInterface.hpp
index c79ed090..8a4db3f7 100644
--- a/src/libs/client/ThreadedSigClientInterface.hpp
+++ b/src/libs/client/ThreadedSigClientInterface.hpp
@@ -63,7 +63,7 @@ public:
, object_destroyed_slot(signal_object_destroyed.make_slot())
, object_renamed_slot(signal_object_renamed.make_slot())
, disconnection_slot(signal_disconnection.make_slot())
- , metadata_update_slot(signal_metadata_update.make_slot())
+ , variable_change_slot(signal_variable_change.make_slot())
, control_change_slot(signal_control_change.make_slot())
, port_activity_slot(signal_port_activity.make_slot())
, program_add_slot(signal_program_add.make_slot())
@@ -133,8 +133,8 @@ public:
void disconnection(const string& src_port_path, const string& dst_port_path)
{ push_sig(sigc::bind(disconnection_slot, src_port_path, dst_port_path)); }
- void metadata_update(const string& path, const string& key, const Raul::Atom& value)
- { push_sig(sigc::bind(metadata_update_slot, path, key, value)); }
+ void variable_change(const string& path, const string& key, const Raul::Atom& value)
+ { push_sig(sigc::bind(variable_change_slot, path, key, value)); }
void control_change(const string& port_path, float value)
{ push_sig(sigc::bind(control_change_slot, port_path, value)); }
@@ -178,7 +178,7 @@ private:
sigc::slot<void, string> object_destroyed_slot;
sigc::slot<void, string, string> object_renamed_slot;
sigc::slot<void, string, string> disconnection_slot;
- sigc::slot<void, string, string, Raul::Atom> metadata_update_slot;
+ sigc::slot<void, string, string, Raul::Atom> variable_change_slot;
sigc::slot<void, string, float> control_change_slot;
sigc::slot<void, string> port_activity_slot;
sigc::slot<void, string, uint32_t, uint32_t, string> program_add_slot;
diff --git a/src/libs/engine/ClientBroadcaster.cpp b/src/libs/engine/ClientBroadcaster.cpp
index 2360dd09..df8e6c6f 100644
--- a/src/libs/engine/ClientBroadcaster.cpp
+++ b/src/libs/engine/ClientBroadcaster.cpp
@@ -201,15 +201,15 @@ ClientBroadcaster::send_patch_polyphony(const string& patch_path, uint32_t poly)
}
-/** Send notification of a metadata update.
+/** Send notification of a variable update.
*
- * Like control changes, does not send update to client that set the metadata, if applicable.
+ * Like control changes, does not send update to client that set the variable, if applicable.
*/
void
-ClientBroadcaster::send_metadata_update(const string& node_path, const string& key, const Atom& value)
+ClientBroadcaster::send_variable_change(const string& node_path, const string& key, const Atom& value)
{
for (Clients::const_iterator i = _clients.begin(); i != _clients.end(); ++i)
- (*i).second->metadata_update(node_path, key, value);
+ (*i).second->variable_change(node_path, key, value);
}
diff --git a/src/libs/engine/ClientBroadcaster.hpp b/src/libs/engine/ClientBroadcaster.hpp
index d7621555..ecd19d34 100644
--- a/src/libs/engine/ClientBroadcaster.hpp
+++ b/src/libs/engine/ClientBroadcaster.hpp
@@ -75,7 +75,7 @@ public:
void send_patch_enable(const string& patch_path);
void send_patch_disable(const string& patch_path);
void send_patch_polyphony(const string& patch_path, uint32_t poly);
- void send_metadata_update(const string& node_path, const string& key, const Raul::Atom& value);
+ void send_variable_change(const string& node_path, const string& key, const Raul::Atom& value);
void send_control_change(const string& port_path, float value);
void send_port_activity(const string& port_path);
void send_program_add(const string& node_path, int bank, int program, const string& name);
diff --git a/src/libs/engine/Controller.hpp b/src/libs/engine/Controller.hpp
deleted file mode 100644
index 95f7cc44..00000000
--- a/src/libs/engine/Controller.hpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/* This file is part of Ingen.
- * Copyright (C) 2007 Dave Robillard <http://drobilla.net>
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef CONTROLLER_H
-#define CONTROLLER_H
-
-namespace Ingen {
-
-
-/** Public interface to engine library.
- *
- * This is an interface to all the audio-processing related functionality
- * only. OSC communication, LASH session management, etc, are not part of
- * this library.
- */
-class Controller {
-public:
- void init();
- void quit();
-
- void load_plugins();
-
- void activate_engine();
- void deactivate_engine();
-
- void create_patch(const char* path, unsigned int polyphony);
- void clear_patch(const char* path);
- void enable_patch(const char* path);
- void disable_patch(const char* path);
- void rename(const char* old_path, const char* new_path);
-
- void create_node(const char* path,
- const char* type,
- const char* library_name,
- const char* library_label,
- unsigned int polyphony);
-
- void destroy(const char* path);
-
- void connect(const char* src_port_path, const char* dst_port_path);
- void disconnect(const char* src_port_path, const char* dst_port_path);
- void disconnect_all(const char* path);
-
- void set_port_value(const char* path, float value);
- void set_port_value_voice(const char* path, unsigned int voice);
- void set_port_value_slow(const char* path, float value);
-
- void note_on(const char* node_path,
- unsigned char note_num,
- unsigned char velocity);
-
- void note_off(const char* node_path,
- unsigned char note_num);
-
- void all_notes_off(const char* node_path);
- void midi_learn(const char* node_path);
-
- void get_metadata();
- void set_metadata();
- void responder_plugins();
- void responder_all_objects();
- void responder_port_value();
-};
-
-
-} // namespace Ingen
-
-#endif // CONTROLLER_H
-
diff --git a/src/libs/engine/GraphObjectImpl.hpp b/src/libs/engine/GraphObjectImpl.hpp
index 1793366e..3862c762 100644
--- a/src/libs/engine/GraphObjectImpl.hpp
+++ b/src/libs/engine/GraphObjectImpl.hpp
@@ -42,7 +42,7 @@ class ProcessContext;
/** An object on the audio graph - Patch, Node, Port, etc.
*
* Each of these is a Raul::Deletable and so can be deleted in a realtime safe
- * way from anywhere, and they all have a map of metadata for clients to store
+ * way from anywhere, and they all have a map of variable for clients to store
* arbitrary values in (which the engine puts no significance to whatsoever).
*
* \ingroup engine
@@ -67,16 +67,16 @@ public:
assert(_name.find("/") == string::npos);
}
- void set_metadata(const string& key, const Atom& value)
- { _metadata[key] = value; }
+ void set_variable(const string& key, const Atom& value)
+ { _variables[key] = value; }
- const Atom& get_metadata(const string& key) {
+ const Atom& get_variable(const string& key) {
static Atom null_atom;
- MetadataMap::iterator i = _metadata.find(key);
- return (i != _metadata.end()) ? (*i).second : null_atom;
+ Variables::iterator i = _variables.find(key);
+ return (i != _variables.end()) ? (*i).second : null_atom;
}
- const MetadataMap& metadata() const { return _metadata; }
+ const Variables& variables() const { return _variables; }
/** The Patch this object is a child of. */
virtual PatchImpl* parent_patch() const;
@@ -109,7 +109,7 @@ protected:
bool _polyphonic;
private:
- MetadataMap _metadata;
+ Variables _variables;
};
diff --git a/src/libs/engine/LADSPANode.cpp b/src/libs/engine/LADSPANode.cpp
index ce61eb5d..5ae567db 100644
--- a/src/libs/engine/LADSPANode.cpp
+++ b/src/libs/engine/LADSPANode.cpp
@@ -145,8 +145,8 @@ LADSPANode::instantiate()
}
if (port->is_input() && port->buffer_size() == 1) {
- port->set_metadata("ingen:minimum", min);
- port->set_metadata("ingen:maximum", max);
+ port->set_variable("ingen:minimum", min);
+ port->set_variable("ingen:maximum", max);
}
}
diff --git a/src/libs/engine/MidiControlNode.cpp b/src/libs/engine/MidiControlNode.cpp
index 27047263..250607b0 100644
--- a/src/libs/engine/MidiControlNode.cpp
+++ b/src/libs/engine/MidiControlNode.cpp
@@ -40,19 +40,19 @@ MidiControlNode::MidiControlNode(const string& path, bool polyphonic, PatchImpl*
_ports->at(0) = _midi_in_port;
_param_port = new InputPort(this, "ControllerNumber", 1, 1, DataType::CONTROL, 1);
- _param_port->set_metadata("ingen:minimum", 0.0f);
- _param_port->set_metadata("ingen:maximum", 127.0f);
- _param_port->set_metadata("ingen:default", 0.0f);
- _param_port->set_metadata("ingen:integer", 1);
+ _param_port->set_variable("ingen:minimum", 0.0f);
+ _param_port->set_variable("ingen:maximum", 127.0f);
+ _param_port->set_variable("ingen:default", 0.0f);
+ _param_port->set_variable("ingen:integer", 1);
_ports->at(1) = _param_port;
_log_port = new InputPort(this, "Logarithmic", 2, 1, DataType::CONTROL, 1);
- _log_port->set_metadata("ingen:toggled", 1);
- _log_port->set_metadata("ingen:default", 0.0f);
+ _log_port->set_variable("ingen:toggled", 1);
+ _log_port->set_variable("ingen:default", 0.0f);
_ports->at(2) = _log_port;
_min_port = new InputPort(this, "Min", 3, 1, DataType::CONTROL, 1);
- _min_port->set_metadata("ingen:default", 0.0f);
+ _min_port->set_variable("ingen:default", 0.0f);
_ports->at(3) = _min_port;
_max_port = new InputPort(this, "Max", 4, 1, DataType::CONTROL, 1);
diff --git a/src/libs/engine/MidiNoteNode.cpp b/src/libs/engine/MidiNoteNode.cpp
index 7337ade5..7604bc61 100644
--- a/src/libs/engine/MidiNoteNode.cpp
+++ b/src/libs/engine/MidiNoteNode.cpp
@@ -53,18 +53,18 @@ MidiNoteNode::MidiNoteNode(const string& path, bool polyphonic, PatchImpl* paren
_ports->at(1) = _freq_port;
_vel_port = new OutputPort(this, "Velocity", 2, _polyphony, DataType::AUDIO, _buffer_size);
- _vel_port->set_metadata("ingen:minimum", 0.0f);
- _vel_port->set_metadata("ingen:maximum", 1.0f);
+ _vel_port->set_variable("ingen:minimum", 0.0f);
+ _vel_port->set_variable("ingen:maximum", 1.0f);
_ports->at(2) = _vel_port;
_gate_port = new OutputPort(this, "Gate", 3, _polyphony, DataType::AUDIO, _buffer_size);
- _gate_port->set_metadata("ingen:toggled", 1);
- _gate_port->set_metadata("ingen:default", 0.0f);
+ _gate_port->set_variable("ingen:toggled", 1);
+ _gate_port->set_variable("ingen:default", 0.0f);
_ports->at(3) = _gate_port;
_trig_port = new OutputPort(this, "Trigger", 4, _polyphony, DataType::AUDIO, _buffer_size);
- _trig_port->set_metadata("ingen:toggled", 1);
- _trig_port->set_metadata("ingen:default", 0.0f);
+ _trig_port->set_variable("ingen:toggled", 1);
+ _trig_port->set_variable("ingen:default", 0.0f);
_ports->at(4) = _trig_port;
PluginImpl* p = const_cast<PluginImpl*>(_plugin);
diff --git a/src/libs/engine/MidiTriggerNode.cpp b/src/libs/engine/MidiTriggerNode.cpp
index f5009a80..f179d7b0 100644
--- a/src/libs/engine/MidiTriggerNode.cpp
+++ b/src/libs/engine/MidiTriggerNode.cpp
@@ -37,10 +37,10 @@ MidiTriggerNode::MidiTriggerNode(const string& path, bool polyphonic, PatchImpl*
_ports->at(0) = _midi_in_port;
_note_port = new InputPort(this, "NoteNumber", 1, 1, DataType::CONTROL, 1);
- _note_port->set_metadata("ingen:minimum", 0.0f);
- _note_port->set_metadata("ingen:maximum", 127.0f);
- _note_port->set_metadata("ingen:default", 60.0f);
- _note_port->set_metadata("ingen:integer", 1);
+ _note_port->set_variable("ingen:minimum", 0.0f);
+ _note_port->set_variable("ingen:maximum", 127.0f);
+ _note_port->set_variable("ingen:default", 60.0f);
+ _note_port->set_variable("ingen:integer", 1);
_ports->at(1) = _note_port;
_gate_port = new OutputPort(this, "Gate", 2, 1, DataType::AUDIO, _buffer_size);
diff --git a/src/libs/engine/OSCClientSender.cpp b/src/libs/engine/OSCClientSender.cpp
index 45c0e804..fff564d6 100644
--- a/src/libs/engine/OSCClientSender.cpp
+++ b/src/libs/engine/OSCClientSender.cpp
@@ -280,7 +280,7 @@ void OSCClientSender::new_node(const std::string& plugin_uri,
* \li The minimum and maximum values are suggestions only, they are not
* enforced in any way, and going outside them is perfectly fine. Also note
* that the port ranges in om_gtk are not these ones! Those ranges are set
- * as metadata.</p> \n \n
+ * as variable.</p> \n \n
*/
void
OSCClientSender::new_port(const std::string& path,
@@ -422,13 +422,13 @@ OSCClientSender::disconnection(const std::string& src_port_path, const std::stri
/** \page client_osc_namespace
- * <p> \b /ingen/metadata_update - Notification of a piece of metadata.
- * \arg \b path (string) - Path of the object associated with metadata (can be a node, patch, or port)
+ * <p> \b /ingen/variable_change - Notification of a piece of variable.
+ * \arg \b path (string) - Path of the object associated with variable (can be a node, patch, or port)
* \arg \b key (string)
* \arg \b value (string)</p> \n \n
*/
void
-OSCClientSender::metadata_update(const std::string& path, const std::string& key, const Atom& value)
+OSCClientSender::variable_change(const std::string& path, const std::string& key, const Atom& value)
{
if (!_enabled)
return;
@@ -437,7 +437,7 @@ OSCClientSender::metadata_update(const std::string& path, const std::string& key
lo_message_add_string(m, path.c_str());
lo_message_add_string(m, key.c_str());
Raul::AtomLiblo::lo_message_add_atom(m, value);
- lo_send_message(_address, "/ingen/metadata_update", m);
+ lo_send_message(_address, "/ingen/variable_change", m);
}
@@ -523,10 +523,10 @@ OSCClientSender::new_patch(const std::string& path, uint32_t poly)
if (p->process())
patch_enabled(p->path());
- // Send metadata
- const map<const std::string&, const std::string&>& data = p->metadata();
+ // Send variables
+ const map<const std::string&, const std::string&>& data = p->variable();
for (map<const std::string&, const std::string&>::const_iterator i = data.begin(); i != data.end(); ++i) {
- metadata_update(p->path(), (*i).first, (*i).second);
+ variable_change(p->path(), (*i).first, (*i).second);
}
*/
}
diff --git a/src/libs/engine/OSCClientSender.hpp b/src/libs/engine/OSCClientSender.hpp
index 0d46545b..5388140d 100644
--- a/src/libs/engine/OSCClientSender.hpp
+++ b/src/libs/engine/OSCClientSender.hpp
@@ -113,7 +113,7 @@ public:
virtual void disconnection(const std::string& src_port_path,
const std::string& dst_port_path);
- virtual void metadata_update(const std::string& subject_path,
+ virtual void variable_change(const std::string& subject_path,
const std::string& predicate,
const Raul::Atom& value);
diff --git a/src/libs/engine/OSCEngineReceiver.cpp b/src/libs/engine/OSCEngineReceiver.cpp
index cfb3f860..7d05e0bb 100644
--- a/src/libs/engine/OSCEngineReceiver.cpp
+++ b/src/libs/engine/OSCEngineReceiver.cpp
@@ -106,10 +106,10 @@ OSCEngineReceiver::OSCEngineReceiver(Engine& engine, size_t queue_size, uint16_t
lo_server_add_method(_server, "/ingen/note_off", "isi", note_off_cb, this);
lo_server_add_method(_server, "/ingen/all_notes_off", "isi", all_notes_off_cb, this);
lo_server_add_method(_server, "/ingen/midi_learn", "is", midi_learn_cb, this);
- lo_server_add_method(_server, "/ingen/set_metadata", NULL, metadata_set_cb, this);
+ lo_server_add_method(_server, "/ingen/set_variable", NULL, variable_set_cb, this);
// Queries
- lo_server_add_method(_server, "/ingen/request_metadata", "iss", metadata_get_cb, this);
+ lo_server_add_method(_server, "/ingen/request_variable", "iss", variable_get_cb, this);
lo_server_add_method(_server, "/ingen/request_plugin", "is", request_plugin_cb, this);
lo_server_add_method(_server, "/ingen/request_object", "is", request_object_cb, this);
lo_server_add_method(_server, "/ingen/request_port_value", "is", request_port_value_cb, this);
@@ -836,14 +836,14 @@ OSCEngineReceiver::_midi_learn_cb(const char* path, const char* types, lo_arg**
/** \page engine_osc_namespace
- * <p> \b /ingen/set_metadata - Sets a piece of metadata, associated with a synth-space object (node, etc)
+ * <p> \b /ingen/set_variable - Sets a piece of variable, associated with a synth-space object (node, etc)
* \arg \b response-id (integer)
- * \arg \b object-path (string) - Full path of object to associate metadata with
- * \arg \b key (string) - Key (index) for new piece of metadata
- * \arg \b value (string) - Value of new piece of metadata </p> \n \n
+ * \arg \b object-path (string) - Full path of object to associate variable with
+ * \arg \b key (string) - Key (index) for new piece of variable
+ * \arg \b value (string) - Value of new piece of variable </p> \n \n
*/
int
-OSCEngineReceiver::_metadata_set_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_variable_set_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
if (argc != 4 || types[0] != 'i' || types[1] != 's' || types[2] != 's')
return 1;
@@ -853,26 +853,26 @@ OSCEngineReceiver::_metadata_set_cb(const char* path, const char* types, lo_arg*
Raul::Atom value = Raul::AtomLiblo::lo_arg_to_atom(types[3], argv[3]);
- set_metadata(object_path, key, value);
+ set_variable(object_path, key, value);
return 0;
}
/** \page engine_osc_namespace
- * <p> \b /ingen/request_metadata - Requests the engine send a piece of metadata, associated with a synth-space object (node, etc)
+ * <p> \b /ingen/request_variable - Requests the engine send a piece of variable, associated with a synth-space object (node, etc)
* \arg \b response-id (integer)
- * \arg \b object-path (string) - Full path of object metadata is associated with
- * \arg \b key (string) - Key (index) for piece of metadata
+ * \arg \b object-path (string) - Full path of object variable is associated with
+ * \arg \b key (string) - Key (index) for piece of variable
*
* \li Reply will be sent to client registered with the source address of this message.</p> \n \n
*/
int
-OSCEngineReceiver::_metadata_get_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
+OSCEngineReceiver::_variable_get_cb(const char* path, const char* types, lo_arg** argv, int argc, lo_message msg)
{
const char* object_path = &argv[1]->s;
const char* key = &argv[2]->s;
- request_metadata(object_path, key);
+ request_variable(object_path, key);
return 0;
}
diff --git a/src/libs/engine/OSCEngineReceiver.hpp b/src/libs/engine/OSCEngineReceiver.hpp
index bdc346d6..0f9d4685 100644
--- a/src/libs/engine/OSCEngineReceiver.hpp
+++ b/src/libs/engine/OSCEngineReceiver.hpp
@@ -115,12 +115,12 @@ private:
LO_HANDLER(note_off);
LO_HANDLER(all_notes_off);
LO_HANDLER(midi_learn);
- LO_HANDLER(metadata_get);
- LO_HANDLER(metadata_set);
+ LO_HANDLER(variable_get);
+ LO_HANDLER(variable_set);
LO_HANDLER(request_plugin);
LO_HANDLER(request_object);
LO_HANDLER(request_port_value);
- LO_HANDLER(request_metadata);
+ LO_HANDLER(request_variable);
LO_HANDLER(request_plugins);
LO_HANDLER(request_all_objects);
diff --git a/src/libs/engine/ObjectSender.cpp b/src/libs/engine/ObjectSender.cpp
index 87f35b2c..55dafaf4 100644
--- a/src/libs/engine/ObjectSender.cpp
+++ b/src/libs/engine/ObjectSender.cpp
@@ -60,10 +60,10 @@ ObjectSender::send_patch(ClientInterface* client, const PatchImpl* patch, bool r
}
- // Send metadata
- const GraphObjectImpl::MetadataMap& data = patch->metadata();
- for (GraphObjectImpl::MetadataMap::const_iterator j = data.begin(); j != data.end(); ++j)
- client->metadata_update(patch->path(), (*j).first, (*j).second);
+ // Send variable
+ const GraphObjectImpl::Variables& data = patch->variables();
+ for (GraphObjectImpl::Variables::const_iterator j = data.begin(); j != data.end(); ++j)
+ client->variable_change(patch->path(), (*j).first, (*j).second);
if (patch->enabled())
client->patch_enabled(patch->path());
@@ -92,10 +92,10 @@ ObjectSender::send_node(ClientInterface* client, const NodeImpl* node, bool recu
client->new_node(node->plugin()->uri(), node->path(), node->polyphonic(), node->num_ports());
- // Send metadata
- const GraphObjectImpl::MetadataMap& data = node->metadata();
- for (GraphObjectImpl::MetadataMap::const_iterator j = data.begin(); j != data.end(); ++j)
- client->metadata_update(node->path(), (*j).first, (*j).second);
+ // Send variable
+ const GraphObjectImpl::Variables& data = node->variables();
+ for (GraphObjectImpl::Variables::const_iterator j = data.begin(); j != data.end(); ++j)
+ client->variable_change(node->path(), (*j).first, (*j).second);
client->bundle_end();
@@ -116,10 +116,10 @@ ObjectSender::send_port(ClientInterface* client, const PortImpl* port)
client->new_port(port->path(), port->type().uri(), port->is_output());
- // Send metadata
- const GraphObjectImpl::MetadataMap& data = port->metadata();
- for (GraphObjectImpl::MetadataMap::const_iterator j = data.begin(); j != data.end(); ++j)
- client->metadata_update(port->path(), (*j).first, (*j).second);
+ // Send variable
+ const GraphObjectImpl::Variables& data = port->variables();
+ for (GraphObjectImpl::Variables::const_iterator j = data.begin(); j != data.end(); ++j)
+ client->variable_change(port->path(), (*j).first, (*j).second);
// Send control value
if (port->type() == DataType::CONTROL) {
diff --git a/src/libs/engine/QueuedEngineInterface.cpp b/src/libs/engine/QueuedEngineInterface.cpp
index 9899916c..053c0ff8 100644
--- a/src/libs/engine/QueuedEngineInterface.cpp
+++ b/src/libs/engine/QueuedEngineInterface.cpp
@@ -305,7 +305,7 @@ QueuedEngineInterface::midi_learn(const string& node_path)
void
-QueuedEngineInterface::set_metadata(const string& path,
+QueuedEngineInterface::set_variable(const string& path,
const string& predicate,
const Atom& value)
{
@@ -347,7 +347,7 @@ QueuedEngineInterface::request_port_value(const string& port_path)
}
void
-QueuedEngineInterface::request_metadata(const string& object_path, const string& key)
+QueuedEngineInterface::request_variable(const string& object_path, const string& key)
{
push_queued(new RequestMetadataEvent(_engine, _responder, now(), object_path, key));
}
diff --git a/src/libs/engine/QueuedEngineInterface.hpp b/src/libs/engine/QueuedEngineInterface.hpp
index c860c0f8..ea4be595 100644
--- a/src/libs/engine/QueuedEngineInterface.hpp
+++ b/src/libs/engine/QueuedEngineInterface.hpp
@@ -150,7 +150,7 @@ public:
virtual void midi_learn(const string& node_path);
- virtual void set_metadata(const string& path,
+ virtual void set_variable(const string& path,
const string& predicate,
const Raul::Atom& value);
@@ -164,7 +164,7 @@ public:
virtual void request_port_value(const string& port_path);
- virtual void request_metadata(const string& object_path, const string& key);
+ virtual void request_variable(const string& object_path, const string& key);
virtual void request_plugins();
diff --git a/src/libs/engine/events/RequestMetadataEvent.cpp b/src/libs/engine/events/RequestMetadataEvent.cpp
index 0567d94d..99f0e04e 100644
--- a/src/libs/engine/events/RequestMetadataEvent.cpp
+++ b/src/libs/engine/events/RequestMetadataEvent.cpp
@@ -48,7 +48,7 @@ RequestMetadataEvent::pre_process()
}
}
- _value = _object->get_metadata(_key);
+ _value = _object->get_variable(_key);
QueuedEvent::pre_process();
}
@@ -59,12 +59,12 @@ RequestMetadataEvent::post_process()
{
if (_responder->client()) {
if (!_object) {
- string msg = "Unable to find metadata subject ";
+ string msg = "Unable to find variable subject ";
msg += _path;
_responder->respond_error(msg);
} else {
_responder->respond_ok();
- _responder->client()->metadata_update(_path, _key, _value);
+ _responder->client()->variable_change(_path, _key, _value);
}
} else {
_responder->respond_error("Unknown client");
diff --git a/src/libs/engine/events/RequestMetadataEvent.hpp b/src/libs/engine/events/RequestMetadataEvent.hpp
index bbc2c871..71f55399 100644
--- a/src/libs/engine/events/RequestMetadataEvent.hpp
+++ b/src/libs/engine/events/RequestMetadataEvent.hpp
@@ -31,7 +31,7 @@ namespace Shared {
} using Shared::ClientInterface;
-/** A request from a client for a piece of metadata.
+/** A request from a client for a piece of variable.
*
* \ingroup engine
*/
diff --git a/src/libs/engine/events/SetMetadataEvent.cpp b/src/libs/engine/events/SetMetadataEvent.cpp
index ee0a62dc..2829eb1e 100644
--- a/src/libs/engine/events/SetMetadataEvent.cpp
+++ b/src/libs/engine/events/SetMetadataEvent.cpp
@@ -47,7 +47,7 @@ SetMetadataEvent::pre_process()
return;
}
- _object->set_metadata(_key, _value);
+ _object->set_variable(_key, _value);
QueuedEvent::pre_process();
}
@@ -70,7 +70,7 @@ SetMetadataEvent::post_process()
_responder->respond_error(msg);
} else {
_responder->respond_ok();
- _engine.broadcaster()->send_metadata_update(_path, _key, _value);
+ _engine.broadcaster()->send_variable_change(_path, _key, _value);
}
}
diff --git a/src/libs/engine/events/SetMetadataEvent.hpp b/src/libs/engine/events/SetMetadataEvent.hpp
index e65763c4..1d6a913e 100644
--- a/src/libs/engine/events/SetMetadataEvent.hpp
+++ b/src/libs/engine/events/SetMetadataEvent.hpp
@@ -29,7 +29,7 @@ namespace Ingen {
class GraphObjectImpl;
-/** An event to set a piece of metadata for an GraphObjectImpl.
+/** An event to set a piece of variable for an GraphObjectImpl.
*
* \ingroup engine
*/
diff --git a/src/libs/gui/App.hpp b/src/libs/gui/App.hpp
index 196bdd96..956ac9bd 100644
--- a/src/libs/gui/App.hpp
+++ b/src/libs/gui/App.hpp
@@ -146,7 +146,7 @@ protected:
ActivityPorts _activity_ports;
/** Used to avoid feedback loops with (eg) process checkbutton
- * FIXME: Maybe this should be globally implemented at the Controller level,
+ * FIXME: This should probably be implemented globally:
* disable all command sending while handling events to avoid feedback
* issues with widget event callbacks? This same pattern is duplicated
* too much... */
diff --git a/src/libs/gui/Configuration.hpp b/src/libs/gui/Configuration.hpp
index ab96cc80..0a3f94db 100644
--- a/src/libs/gui/Configuration.hpp
+++ b/src/libs/gui/Configuration.hpp
@@ -29,8 +29,6 @@ struct Coord { double x; double y; };
namespace Ingen {
namespace GUI {
-class Controller;
-
/** Singleton state manager for the entire app.
*
diff --git a/src/libs/gui/ConnectWindow.hpp b/src/libs/gui/ConnectWindow.hpp
index 086da446..315ae0b2 100644
--- a/src/libs/gui/ConnectWindow.hpp
+++ b/src/libs/gui/ConnectWindow.hpp
@@ -37,7 +37,6 @@ namespace Ingen {
namespace GUI {
class App;
-class Controller;
/** The initially visible "Connect to engine" window.
diff --git a/src/libs/gui/LoadPatchWindow.cpp b/src/libs/gui/LoadPatchWindow.cpp
index 672ff940..9c31c64c 100644
--- a/src/libs/gui/LoadPatchWindow.cpp
+++ b/src/libs/gui/LoadPatchWindow.cpp
@@ -68,7 +68,7 @@ LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gno
void
-LoadPatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+LoadPatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
set_patch(patch);
_initial_data = data;
diff --git a/src/libs/gui/LoadPatchWindow.hpp b/src/libs/gui/LoadPatchWindow.hpp
index 9a4cf210..4f4ff30c 100644
--- a/src/libs/gui/LoadPatchWindow.hpp
+++ b/src/libs/gui/LoadPatchWindow.hpp
@@ -51,7 +51,7 @@ public:
void set_replace() { _replace = true; }
void set_merge() { _replace = false; }
- void present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data);
+ void present(SharedPtr<PatchModel> patch, GraphObject::Variables data);
protected:
void on_show();
@@ -62,7 +62,7 @@ private:
void ok_clicked();
void cancel_clicked();
- GraphObject::MetadataMap _initial_data;
+ GraphObject::Variables _initial_data;
SharedPtr<PatchModel> _patch;
bool _replace;
diff --git a/src/libs/gui/LoadPluginWindow.cpp b/src/libs/gui/LoadPluginWindow.cpp
index 2c9161c3..cc488210 100644
--- a/src/libs/gui/LoadPluginWindow.cpp
+++ b/src/libs/gui/LoadPluginWindow.cpp
@@ -109,7 +109,7 @@ LoadPluginWindow::LoadPluginWindow(BaseObjectType* cobject, const Glib::RefPtr<G
void
-LoadPluginWindow::present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+LoadPluginWindow::present(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
set_patch(patch);
_initial_data = data;
@@ -341,8 +341,8 @@ LoadPluginWindow::add_clicked()
} else {
Path path = _patch->path().base() + Path::nameify(name);
App::instance().engine()->create_node(path, plugin->uri(), polyphonic);
- for (GraphObject::MetadataMap::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i)
- App::instance().engine()->set_metadata(path, i->first, i->second);
+ for (GraphObject::Variables::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i)
+ App::instance().engine()->set_variable(path, i->first, i->second);
++_plugin_name_offset;
_node_name_entry->set_text(generate_module_name(_plugin_name_offset));
diff --git a/src/libs/gui/LoadPluginWindow.hpp b/src/libs/gui/LoadPluginWindow.hpp
index c0b668ba..4ab4b0e7 100644
--- a/src/libs/gui/LoadPluginWindow.hpp
+++ b/src/libs/gui/LoadPluginWindow.hpp
@@ -96,7 +96,7 @@ public:
void add_plugin(SharedPtr<PluginModel> plugin);
bool has_shown() const { return _has_shown; }
- void present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data);
+ void present(SharedPtr<PatchModel> patch, GraphObject::Variables data);
protected:
void on_show();
@@ -117,7 +117,7 @@ private:
void plugin_selection_changed();
string generate_module_name(int offset = 0);
- GraphObject::MetadataMap _initial_data;
+ GraphObject::Variables _initial_data;
SharedPtr<PatchModel> _patch;
diff --git a/src/libs/gui/LoadRemotePatchWindow.cpp b/src/libs/gui/LoadRemotePatchWindow.cpp
index c6020ead..4c529d40 100644
--- a/src/libs/gui/LoadRemotePatchWindow.cpp
+++ b/src/libs/gui/LoadRemotePatchWindow.cpp
@@ -60,7 +60,7 @@ LoadRemotePatchWindow::LoadRemotePatchWindow(BaseObjectType* cobject, const Glib
void
-LoadRemotePatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+LoadRemotePatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
_liststore->clear();
diff --git a/src/libs/gui/LoadRemotePatchWindow.hpp b/src/libs/gui/LoadRemotePatchWindow.hpp
index 59b037d2..ca0ca814 100644
--- a/src/libs/gui/LoadRemotePatchWindow.hpp
+++ b/src/libs/gui/LoadRemotePatchWindow.hpp
@@ -63,7 +63,7 @@ public:
void set_replace() { _replace = true; }
void set_merge() { _replace = false; }
- void present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data);
+ void present(SharedPtr<PatchModel> patch, GraphObject::Variables data);
private:
void patch_activated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* col);
@@ -72,7 +72,7 @@ private:
void open_clicked();
void cancel_clicked();
- GraphObject::MetadataMap _initial_data;
+ GraphObject::Variables _initial_data;
SharedPtr<PatchModel> _patch;
bool _replace;
diff --git a/src/libs/gui/LoadSubpatchWindow.cpp b/src/libs/gui/LoadSubpatchWindow.cpp
index e230720a..2fdbf094 100644
--- a/src/libs/gui/LoadSubpatchWindow.cpp
+++ b/src/libs/gui/LoadSubpatchWindow.cpp
@@ -71,7 +71,7 @@ LoadSubpatchWindow::LoadSubpatchWindow(BaseObjectType* cobject, const Glib::RefP
void
-LoadSubpatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+LoadSubpatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
set_patch(patch);
_initial_data = data;
diff --git a/src/libs/gui/LoadSubpatchWindow.hpp b/src/libs/gui/LoadSubpatchWindow.hpp
index 89600895..ee8a5a16 100644
--- a/src/libs/gui/LoadSubpatchWindow.hpp
+++ b/src/libs/gui/LoadSubpatchWindow.hpp
@@ -44,7 +44,7 @@ public:
void set_patch(SharedPtr<PatchModel> patch);
- void present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data);
+ void present(SharedPtr<PatchModel> patch, GraphObject::Variables data);
protected:
void on_show();
@@ -58,7 +58,7 @@ private:
void ok_clicked();
void cancel_clicked();
- GraphObject::MetadataMap _initial_data;
+ GraphObject::Variables _initial_data;
SharedPtr<PatchModel> _patch;
diff --git a/src/libs/gui/NewSubpatchWindow.cpp b/src/libs/gui/NewSubpatchWindow.cpp
index 54a0abb9..69c8471e 100644
--- a/src/libs/gui/NewSubpatchWindow.cpp
+++ b/src/libs/gui/NewSubpatchWindow.cpp
@@ -43,7 +43,7 @@ NewSubpatchWindow::NewSubpatchWindow(BaseObjectType* cobject, const Glib::RefPtr
}
void
-NewSubpatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+NewSubpatchWindow::present(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
set_patch(patch);
_initial_data = data;
@@ -91,8 +91,8 @@ NewSubpatchWindow::ok_clicked()
const uint32_t poly = _poly_spinbutton->get_value_as_int();
App::instance().engine()->create_patch(path, poly);
- for (GraphObject::MetadataMap::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i)
- App::instance().engine()->set_metadata(path, i->first, i->second);
+ for (GraphObject::Variables::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i)
+ App::instance().engine()->set_variable(path, i->first, i->second);
App::instance().engine()->enable_patch(path);
diff --git a/src/libs/gui/NewSubpatchWindow.hpp b/src/libs/gui/NewSubpatchWindow.hpp
index d8fbde88..00fb6a3b 100644
--- a/src/libs/gui/NewSubpatchWindow.hpp
+++ b/src/libs/gui/NewSubpatchWindow.hpp
@@ -44,14 +44,14 @@ public:
void set_patch(SharedPtr<PatchModel> patch);
- void present(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data);
+ void present(SharedPtr<PatchModel> patch, GraphObject::Variables data);
private:
void name_changed();
void ok_clicked();
void cancel_clicked();
- GraphObject::MetadataMap _initial_data;
+ GraphObject::Variables _initial_data;
SharedPtr<PatchModel> _patch;
Gtk::Entry* _name_entry;
diff --git a/src/libs/gui/NodeModule.cpp b/src/libs/gui/NodeModule.cpp
index b4309dfa..a0ca3992 100644
--- a/src/libs/gui/NodeModule.cpp
+++ b/src/libs/gui/NodeModule.cpp
@@ -49,7 +49,7 @@ NodeModule::NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeMode
node->signal_new_port.connect(sigc::bind(sigc::mem_fun(this, &NodeModule::add_port), true));
node->signal_removed_port.connect(sigc::mem_fun(this, &NodeModule::remove_port));
- node->signal_metadata.connect(sigc::mem_fun(this, &NodeModule::set_metadata));
+ node->signal_variable.connect(sigc::mem_fun(this, &NodeModule::set_variable));
node->signal_polyphonic.connect(sigc::mem_fun(this, &NodeModule::set_stacked_border));
node->signal_renamed.connect(sigc::mem_fun(this, &NodeModule::rename));
@@ -92,8 +92,8 @@ NodeModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> n
else
ret = boost::shared_ptr<NodeModule>(new NodeModule(canvas, node));
- for (GraphObject::MetadataMap::const_iterator m = node->metadata().begin(); m != node->metadata().end(); ++m)
- ret->set_metadata(m->first, m->second);
+ for (GraphObject::Variables::const_iterator m = node->variables().begin(); m != node->variables().end(); ++m)
+ ret->set_variable(m->first, m->second);
for (PortModelList::const_iterator p = node->ports().begin(); p != node->ports().end(); ++p) {
ret->add_port(*p, false);
@@ -342,19 +342,19 @@ NodeModule::store_location()
const float x = static_cast<float>(property_x());
const float y = static_cast<float>(property_y());
- const Atom& existing_x = _node->get_metadata("ingenuity:canvas-x");
- const Atom& existing_y = _node->get_metadata("ingenuity:canvas-y");
+ const Atom& existing_x = _node->get_variable("ingenuity:canvas-x");
+ const Atom& existing_y = _node->get_variable("ingenuity:canvas-y");
if (existing_x.type() != Atom::FLOAT || existing_y.type() != Atom::FLOAT
|| existing_x.get_float() != x || existing_y.get_float() != y) {
- App::instance().engine()->set_metadata(_node->path(), "ingenuity:canvas-x", Atom(x));
- App::instance().engine()->set_metadata(_node->path(), "ingenuity:canvas-y", Atom(y));
+ App::instance().engine()->set_variable(_node->path(), "ingenuity:canvas-x", Atom(x));
+ App::instance().engine()->set_variable(_node->path(), "ingenuity:canvas-y", Atom(y));
}
}
void
-NodeModule::set_metadata(const string& key, const Atom& value)
+NodeModule::set_variable(const string& key, const Atom& value)
{
if (key == "ingenuity:canvas-x" && value.type() == Atom::FLOAT)
move_to(value.get_float(), property_y());
diff --git a/src/libs/gui/NodeModule.hpp b/src/libs/gui/NodeModule.hpp
index 32e9220d..dcfd97dd 100644
--- a/src/libs/gui/NodeModule.hpp
+++ b/src/libs/gui/NodeModule.hpp
@@ -71,7 +71,7 @@ protected:
bool popup_gui();
void rename();
- void set_metadata(const std::string& key, const Atom& value);
+ void set_variable(const std::string& key, const Atom& value);
void add_port(SharedPtr<PortModel> port, bool resize=true);
void remove_port(SharedPtr<PortModel> port);
diff --git a/src/libs/gui/ObjectMenu.hpp b/src/libs/gui/ObjectMenu.hpp
index 1acc278f..ab9eb30e 100644
--- a/src/libs/gui/ObjectMenu.hpp
+++ b/src/libs/gui/ObjectMenu.hpp
@@ -29,7 +29,6 @@ using Ingen::Client::ObjectModel;
namespace Ingen {
namespace GUI {
-class Controller;
class ObjectControlWindow;
class ObjectPropertiesWindow;
class PatchCanvas;
diff --git a/src/libs/gui/PatchCanvas.cpp b/src/libs/gui/PatchCanvas.cpp
index 07301aa4..3f0e2716 100644
--- a/src/libs/gui/PatchCanvas.cpp
+++ b/src/libs/gui/PatchCanvas.cpp
@@ -357,9 +357,9 @@ PatchCanvas::connect(boost::shared_ptr<FlowCanvas::Connectable> src_port,
SharedPtr<PluginModel> pm(new PluginModel(PluginModel::Internal, "", "midi_control_in", ""));
SharedPtr<NodeModel> nm(new NodeModel(pm, _patch->path().base()
+ src->name() + "-" + dst->name(), false));
- nm->set_metadata("canvas-x", Atom((float)
+ nm->set_variable("canvas-x", Atom((float)
(dst->module()->property_x() - dst->module()->width() - 20)));
- nm->set_metadata("canvas-y", Atom((float)
+ nm->set_variable("canvas-y", Atom((float)
(dst->module()->property_y())));
App::instance().engine()->create_node_from_model(nm.get());
App::instance().engine()->connect(src->model()->path(), nm->path() + "/MIDI_In");
@@ -369,9 +369,9 @@ PatchCanvas::connect(boost::shared_ptr<FlowCanvas::Connectable> src_port,
// Set control node range to port's user range
App::instance().engine()->set_port_value_queued(nm->path().base() + "Min",
- dst->model()->get_metadata("user-min").get_float());
+ dst->model()->get_variable("user-min").get_float());
App::instance().engine()->set_port_value_queued(nm->path().base() + "Max",
- dst->model()->get_metadata("user-max").get_float());
+ dst->model()->get_variable("user-max").get_float());
#endif
} else {
App::instance().engine()->connect(src->model()->path(), dst->model()->path());
@@ -510,7 +510,7 @@ PatchCanvas::menu_add_control(ControlType type)
{
// FIXME: bundleify
- GraphObject::MetadataMap data = get_initial_data();
+ GraphObject::Variables data = get_initial_data();
float x = data["ingenuity:canvas-x"].get_float();
float y = data["ingenuity:canvas-y"].get_float();
@@ -526,9 +526,9 @@ PatchCanvas::menu_add_port(const string& name, const string& type, bool is_outpu
// FIXME: bundleify
const Path& path = _patch->path().base() + generate_port_name(name);
App::instance().engine()->create_port(path, type, is_output);
- GraphObject::MetadataMap data = get_initial_data();
- for (GraphObject::MetadataMap::const_iterator i = data.begin(); i != data.end(); ++i)
- App::instance().engine()->set_metadata(path, i->first, i->second);
+ GraphObject::Variables data = get_initial_data();
+ for (GraphObject::Variables::const_iterator i = data.begin(); i != data.end(); ++i)
+ App::instance().engine()->set_variable(path, i->first, i->second);
}
@@ -538,9 +538,9 @@ PatchCanvas::load_plugin(SharedPtr<PluginModel> plugin)
const Path& path = _patch->path().base() + plugin->default_node_name(_patch);
// FIXME: polyphony?
App::instance().engine()->create_node(path, plugin->uri(), false);
- GraphObject::MetadataMap data = get_initial_data();
- for (GraphObject::MetadataMap::const_iterator i = data.begin(); i != data.end(); ++i)
- App::instance().engine()->set_metadata(path, i->first, i->second);
+ GraphObject::Variables data = get_initial_data();
+ for (GraphObject::Variables::const_iterator i = data.begin(); i != data.end(); ++i)
+ App::instance().engine()->set_variable(path, i->first, i->second);
}
@@ -557,10 +557,10 @@ PatchCanvas::get_new_module_location(double& x, double& y)
}
-GraphObject::MetadataMap
+GraphObject::Variables
PatchCanvas::get_initial_data()
{
- GraphObject::MetadataMap result;
+ GraphObject::Variables result;
result["ingenuity:canvas-x"] = Atom((float)_last_click_x);
result["ingenuity:canvas-y"] = Atom((float)_last_click_y);
diff --git a/src/libs/gui/PatchCanvas.hpp b/src/libs/gui/PatchCanvas.hpp
index 95b7fc70..fdd7cb34 100644
--- a/src/libs/gui/PatchCanvas.hpp
+++ b/src/libs/gui/PatchCanvas.hpp
@@ -100,7 +100,7 @@ private:
SLV2PluginClass plugin_class, SLV2PluginClasses classes);
#endif
- GraphObject::MetadataMap get_initial_data();
+ GraphObject::Variables get_initial_data();
bool canvas_event(GdkEvent* event);
diff --git a/src/libs/gui/PatchPortModule.cpp b/src/libs/gui/PatchPortModule.cpp
index 2c5581f8..de0ed445 100644
--- a/src/libs/gui/PatchPortModule.cpp
+++ b/src/libs/gui/PatchPortModule.cpp
@@ -44,8 +44,8 @@ PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPt
/*resize();
- const Atom& x_atom = port->get_metadata("ingenuity:canvas-x");
- const Atom& y_atom = port->get_metadata("ingenuity:canvas-y");
+ const Atom& x_atom = port->get_variable("ingenuity:canvas-x");
+ const Atom& y_atom = port->get_variable("ingenuity:canvas-y");
if (x_atom && y_atom && x_atom.type() == Atom::FLOAT && y_atom.type() == Atom::FLOAT) {
move_to(x_atom.get_float(), y_atom.get_float());
@@ -58,7 +58,7 @@ PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPt
set_stacked_border(port->polyphonic());
- port->signal_metadata.connect(sigc::mem_fun(this, &PatchPortModule::metadata_update));
+ port->signal_variable.connect(sigc::mem_fun(this, &PatchPortModule::variable_change));
port->signal_polyphonic.connect(sigc::mem_fun(this, &PatchPortModule::set_stacked_border));
}
@@ -76,8 +76,8 @@ PatchPortModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortMod
ret->set_menu(ret->_patch_port->menu());
- for (GraphObject::MetadataMap::const_iterator m = port->metadata().begin(); m != port->metadata().end(); ++m)
- ret->metadata_update(m->first, m->second);
+ for (GraphObject::Variables::const_iterator m = port->variables().begin(); m != port->variables().end(); ++m)
+ ret->variable_change(m->first, m->second);
ret->resize();
@@ -102,19 +102,19 @@ PatchPortModule::store_location()
const float x = static_cast<float>(property_x());
const float y = static_cast<float>(property_y());
- const Atom& existing_x = _port->get_metadata("ingenuity:canvas-x");
- const Atom& existing_y = _port->get_metadata("ingenuity:canvas-y");
+ const Atom& existing_x = _port->get_variable("ingenuity:canvas-x");
+ const Atom& existing_y = _port->get_variable("ingenuity:canvas-y");
if (existing_x.type() != Atom::FLOAT || existing_y.type() != Atom::FLOAT
|| existing_x.get_float() != x || existing_y.get_float() != y) {
- App::instance().engine()->set_metadata(_port->path(), "ingenuity:canvas-x", Atom(x));
- App::instance().engine()->set_metadata(_port->path(), "ingenuity:canvas-y", Atom(y));
+ App::instance().engine()->set_variable(_port->path(), "ingenuity:canvas-x", Atom(x));
+ App::instance().engine()->set_variable(_port->path(), "ingenuity:canvas-y", Atom(y));
}
}
void
-PatchPortModule::metadata_update(const string& key, const Atom& value)
+PatchPortModule::variable_change(const string& key, const Atom& value)
{
if (key == "ingenuity:canvas-x" && value.type() == Atom::FLOAT)
move_to(value.get_float(), property_y());
diff --git a/src/libs/gui/PatchPortModule.hpp b/src/libs/gui/PatchPortModule.hpp
index 8f3a3fc6..c9c5625d 100644
--- a/src/libs/gui/PatchPortModule.hpp
+++ b/src/libs/gui/PatchPortModule.hpp
@@ -62,7 +62,7 @@ public:
protected:
PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortModel> port);
- void metadata_update(const string& key, const Raul::Atom& value);
+ void variable_change(const string& key, const Raul::Atom& value);
void create_menu();
SharedPtr<PortModel> _port;
diff --git a/src/libs/gui/PatchPropertiesWindow.cpp b/src/libs/gui/PatchPropertiesWindow.cpp
index eb5120c4..2f0956e6 100644
--- a/src/libs/gui/PatchPropertiesWindow.cpp
+++ b/src/libs/gui/PatchPropertiesWindow.cpp
@@ -48,11 +48,11 @@ PatchPropertiesWindow::set_patch(SharedPtr<PatchModel> patch_model)
property_title() = patch_model->path() + " Properties";
_patch_model = patch_model;
- const Atom& author_atom = _patch_model->get_metadata("author");
+ const Atom& author_atom = _patch_model->get_variable("author");
_author_entry->set_text(
(author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" );
- const Atom& desc_atom = _patch_model->get_metadata("description");
+ const Atom& desc_atom = _patch_model->get_variable("description");
_textview->get_buffer()->set_text(
(desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" );
}
@@ -61,11 +61,11 @@ PatchPropertiesWindow::set_patch(SharedPtr<PatchModel> patch_model)
void
PatchPropertiesWindow::cancel_clicked()
{
- const Atom& author_atom = _patch_model->get_metadata("author");
+ const Atom& author_atom = _patch_model->get_variable("author");
_author_entry->set_text(
(author_atom.type() == Atom::STRING) ? author_atom.get_string() : "" );
- const Atom& desc_atom = _patch_model->get_metadata("description");
+ const Atom& desc_atom = _patch_model->get_variable("description");
_textview->get_buffer()->set_text(
(desc_atom.type() == Atom::STRING) ? desc_atom.get_string() : "" );
@@ -78,8 +78,8 @@ PatchPropertiesWindow::ok_clicked()
{
cerr << "FIXME: properties\n";
- //m_patch_model->set_metadata("author", Atom(_author_entry->get_text().c_str()));
- //m_patch_model->set_metadata("description", Atom(_textview->get_buffer()->get_text().c_str()));
+ //m_patch_model->set_variable("author", Atom(_author_entry->get_text().c_str()));
+ //m_patch_model->set_variable("description", Atom(_textview->get_buffer()->get_text().c_str()));
hide();
}
diff --git a/src/libs/gui/PatchWindow.cpp b/src/libs/gui/PatchWindow.cpp
index 3566d83d..716d4356 100644
--- a/src/libs/gui/PatchWindow.cpp
+++ b/src/libs/gui/PatchWindow.cpp
@@ -366,7 +366,7 @@ PatchWindow::event_save_as()
if (confirm) {
App::instance().loader()->save_patch(_patch, filename);
_patch->set_filename(filename);
- //_patch->set_metadata("filename", Atom(filename.c_str()));
+ //_patch->set_variable("filename", Atom(filename.c_str()));
}
}
App::instance().configuration()->set_patch_folder(dialog.get_current_folder());
diff --git a/src/libs/gui/Port.cpp b/src/libs/gui/Port.cpp
index e3dd0fd4..b02c0856 100644
--- a/src/libs/gui/Port.cpp
+++ b/src/libs/gui/Port.cpp
@@ -62,7 +62,7 @@ Port::Port(boost::shared_ptr<FlowCanvas::Module> module, SharedPtr<PortModel> pm
set_control_min(min);
set_control_max(max);
- pm->signal_metadata.connect(sigc::mem_fun(this, &Port::metadata_update));
+ pm->signal_variable.connect(sigc::mem_fun(this, &Port::variable_change));
_port_model->signal_control.connect(sigc::mem_fun(this, &Port::control_changed));
}
@@ -116,7 +116,7 @@ Port::set_control(float value, bool signal)
void
-Port::metadata_update(const string& key, const Atom& value)
+Port::variable_change(const string& key, const Atom& value)
{
if ( (key == "ingen:minimum") && value.type() == Atom::FLOAT) {
set_control_min(value.get_float());
diff --git a/src/libs/gui/Port.hpp b/src/libs/gui/Port.hpp
index dbbf64d3..4af07389 100644
--- a/src/libs/gui/Port.hpp
+++ b/src/libs/gui/Port.hpp
@@ -52,7 +52,7 @@ public:
private:
- void metadata_update(const string& key, const Raul::Atom& value);
+ void variable_change(const string& key, const Raul::Atom& value);
void renamed();
diff --git a/src/libs/gui/PortPropertiesWindow.cpp b/src/libs/gui/PortPropertiesWindow.cpp
index a715a114..707c8d76 100644
--- a/src/libs/gui/PortPropertiesWindow.cpp
+++ b/src/libs/gui/PortPropertiesWindow.cpp
@@ -80,8 +80,8 @@ PortPropertiesWindow::present(SharedPtr<PortModel> pm)
_connections.push_back(_max_spinner->signal_value_changed().connect(
sigc::mem_fun(*this, &PortPropertiesWindow::max_changed)));
- _connections.push_back(pm->signal_metadata.connect(
- sigc::mem_fun(this, &PortPropertiesWindow::metadata_update)));
+ _connections.push_back(pm->signal_variable.connect(
+ sigc::mem_fun(this, &PortPropertiesWindow::variable_change)));
_enable_signal = true;
@@ -90,7 +90,7 @@ PortPropertiesWindow::present(SharedPtr<PortModel> pm)
void
-PortPropertiesWindow::metadata_update(const string& key, const Atom& value)
+PortPropertiesWindow::variable_change(const string& key, const Atom& value)
{
_enable_signal = false;
@@ -115,7 +115,7 @@ PortPropertiesWindow::min_changed()
}
if (_enable_signal)
- App::instance().engine()->set_metadata(_port_model->path(), "ingen:minimum", min);
+ App::instance().engine()->set_variable(_port_model->path(), "ingen:minimum", min);
}
@@ -131,15 +131,15 @@ PortPropertiesWindow::max_changed()
}
if (_enable_signal)
- App::instance().engine()->set_metadata(_port_model->path(), "ingen:maximum", max);
+ App::instance().engine()->set_variable(_port_model->path(), "ingen:maximum", max);
}
void
PortPropertiesWindow::cancel()
{
- App::instance().engine()->set_metadata(_port_model->path(), "ingen:minimum", _initial_min);
- App::instance().engine()->set_metadata(_port_model->path(), "ingen:maximum", _initial_max);
+ App::instance().engine()->set_variable(_port_model->path(), "ingen:minimum", _initial_min);
+ App::instance().engine()->set_variable(_port_model->path(), "ingen:maximum", _initial_max);
hide();
}
diff --git a/src/libs/gui/PortPropertiesWindow.hpp b/src/libs/gui/PortPropertiesWindow.hpp
index 5d10960d..4580c7c6 100644
--- a/src/libs/gui/PortPropertiesWindow.hpp
+++ b/src/libs/gui/PortPropertiesWindow.hpp
@@ -42,7 +42,7 @@ public:
void present(SharedPtr<PortModel> port_model);
private:
- void metadata_update(const string& key, const Atom& value);
+ void variable_change(const string& key, const Atom& value);
void min_changed();
void max_changed();
diff --git a/src/libs/gui/ThreadedLoader.cpp b/src/libs/gui/ThreadedLoader.cpp
index 3cac84f6..1b7725a9 100644
--- a/src/libs/gui/ThreadedLoader.cpp
+++ b/src/libs/gui/ThreadedLoader.cpp
@@ -74,12 +74,12 @@ ThreadedLoader::_whipped()
}
void
-ThreadedLoader::load_patch(bool merge,
- const string& data_base_uri,
- const Path& data_path,
- GraphObject::MetadataMap engine_data,
- optional<Path> engine_parent,
- optional<const string&> engine_name)
+ThreadedLoader::load_patch(bool merge,
+ const string& data_base_uri,
+ const Path& data_path,
+ GraphObject::Variables engine_data,
+ optional<Path> engine_parent,
+ optional<const string&> engine_name)
{
_mutex.lock();
diff --git a/src/libs/gui/ThreadedLoader.hpp b/src/libs/gui/ThreadedLoader.hpp
index 2e03c2a1..6c095925 100644
--- a/src/libs/gui/ThreadedLoader.hpp
+++ b/src/libs/gui/ThreadedLoader.hpp
@@ -61,12 +61,12 @@ public:
// FIXME: there's a pattern here....
// (same core interface as Loader/Serialiser)
- void load_patch(bool merge,
- const string& data_base_uri,
- const Path& data_path,
- GraphObject::MetadataMap engine_data,
- optional<Path> engine_parent,
- optional<const string&> engine_name = optional<const string&>());
+ void load_patch(bool merge,
+ const string& data_base_uri,
+ const Path& data_path,
+ GraphObject::Variables engine_data,
+ optional<Path> engine_parent,
+ optional<const string&> engine_name = optional<const string&>());
void save_patch(SharedPtr<PatchModel> model, const string& filename);
diff --git a/src/libs/gui/UploadPatchWindow.cpp b/src/libs/gui/UploadPatchWindow.cpp
index b5e414a1..57045a91 100644
--- a/src/libs/gui/UploadPatchWindow.cpp
+++ b/src/libs/gui/UploadPatchWindow.cpp
@@ -74,11 +74,11 @@ UploadPatchWindow::on_show()
{
Gtk::Dialog::on_show();
- Raul::Atom atom = _patch->get_metadata("lv2:symbol");
+ Raul::Atom atom = _patch->get_variable("lv2:symbol");
if (atom)
_symbol_entry->set_text(atom.get_string());
- atom = _patch->get_metadata("doap:name");
+ atom = _patch->get_variable("doap:name");
if (atom)
_short_name_entry->set_text(atom.get_string());
}
@@ -237,11 +237,11 @@ UploadPatchWindow::upload_clicked()
Glib::ustring symbol = _symbol_entry->get_text();
Glib::ustring short_name = _short_name_entry->get_text();
- _patch->set_metadata("lv2:symbol", Atom(symbol));
- App::instance().engine()->set_metadata(_patch->path(), "lv2:symbol", Atom(symbol));
+ _patch->set_variable("lv2:symbol", Atom(symbol));
+ App::instance().engine()->set_variable(_patch->path(), "lv2:symbol", Atom(symbol));
- _patch->set_metadata("doap:name", Atom(short_name));
- App::instance().engine()->set_metadata(_patch->path(), "doap:name", Atom(short_name));
+ _patch->set_variable("doap:name", Atom(short_name));
+ App::instance().engine()->set_variable(_patch->path(), "doap:name", Atom(short_name));
_response = 0;
_progress_pct = 0;
diff --git a/src/libs/gui/WindowFactory.cpp b/src/libs/gui/WindowFactory.cpp
index 6e7e2c8b..0d04eed9 100644
--- a/src/libs/gui/WindowFactory.cpp
+++ b/src/libs/gui/WindowFactory.cpp
@@ -253,7 +253,7 @@ WindowFactory::remove_control_window(NodeControlWindow* win, GdkEventAny* ignore
void
-WindowFactory::present_load_plugin(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+WindowFactory::present_load_plugin(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
@@ -265,7 +265,7 @@ WindowFactory::present_load_plugin(SharedPtr<PatchModel> patch, GraphObject::Met
void
-WindowFactory::present_load_patch(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+WindowFactory::present_load_patch(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
@@ -279,7 +279,7 @@ WindowFactory::present_load_patch(SharedPtr<PatchModel> patch, GraphObject::Meta
void
-WindowFactory::present_load_remote_patch(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+WindowFactory::present_load_remote_patch(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
@@ -306,7 +306,7 @@ WindowFactory::present_upload_patch(SharedPtr<PatchModel> patch)
}
void
-WindowFactory::present_new_subpatch(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+WindowFactory::present_new_subpatch(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
@@ -318,7 +318,7 @@ WindowFactory::present_new_subpatch(SharedPtr<PatchModel> patch, GraphObject::Me
void
-WindowFactory::present_load_subpatch(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data)
+WindowFactory::present_load_subpatch(SharedPtr<PatchModel> patch, GraphObject::Variables data)
{
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
diff --git a/src/libs/gui/WindowFactory.hpp b/src/libs/gui/WindowFactory.hpp
index d9418496..06f2f637 100644
--- a/src/libs/gui/WindowFactory.hpp
+++ b/src/libs/gui/WindowFactory.hpp
@@ -64,12 +64,12 @@ public:
void present_controls(SharedPtr<NodeModel> node);
- void present_load_plugin(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data=GraphObject::MetadataMap());
- void present_load_patch(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data=GraphObject::MetadataMap());
- void present_load_remote_patch(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data=GraphObject::MetadataMap());
+ void present_load_plugin(SharedPtr<PatchModel> patch, GraphObject::Variables data=GraphObject::Variables());
+ void present_load_patch(SharedPtr<PatchModel> patch, GraphObject::Variables data=GraphObject::Variables());
+ void present_load_remote_patch(SharedPtr<PatchModel> patch, GraphObject::Variables data=GraphObject::Variables());
void present_upload_patch(SharedPtr<PatchModel> patch);
- void present_new_subpatch(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data=GraphObject::MetadataMap());
- void present_load_subpatch(SharedPtr<PatchModel> patch, GraphObject::MetadataMap data=GraphObject::MetadataMap());
+ void present_new_subpatch(SharedPtr<PatchModel> patch, GraphObject::Variables data=GraphObject::Variables());
+ void present_load_subpatch(SharedPtr<PatchModel> patch, GraphObject::Variables data=GraphObject::Variables());
void present_rename(SharedPtr<ObjectModel> object);
void present_properties(SharedPtr<ObjectModel> object);
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,