From 698c38587bd4f0133a132dc363098ff8298ec47b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 11 May 2009 18:05:24 +0000 Subject: * 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 --- src/client/ObjectModel.cpp | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'src/client/ObjectModel.cpp') 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 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 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); + } } -- cgit v1.2.1