From d38458e73cf7dfe02d2ea0ceb050f64df43413b8 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 16 Oct 2006 07:28:30 +0000 Subject: Used boost::noncopyable to eliminate undefined private copy constructors spread everywhere. git-svn-id: http://svn.drobilla.net/lad/ingen@182 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/NodeModel.h | 7 +------ src/libs/client/OSCClientReceiver.h | 7 ++----- src/libs/client/ObjectModel.h | 8 ++------ src/libs/client/PatchModel.h | 4 ---- src/libs/client/PluginModel.h | 4 ---- src/libs/client/PortModel.h | 5 ----- 6 files changed, 5 insertions(+), 30 deletions(-) (limited to 'src/libs/client') diff --git a/src/libs/client/NodeModel.h b/src/libs/client/NodeModel.h index e251d8ad..a63932d9 100644 --- a/src/libs/client/NodeModel.h +++ b/src/libs/client/NodeModel.h @@ -83,13 +83,8 @@ protected: bool m_polyphonic; PortModelList m_ports; ///< List of ports (not a map to preserve order) string m_plugin_uri; ///< Plugin URI (if PluginModel is unknown) - SharedPtr m_plugin; ///< The plugin this node is an instance of + SharedPtr m_plugin; ///< The plugin this node is an instance of map > m_banks; ///< DSSI banks - -private: - // Prevent copies (undefined) - NodeModel(const NodeModel& copy); - NodeModel& operator=(const NodeModel& copy); }; diff --git a/src/libs/client/OSCClientReceiver.h b/src/libs/client/OSCClientReceiver.h index 57faec77..0031441f 100644 --- a/src/libs/client/OSCClientReceiver.h +++ b/src/libs/client/OSCClientReceiver.h @@ -18,6 +18,7 @@ #define OSCCLIENTRECEIVER_H #include +#include #include #include "interface/ClientInterface.h" @@ -54,7 +55,7 @@ inline static int name##_cb(LO_HANDLER_ARGS, void* osc_listener)\ * * \ingroup IngenClient */ -class OSCClientReceiver : virtual public Ingen::Shared::ClientInterface +class OSCClientReceiver : boost::noncopyable, virtual public Ingen::Shared::ClientInterface { public: OSCClientReceiver(int listen_port); @@ -71,10 +72,6 @@ public: string listen_url() { return lo_server_thread_get_url(_st); } private: - // Prevent copies - OSCClientReceiver(const OSCClientReceiver& copy); - OSCClientReceiver& operator=(const OSCClientReceiver& copy); - void setup_callbacks(); static void error_cb(int num, const char* msg, const char* path); diff --git a/src/libs/client/ObjectModel.h b/src/libs/client/ObjectModel.h index 8b6b72ba..799399e9 100644 --- a/src/libs/client/ObjectModel.h +++ b/src/libs/client/ObjectModel.h @@ -23,6 +23,7 @@ #include #include #include +#include #include #include "raul/Atom.h" #include "raul/Path.h" @@ -47,7 +48,7 @@ typedef map MetadataMap; * * \ingroup IngenClient */ -class ObjectModel +class ObjectModel : boost::noncopyable { public: virtual ~ObjectModel(); @@ -84,11 +85,6 @@ protected: SharedPtr _parent; MetadataMap _metadata; - -private: - // Prevent copies (undefined) - ObjectModel(const ObjectModel& copy); - ObjectModel& operator=(const ObjectModel& copy); }; diff --git a/src/libs/client/PatchModel.h b/src/libs/client/PatchModel.h index 7dbad00b..402e84c3 100644 --- a/src/libs/client/PatchModel.h +++ b/src/libs/client/PatchModel.h @@ -87,10 +87,6 @@ private: void rename_node(const Path& old_path, const Path& new_path); void rename_node_port(const Path& old_path, const Path& new_path); - // Prevent copies (undefined) - PatchModel(const PatchModel& copy); - PatchModel& operator=(const PatchModel& copy); - NodeModelMap m_nodes; ConnectionList m_connections; string m_filename; diff --git a/src/libs/client/PluginModel.h b/src/libs/client/PluginModel.h index e4b4233d..51a251da 100644 --- a/src/libs/client/PluginModel.h +++ b/src/libs/client/PluginModel.h @@ -69,10 +69,6 @@ public: string default_node_name() { return Path::nameify(m_name); } private: - // Prevent copies - PluginModel(const PluginModel& copy); - PluginModel& operator=(const PluginModel& copy); - Type m_type; string m_uri; string m_name; diff --git a/src/libs/client/PortModel.h b/src/libs/client/PortModel.h index b9254b84..e5ce23fc 100644 --- a/src/libs/client/PortModel.h +++ b/src/libs/client/PortModel.h @@ -89,14 +89,9 @@ private: void add_child(SharedPtr c) { throw; } void remove_child(SharedPtr c) { throw; } - // Prevent copies (undefined) - PortModel(const PortModel& copy); - PortModel& operator=(const PortModel& copy); - void connected_to(SharedPtr p) { ++m_connections; connection_sig.emit(p); } void disconnected_from(SharedPtr p) { --m_connections; disconnection_sig.emit(p); } - Type m_type; Direction m_direction; Hint m_hint; -- cgit v1.2.1