diff options
author | David Robillard <d@drobilla.net> | 2010-10-29 00:08:24 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-10-29 00:08:24 +0000 |
commit | 90229f42853a05df42297d529840a6be2f267aad (patch) | |
tree | dfc36c625c8444ff24424cf6b431498a2d2c18cc /src | |
parent | eaf64613bef152553e077939b372813a6c52e476 (diff) | |
download | ingen-90229f42853a05df42297d529840a6be2f267aad.tar.gz ingen-90229f42853a05df42297d529840a6be2f267aad.tar.bz2 ingen-90229f42853a05df42297d529840a6be2f267aad.zip |
Explicit copy constructor for Ingen::Client::ObjectModel.
Explicitly call virtual base class Node() constructors in NodeModel.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2661 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src')
-rw-r--r-- | src/client/NodeModel.cpp | 9 | ||||
-rw-r--r-- | src/client/ObjectModel.cpp | 10 | ||||
-rw-r--r-- | src/client/ObjectModel.hpp | 4 |
3 files changed, 19 insertions, 4 deletions
diff --git a/src/client/NodeModel.cpp b/src/client/NodeModel.cpp index dd9f1f91..783f2425 100644 --- a/src/client/NodeModel.cpp +++ b/src/client/NodeModel.cpp @@ -31,7 +31,8 @@ namespace Client { NodeModel::NodeModel(Shared::LV2URIMap& uris, SharedPtr<PluginModel> plugin, const Path& path) - : ObjectModel(uris, path) + : Node() + , ObjectModel(uris, path) , _plugin_uri(plugin->uri()) , _plugin(plugin) , _num_values(0) @@ -41,7 +42,8 @@ NodeModel::NodeModel(Shared::LV2URIMap& uris, SharedPtr<PluginModel> plugin, con } NodeModel::NodeModel(Shared::LV2URIMap& uris, const URI& plugin_uri, const Path& path) - : ObjectModel(uris, path) + : Node() + , ObjectModel(uris, path) , _plugin_uri(plugin_uri) , _num_values(0) , _min_values(0) @@ -51,7 +53,8 @@ NodeModel::NodeModel(Shared::LV2URIMap& uris, const URI& plugin_uri, const Path& NodeModel::NodeModel(const NodeModel& copy) - : ObjectModel(copy) + : Node(copy) + , ObjectModel(copy) , _plugin_uri(copy._plugin_uri) , _num_values(copy._num_values) , _min_values((float*)malloc(sizeof(float) * _num_values)) diff --git a/src/client/ObjectModel.cpp b/src/client/ObjectModel.cpp index 9e541d88..d3726862 100644 --- a/src/client/ObjectModel.cpp +++ b/src/client/ObjectModel.cpp @@ -36,6 +36,16 @@ ObjectModel::ObjectModel(Shared::LV2URIMap& uris, const Raul::Path& path) } +ObjectModel::ObjectModel(const ObjectModel& copy) + : ResourceImpl(copy) + , _meta(copy._meta) + , _parent(copy._parent) + , _path(copy._path) + , _symbol(copy._symbol) +{ +} + + ObjectModel::~ObjectModel() { } diff --git a/src/client/ObjectModel.hpp b/src/client/ObjectModel.hpp index 07e3be20..dc7f8f5e 100644 --- a/src/client/ObjectModel.hpp +++ b/src/client/ObjectModel.hpp @@ -1,3 +1,4 @@ + /* This file is part of Ingen. * Copyright (C) 2007-2009 David Robillard <http://drobilla.net> * @@ -83,7 +84,8 @@ protected: friend class ClientStore; ObjectModel(Shared::LV2URIMap& uris, const Raul::Path& path); - + ObjectModel(const ObjectModel& copy); + virtual void set_path(const Raul::Path& p); virtual void set_parent(SharedPtr<ObjectModel> p); virtual void add_child(SharedPtr<ObjectModel> c) {} |