summaryrefslogtreecommitdiffstats
path: root/src/client/ObjectModel.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-05-27 23:21:34 +0000
committerDavid Robillard <d@drobilla.net>2009-05-27 23:21:34 +0000
commit2f595631859574bfa7779ebb42f42b8590f5424c (patch)
treec91c0cddcd93af991161c6cde4eceaaf45c5c8d5 /src/client/ObjectModel.cpp
parent20ff9af76b21b751ac29b354cf557e86b69c52f7 (diff)
downloadingen-2f595631859574bfa7779ebb42f42b8590f5424c.tar.gz
ingen-2f595631859574bfa7779ebb42f42b8590f5424c.tar.bz2
ingen-2f595631859574bfa7779ebb42f42b8590f5424c.zip
Remove 'property' vs 'variable' dichotomy in favour of 'meta objects' (to match serialisation).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2016 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client/ObjectModel.cpp')
-rw-r--r--src/client/ObjectModel.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/client/ObjectModel.cpp b/src/client/ObjectModel.cpp
index 2d3251c6..367237c0 100644
--- a/src/client/ObjectModel.cpp
+++ b/src/client/ObjectModel.cpp
@@ -29,6 +29,7 @@ namespace Client {
ObjectModel::ObjectModel(const Path& path)
: ResourceImpl(path)
+ , _meta(std::string("meta:#") + path.chop_start("/"))
, _path(path)
{
}
@@ -93,20 +94,13 @@ ObjectModel::set(SharedPtr<ObjectModel> o)
if (o->_parent)
_parent = o->_parent;
+ for (Properties::const_iterator v = o->meta().properties().begin(); v != o->meta().properties().end(); ++v) {
+ o->meta().set_property(v->first, v->second);
+ signal_property.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);
- if (mine.is_valid())
- cerr << "WARNING: " << _path << "Client/Server property mismatch: " << v->first << endl;
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.insert(make_pair(v->first, v->second));
- signal_variable.emit(v->first, v->second);
+ signal_property.emit(v->first, v->second);
}
}