summaryrefslogtreecommitdiffstats
path: root/src/client/ObjectModel.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-11 18:05:24 +0000
committerDavid Robillard <d@drobilla.net>2009-05-11 18:05:24 +0000
commit698c38587bd4f0133a132dc363098ff8298ec47b (patch)
treeabcab2ab196d995fbcc52a4e62c4f5d496b6a754 /src/client/ObjectModel.cpp
parent9ea901df533b0326e715ced10b9e9970239da515 (diff)
downloadingen-698c38587bd4f0133a132dc363098ff8298ec47b.tar.gz
ingen-698c38587bd4f0133a132dc363098ff8298ec47b.tar.bz2
ingen-698c38587bd4f0133a132dc363098ff8298ec47b.zip
* New ontology.
* Display human names on patch ports on creation, if enabled. * Fix copy/paste of subpatches. * Split properties into "properties" (class properties) and "variables" (instance properties). * Names are kind of a legacy leftover... * Remove special set poly / enable / etc events in favour of just setting properties (less API, extensible, RDF compatible). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1973 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client/ObjectModel.cpp')
-rw-r--r--src/client/ObjectModel.cpp22
1 files changed, 11 insertions, 11 deletions
diff --git a/src/client/ObjectModel.cpp b/src/client/ObjectModel.cpp
index 80460547..f5972af5 100644
--- a/src/client/ObjectModel.cpp
+++ b/src/client/ObjectModel.cpp
@@ -47,7 +47,7 @@ ObjectModel::get_variable(const string& key) const
{
static const Atom null_atom;
- Variables::const_iterator i = _variables.find(key);
+ Properties::const_iterator i = _variables.find(key);
if (i != _variables.end())
return i->second;
else
@@ -64,7 +64,7 @@ ObjectModel::get_variable( string& key)
{
static Atom null_atom;
- Variables::iterator i = _variables.find(key);
+ Properties::iterator i = _variables.find(key);
if (i != _variables.end())
return i->second;
else
@@ -75,7 +75,7 @@ ObjectModel::get_variable( string& key)
bool
ObjectModel::polyphonic() const
{
- const Raul::Atom& polyphonic = get_property("ingen:polyphonic");
+ const Raul::Atom& polyphonic = get_variable("ingen:polyphonic");
return (polyphonic.is_valid() && polyphonic.get_bool());
}
@@ -91,14 +91,6 @@ ObjectModel::set(SharedPtr<ObjectModel> o)
assert(_path == o->path());
if (o->_parent)
_parent = o->_parent;
-
- for (Variables::const_iterator v = o->variables().begin(); v != o->variables().end(); ++v) {
- Variables::const_iterator mine = _variables.find(v->first);
- if (mine != _variables.end())
- cerr << "WARNING: " << _path << "Client/Server variable mismatch: " << v->first << endl;
- _variables[v->first] = v->second;
- signal_variable.emit(v->first, v->second);
- }
for (Properties::const_iterator v = o->properties().begin(); v != o->properties().end(); ++v) {
const Raul::Atom& mine = get_property(v->first);
@@ -107,6 +99,14 @@ ObjectModel::set(SharedPtr<ObjectModel> o)
ResourceImpl::set_property(v->first, v->second);
signal_variable.emit(v->first, v->second);
}
+
+ for (Properties::const_iterator v = o->variables().begin(); v != o->variables().end(); ++v) {
+ Properties::const_iterator mine = _variables.find(v->first);
+ if (mine != _variables.end())
+ cerr << "WARNING: " << _path << "Client/Server variable mismatch: " << v->first << endl;
+ _variables[v->first] = v->second;
+ signal_variable.emit(v->first, v->second);
+ }
}