summaryrefslogtreecommitdiffstats
path: root/src/libs/client/ObjectModel.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2008-08-19 18:51:06 +0000
committerDavid Robillard <d@drobilla.net>2008-08-19 18:51:06 +0000
commite16206982d074e62956de00eeef611478f01c430 (patch)
tree388bc6e5ad9220cf9cdedf865a2d45856f418ae4 /src/libs/client/ObjectModel.cpp
parent14764da12f3808da0c40b643ac8224716f060729 (diff)
downloadingen-e16206982d074e62956de00eeef611478f01c430.tar.gz
ingen-e16206982d074e62956de00eeef611478f01c430.tar.bz2
ingen-e16206982d074e62956de00eeef611478f01c430.zip
Preliminary connecting via HTTP in Gtk client.
Better handling of overflowed client event receive buffer. Store fixes, complain only once about orphans, don't request an orphan parent over and over. git-svn-id: http://svn.drobilla.net/lad/ingen@1447 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/libs/client/ObjectModel.cpp')
-rw-r--r--src/libs/client/ObjectModel.cpp33
1 files changed, 19 insertions, 14 deletions
diff --git a/src/libs/client/ObjectModel.cpp b/src/libs/client/ObjectModel.cpp
index e9a491a6..ede5f822 100644
--- a/src/libs/client/ObjectModel.cpp
+++ b/src/libs/client/ObjectModel.cpp
@@ -119,21 +119,26 @@ ObjectModel::polyphonic() const
* @a model as correct. The paths of the two models MUST be equal.
*/
void
-ObjectModel::set(SharedPtr<ObjectModel> model)
+ObjectModel::set(SharedPtr<ObjectModel> o)
{
- assert(_path == model->path());
-
- for (Variables::const_iterator other = model->variables().begin();
- other != model->variables().end(); ++other) {
-
- Variables::const_iterator mine = _variables.find(other->first);
-
- if (mine != _variables.end()) {
- cerr << "WARNING: " << _path << "Client/Server data mismatch: " << other->first << endl;
- }
-
- _variables[other->first] = other->second;
- signal_variable.emit(other->first, other->second);
+ 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) {
+ Properties::const_iterator mine = _properties.find(v->first);
+ if (mine != _properties.end())
+ cerr << "WARNING: " << _path << "Client/Server property mismatch: " << v->first << endl;
+ _properties[v->first] = v->second;
+ signal_variable.emit(v->first, v->second);
}
}