From 90229f42853a05df42297d529840a6be2f267aad Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 29 Oct 2010 00:08:24 +0000 Subject: 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 --- src/client/NodeModel.cpp | 9 ++++++--- src/client/ObjectModel.cpp | 10 ++++++++++ src/client/ObjectModel.hpp | 4 +++- 3 files changed, 19 insertions(+), 4 deletions(-) (limited to 'src') 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 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 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 * @@ -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 p); virtual void add_child(SharedPtr c) {} -- cgit v1.2.1