From 1b8f06504a155e75a9419dfa5c9bf9df1866e01d Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 19 Aug 2008 01:41:42 +0000 Subject: Factor out destroy (and object_destroyed) to common interface. git-svn-id: http://svn.drobilla.net/lad/ingen@1443 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/engine/ClientBroadcaster.cpp | 2 +- src/libs/engine/OSCClientSender.cpp | 2 +- src/libs/engine/OSCClientSender.hpp | 2 +- src/libs/engine/events/SetMetadataEvent.cpp | 3 +-- src/libs/engine/events/SetPolyphonicEvent.cpp | 2 +- 5 files changed, 5 insertions(+), 6 deletions(-) (limited to 'src/libs/engine') diff --git a/src/libs/engine/ClientBroadcaster.cpp b/src/libs/engine/ClientBroadcaster.cpp index ff880433..d754f072 100644 --- a/src/libs/engine/ClientBroadcaster.cpp +++ b/src/libs/engine/ClientBroadcaster.cpp @@ -157,7 +157,7 @@ ClientBroadcaster::send_destroyed(const string& path) { assert(path != "/"); for (Clients::const_iterator i = _clients.begin(); i != _clients.end(); ++i) - (*i).second->object_destroyed(path); + (*i).second->destroy(path); } diff --git a/src/libs/engine/OSCClientSender.cpp b/src/libs/engine/OSCClientSender.cpp index 4518bfdf..0f05e1ed 100644 --- a/src/libs/engine/OSCClientSender.cpp +++ b/src/libs/engine/OSCClientSender.cpp @@ -169,7 +169,7 @@ OSCClientSender::new_port(const std::string& path, * \arg \b path (string) - Path of object (which no longer exists)

\n \n */ void -OSCClientSender::object_destroyed(const std::string& path) +OSCClientSender::destroy(const std::string& path) { assert(path != "/"); diff --git a/src/libs/engine/OSCClientSender.hpp b/src/libs/engine/OSCClientSender.hpp index 1b890ddd..d62dd1d3 100644 --- a/src/libs/engine/OSCClientSender.hpp +++ b/src/libs/engine/OSCClientSender.hpp @@ -86,7 +86,7 @@ public: virtual void patch_cleared(const std::string& path); - virtual void object_destroyed(const std::string& path); + virtual void destroy(const std::string& path); virtual void object_renamed(const std::string& old_path, const std::string& new_path); diff --git a/src/libs/engine/events/SetMetadataEvent.cpp b/src/libs/engine/events/SetMetadataEvent.cpp index 6e72d57b..db4bbc30 100644 --- a/src/libs/engine/events/SetMetadataEvent.cpp +++ b/src/libs/engine/events/SetMetadataEvent.cpp @@ -99,8 +99,7 @@ SetMetadataEvent::post_process() if (_error == INVALID_PATH) { _responder->respond_error((boost::format("Invalid path %1% setting %2%") % _path % _key).str()); } else if (_object == NULL) { - string msg = "Unable to find object "; - msg += _path; + string msg = (boost::format("Unable to find object %1% to set %2%") % _path % _key).str(); _responder->respond_error(msg); } else { _responder->respond_ok(); diff --git a/src/libs/engine/events/SetPolyphonicEvent.cpp b/src/libs/engine/events/SetPolyphonicEvent.cpp index 9b7fd980..d1fc6a7c 100644 --- a/src/libs/engine/events/SetPolyphonicEvent.cpp +++ b/src/libs/engine/events/SetPolyphonicEvent.cpp @@ -73,7 +73,7 @@ SetPolyphonicEvent::post_process() _responder->respond_error("Unable to set object as polyphonic"); } } else { - _responder->respond_error("Unable to find object"); + _responder->respond_error("Unable to find object to set polyphonic"); } } -- cgit v1.2.1