summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-10-04 21:45:20 +0000
committerDavid Robillard <d@drobilla.net>2006-10-04 21:45:20 +0000
commit30cb85c307b4c1273791721a782337742ade222c (patch)
tree020932d6f50ebbcd813c58f6f23e85a293587665
parent32261ba465be203f973a0e126672b8d7188ba327 (diff)
downloadingen-30cb85c307b4c1273791721a782337742ade222c.tar.gz
ingen-30cb85c307b4c1273791721a782337742ade222c.tar.bz2
ingen-30cb85c307b4c1273791721a782337742ade222c.zip
Moved generic utility stuff to new library "raul".
git-svn-id: http://svn.drobilla.net/lad/ingen@156 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--configure.ac50
-rw-r--r--src/common/Makefile.am2
-rw-r--r--src/common/interface/ClientInterface.h2
-rw-r--r--src/common/interface/EngineInterface.h4
-rw-r--r--src/common/util/Atom.h127
-rw-r--r--src/common/util/Condition.h42
-rw-r--r--src/common/util/CountedPtr.h58
-rw-r--r--src/common/util/LibloAtom.h73
-rw-r--r--src/common/util/Makefile.am12
-rw-r--r--src/common/util/Mutex.h41
-rw-r--r--src/common/util/Path.h251
-rw-r--r--src/common/util/Queue.h160
-rw-r--r--src/common/util/RedlandAtom.h93
-rw-r--r--src/common/util/Semaphore.h63
-rw-r--r--src/common/util/Slave.h57
-rw-r--r--src/common/util/Thread.h100
-rw-r--r--src/libs/client/ConnectionModel.cpp6
-rw-r--r--src/libs/client/ConnectionModel.h20
-rw-r--r--src/libs/client/ControlModel.h2
-rw-r--r--src/libs/client/DeprecatedSerializer.cpp6
-rw-r--r--src/libs/client/DeprecatedSerializer.h8
-rw-r--r--src/libs/client/Makefile.am4
-rw-r--r--src/libs/client/NodeModel.cpp18
-rw-r--r--src/libs/client/NodeModel.h26
-rw-r--r--src/libs/client/OSCClientReceiver.cpp4
-rw-r--r--src/libs/client/OSCEngineSender.cpp6
-rw-r--r--src/libs/client/OSCEngineSender.h2
-rw-r--r--src/libs/client/ObjectModel.cpp2
-rw-r--r--src/libs/client/ObjectModel.h18
-rw-r--r--src/libs/client/PatchModel.cpp42
-rw-r--r--src/libs/client/PatchModel.h24
-rw-r--r--src/libs/client/PluginModel.h2
-rw-r--r--src/libs/client/PortModel.h18
-rw-r--r--src/libs/client/Serializer.cpp30
-rw-r--r--src/libs/client/Serializer.h20
-rw-r--r--src/libs/client/Store.cpp114
-rw-r--r--src/libs/client/Store.h52
-rw-r--r--src/libs/client/ThreadedSigClientInterface.h4
-rw-r--r--src/libs/engine/AlsaMidiDriver.h2
-rw-r--r--src/libs/engine/ClientBroadcaster.cpp10
-rw-r--r--src/libs/engine/ClientBroadcaster.h10
-rw-r--r--src/libs/engine/DirectResponder.h8
-rw-r--r--src/libs/engine/Engine.cpp6
-rw-r--r--src/libs/engine/Event.h6
-rw-r--r--src/libs/engine/GraphObject.h4
-rw-r--r--src/libs/engine/JackAudioDriver.cpp2
-rw-r--r--src/libs/engine/JackMidiDriver.h2
-rw-r--r--src/libs/engine/Maid.h2
-rw-r--r--src/libs/engine/Makefile.am4
-rw-r--r--src/libs/engine/OSCClientSender.cpp4
-rw-r--r--src/libs/engine/OSCEngineReceiver.cpp18
-rw-r--r--src/libs/engine/OSCEngineReceiver.h6
-rw-r--r--src/libs/engine/OSCResponder.cpp4
-rw-r--r--src/libs/engine/OSCResponder.h2
-rw-r--r--src/libs/engine/ObjectStore.cpp2
-rw-r--r--src/libs/engine/ObjectStore.h2
-rw-r--r--src/libs/engine/PostProcessor.cpp2
-rw-r--r--src/libs/engine/PostProcessor.h4
-rw-r--r--src/libs/engine/QueuedEngineInterface.cpp12
-rw-r--r--src/libs/engine/QueuedEngineInterface.h12
-rw-r--r--src/libs/engine/QueuedEvent.h4
-rw-r--r--src/libs/engine/QueuedEventSource.h6
-rw-r--r--src/libs/engine/Responder.h4
-rw-r--r--src/libs/engine/events/ActivateEvent.cpp2
-rw-r--r--src/libs/engine/events/ActivateEvent.h2
-rw-r--r--src/libs/engine/events/AddNodeEvent.cpp8
-rw-r--r--src/libs/engine/events/AddNodeEvent.h6
-rw-r--r--src/libs/engine/events/AddPortEvent.cpp6
-rw-r--r--src/libs/engine/events/AddPortEvent.h4
-rw-r--r--src/libs/engine/events/AllNotesOffEvent.cpp4
-rw-r--r--src/libs/engine/events/AllNotesOffEvent.h4
-rw-r--r--src/libs/engine/events/ClearPatchEvent.cpp2
-rw-r--r--src/libs/engine/events/ClearPatchEvent.h2
-rw-r--r--src/libs/engine/events/ConnectionEvent.cpp6
-rw-r--r--src/libs/engine/events/ConnectionEvent.h6
-rw-r--r--src/libs/engine/events/CreatePatchEvent.cpp4
-rw-r--r--src/libs/engine/events/CreatePatchEvent.h4
-rw-r--r--src/libs/engine/events/DSSIConfigureEvent.cpp2
-rw-r--r--src/libs/engine/events/DSSIConfigureEvent.h2
-rw-r--r--src/libs/engine/events/DSSIControlEvent.cpp2
-rw-r--r--src/libs/engine/events/DSSIControlEvent.h2
-rw-r--r--src/libs/engine/events/DSSIProgramEvent.cpp2
-rw-r--r--src/libs/engine/events/DSSIProgramEvent.h2
-rw-r--r--src/libs/engine/events/DSSIUpdateEvent.cpp2
-rw-r--r--src/libs/engine/events/DSSIUpdateEvent.h2
-rw-r--r--src/libs/engine/events/DeactivateEvent.cpp2
-rw-r--r--src/libs/engine/events/DeactivateEvent.h2
-rw-r--r--src/libs/engine/events/DestroyEvent.cpp6
-rw-r--r--src/libs/engine/events/DestroyEvent.h6
-rw-r--r--src/libs/engine/events/DisablePatchEvent.cpp2
-rw-r--r--src/libs/engine/events/DisablePatchEvent.h2
-rw-r--r--src/libs/engine/events/DisconnectNodeEvent.cpp6
-rw-r--r--src/libs/engine/events/DisconnectNodeEvent.h4
-rw-r--r--src/libs/engine/events/DisconnectPortEvent.cpp6
-rw-r--r--src/libs/engine/events/DisconnectPortEvent.h4
-rw-r--r--src/libs/engine/events/DisconnectionEvent.cpp8
-rw-r--r--src/libs/engine/events/DisconnectionEvent.h8
-rw-r--r--src/libs/engine/events/EnablePatchEvent.cpp2
-rw-r--r--src/libs/engine/events/EnablePatchEvent.h2
-rw-r--r--src/libs/engine/events/LashRestoreDoneEvent.h2
-rw-r--r--src/libs/engine/events/LoadPluginsEvent.cpp2
-rw-r--r--src/libs/engine/events/LoadPluginsEvent.h2
-rw-r--r--src/libs/engine/events/MidiLearnEvent.cpp2
-rw-r--r--src/libs/engine/events/MidiLearnEvent.h4
-rw-r--r--src/libs/engine/events/NoteOffEvent.cpp4
-rw-r--r--src/libs/engine/events/NoteOffEvent.h4
-rw-r--r--src/libs/engine/events/NoteOnEvent.cpp4
-rw-r--r--src/libs/engine/events/NoteOnEvent.h4
-rw-r--r--src/libs/engine/events/PingQueuedEvent.h2
-rw-r--r--src/libs/engine/events/RegisterClientEvent.cpp4
-rw-r--r--src/libs/engine/events/RegisterClientEvent.h6
-rw-r--r--src/libs/engine/events/RenameEvent.cpp4
-rw-r--r--src/libs/engine/events/RenameEvent.h4
-rw-r--r--src/libs/engine/events/RequestAllObjectsEvent.cpp2
-rw-r--r--src/libs/engine/events/RequestAllObjectsEvent.h4
-rw-r--r--src/libs/engine/events/RequestMetadataEvent.cpp4
-rw-r--r--src/libs/engine/events/RequestMetadataEvent.h6
-rw-r--r--src/libs/engine/events/RequestObjectEvent.cpp2
-rw-r--r--src/libs/engine/events/RequestObjectEvent.h4
-rw-r--r--src/libs/engine/events/RequestPluginEvent.cpp2
-rw-r--r--src/libs/engine/events/RequestPluginEvent.h4
-rw-r--r--src/libs/engine/events/RequestPluginsEvent.cpp2
-rw-r--r--src/libs/engine/events/RequestPluginsEvent.h4
-rw-r--r--src/libs/engine/events/RequestPortValueEvent.cpp2
-rw-r--r--src/libs/engine/events/RequestPortValueEvent.h4
-rw-r--r--src/libs/engine/events/SetMetadataEvent.cpp2
-rw-r--r--src/libs/engine/events/SetMetadataEvent.h4
-rw-r--r--src/libs/engine/events/SetPortValueEvent.cpp4
-rw-r--r--src/libs/engine/events/SetPortValueEvent.h4
-rw-r--r--src/libs/engine/events/SetPortValueQueuedEvent.cpp4
-rw-r--r--src/libs/engine/events/SetPortValueQueuedEvent.h4
-rw-r--r--src/libs/engine/events/UnregisterClientEvent.cpp2
-rw-r--r--src/libs/engine/events/UnregisterClientEvent.h2
-rw-r--r--src/progs/demolition/demolition.cpp16
-rw-r--r--src/progs/ingenuity/App.cpp4
-rw-r--r--src/progs/ingenuity/App.h14
-rw-r--r--src/progs/ingenuity/BreadCrumb.h12
-rw-r--r--src/progs/ingenuity/BreadCrumbBox.cpp10
-rw-r--r--src/progs/ingenuity/BreadCrumbBox.h12
-rw-r--r--src/progs/ingenuity/ConnectWindow.cpp16
-rw-r--r--src/progs/ingenuity/ConnectWindow.h2
-rw-r--r--src/progs/ingenuity/Connection.h6
-rw-r--r--src/progs/ingenuity/ControlGroups.cpp8
-rw-r--r--src/progs/ingenuity/ControlGroups.h14
-rw-r--r--src/progs/ingenuity/ControlPanel.cpp4
-rw-r--r--src/progs/ingenuity/ControlPanel.h6
-rw-r--r--src/progs/ingenuity/DSSIController.cpp2
-rw-r--r--src/progs/ingenuity/DSSIController.h4
-rw-r--r--src/progs/ingenuity/DSSIModule.cpp2
-rw-r--r--src/progs/ingenuity/DSSIModule.h2
-rw-r--r--src/progs/ingenuity/LoadPatchWindow.cpp6
-rw-r--r--src/progs/ingenuity/LoadPatchWindow.h8
-rw-r--r--src/progs/ingenuity/LoadPluginWindow.cpp20
-rw-r--r--src/progs/ingenuity/LoadPluginWindow.h14
-rw-r--r--src/progs/ingenuity/LoadSubpatchWindow.cpp4
-rw-r--r--src/progs/ingenuity/LoadSubpatchWindow.h8
-rw-r--r--src/progs/ingenuity/Loader.cpp6
-rw-r--r--src/progs/ingenuity/Loader.h14
-rw-r--r--src/progs/ingenuity/NewSubpatchWindow.cpp4
-rw-r--r--src/progs/ingenuity/NewSubpatchWindow.h8
-rw-r--r--src/progs/ingenuity/NodeControlWindow.cpp4
-rw-r--r--src/progs/ingenuity/NodeControlWindow.h10
-rw-r--r--src/progs/ingenuity/NodeMenu.cpp6
-rw-r--r--src/progs/ingenuity/NodeMenu.h10
-rw-r--r--src/progs/ingenuity/NodeModule.cpp8
-rw-r--r--src/progs/ingenuity/NodeModule.h14
-rw-r--r--src/progs/ingenuity/NodePropertiesWindow.cpp4
-rw-r--r--src/progs/ingenuity/NodePropertiesWindow.h8
-rw-r--r--src/progs/ingenuity/PatchCanvas.cpp20
-rw-r--r--src/progs/ingenuity/PatchCanvas.h18
-rw-r--r--src/progs/ingenuity/PatchPortModule.cpp4
-rw-r--r--src/progs/ingenuity/PatchPortModule.h10
-rw-r--r--src/progs/ingenuity/PatchPropertiesWindow.cpp2
-rw-r--r--src/progs/ingenuity/PatchPropertiesWindow.h8
-rw-r--r--src/progs/ingenuity/PatchTreeWindow.cpp20
-rw-r--r--src/progs/ingenuity/PatchTreeWindow.h8
-rw-r--r--src/progs/ingenuity/PatchView.cpp10
-rw-r--r--src/progs/ingenuity/PatchView.h14
-rw-r--r--src/progs/ingenuity/PatchWindow.cpp6
-rw-r--r--src/progs/ingenuity/PatchWindow.h14
-rw-r--r--src/progs/ingenuity/Port.cpp2
-rw-r--r--src/progs/ingenuity/Port.h8
-rw-r--r--src/progs/ingenuity/RenameWindow.cpp2
-rw-r--r--src/progs/ingenuity/RenameWindow.h8
-rw-r--r--src/progs/ingenuity/SubpatchModule.cpp6
-rw-r--r--src/progs/ingenuity/SubpatchModule.h8
-rw-r--r--src/progs/ingenuity/WindowFactory.cpp26
-rw-r--r--src/progs/ingenuity/WindowFactory.h28
-rw-r--r--src/progs/patch_loader/new_patch_loader.cpp2
-rw-r--r--src/progs/patch_loader/patch_loader.cpp6
-rw-r--r--src/progs/server/main.cpp4
191 files changed, 697 insertions, 1778 deletions
diff --git a/configure.ac b/configure.ac
index f8722021..83c2b189 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1,6 +1,5 @@
AC_PREREQ(2.59)
AC_INIT([ingen],[0.4.0pre],[drobilla@connect.carleton.ca])
-AC_CONFIG_SRCDIR([src/common/util/CountedPtr.h])
AC_CONFIG_SRCDIR([src/common/interface/EngineInterface.h])
AC_CONFIG_SRCDIR([src/libs/engine/JackAudioDriver.cpp])
AC_CONFIG_SRCDIR([src/libs/engine/tests/node_tree_test.cpp])
@@ -42,9 +41,7 @@ AC_CHECK_LIB(pthread, pthread_create, [],
AC_MSG_ERROR([*** Ingen requires POSIX threads support]))
AC_CHECK_HEADER([pthread.h])
-# Check for POSIX semaphores in rt library
-AC_CHECK_HEADER([semaphore.h])
-AC_CHECK_LIB([rt], [sem_post])
+PKG_CHECK_MODULES(RAUL, raul >= 0.0.0)
# Check for LASH
build_lash="no"
@@ -389,7 +386,6 @@ AM_CONDITIONAL(BUILD_CLIENT_LIB, [test "$build_console_clients" = "yes" -o "$bui
AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([src/Makefile])
AC_CONFIG_FILES([src/common/Makefile])
-AC_CONFIG_FILES([src/common/util/Makefile])
AC_CONFIG_FILES([src/common/interface/Makefile])
AC_CONFIG_FILES([src/libs/Makefile])
AC_CONFIG_FILES([src/libs/engine/Makefile])
@@ -409,25 +405,25 @@ AC_CONFIG_FILES([doc/Doxyfile])
AC_OUTPUT
# Display summary
-AC_MSG_NOTICE([])
-AC_MSG_NOTICE([Ingen build configuration:])
-AC_MSG_NOTICE([])
-AC_MSG_NOTICE([Building server: $build_engine])
-AC_MSG_NOTICE([ Jack MIDI support: $build_jack_midi])
-AC_MSG_NOTICE([ ALSA MIDI support: $build_alsa_midi])
-AC_MSG_NOTICE([ LV2 Plugin support: $build_lv2])
-AC_MSG_NOTICE([ DSSI Plugin support: $build_dssi])
-AC_MSG_NOTICE([ LADSPA Plugin support: $build_ladspa])
-AC_MSG_NOTICE([ LASH support: $build_lash])
-AC_MSG_NOTICE([])
-AC_MSG_NOTICE([Building in-process engine: $build_in_process_engine])
-AC_MSG_NOTICE([])
-AC_MSG_NOTICE([Building console clients: $build_console_clients])
-AC_MSG_NOTICE([])
-AC_MSG_NOTICE([Building Ingenuity (GTK): $build_gtk_client])
-AC_MSG_NOTICE([ Monolithic: $monolithic_ingenuity])
-AC_MSG_NOTICE([])
-AC_MSG_NOTICE([])
-AC_MSG_NOTICE([Building with flags: $CXXFLAGS])
-AC_MSG_NOTICE([])
-AC_MSG_NOTICE([Please note the above and see README for performance information.])
+AC_MSG_RESULT([])
+AC_MSG_RESULT([Ingen build configuration:])
+AC_MSG_RESULT([])
+AC_MSG_RESULT([Building server: $build_engine])
+AC_MSG_RESULT([ Jack MIDI support: $build_jack_midi])
+AC_MSG_RESULT([ ALSA MIDI support: $build_alsa_midi])
+AC_MSG_RESULT([ LV2 Plugin support: $build_lv2])
+AC_MSG_RESULT([ DSSI Plugin support: $build_dssi])
+AC_MSG_RESULT([ LADSPA Plugin support: $build_ladspa])
+AC_MSG_RESULT([ LASH support: $build_lash])
+AC_MSG_RESULT([])
+AC_MSG_RESULT([Building in-process engine: $build_in_process_engine])
+AC_MSG_RESULT([])
+AC_MSG_RESULT([Building console clients: $build_console_clients])
+AC_MSG_RESULT([])
+AC_MSG_RESULT([Building Ingenuity (GTK): $build_gtk_client])
+AC_MSG_RESULT([ Monolithic: $monolithic_ingenuity])
+AC_MSG_RESULT([])
+AC_MSG_RESULT([])
+AC_MSG_RESULT([Building with flags: $CXXFLAGS])
+AC_MSG_RESULT([])
+AC_MSG_RESULT([Please note the above and see README for performance information.])
diff --git a/src/common/Makefile.am b/src/common/Makefile.am
index bdad7860..a322ba06 100644
--- a/src/common/Makefile.am
+++ b/src/common/Makefile.am
@@ -1 +1 @@
-DIST_SUBDIRS = util interface
+DIST_SUBDIRS = interface
diff --git a/src/common/interface/ClientInterface.h b/src/common/interface/ClientInterface.h
index 3a9d9508..9ff19609 100644
--- a/src/common/interface/ClientInterface.h
+++ b/src/common/interface/ClientInterface.h
@@ -18,7 +18,7 @@
#define CLIENTINTERFACE_H
#include <inttypes.h>
-#include "util/Atom.h"
+#include "raul/Atom.h"
#include <string>
using std::string;
diff --git a/src/common/interface/EngineInterface.h b/src/common/interface/EngineInterface.h
index 1c07a561..ae647fed 100644
--- a/src/common/interface/EngineInterface.h
+++ b/src/common/interface/EngineInterface.h
@@ -19,7 +19,7 @@
#include <inttypes.h>
#include <string>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "interface/ClientInterface.h"
using std::string;
@@ -44,7 +44,7 @@ public:
virtual void disable_responses() = 0;
// Client registration
- virtual void register_client(ClientKey key, CountedPtr<ClientInterface> client) = 0;
+ virtual void register_client(ClientKey key, SharedPtr<ClientInterface> client) = 0;
virtual void unregister_client(ClientKey key) = 0;
diff --git a/src/common/util/Atom.h b/src/common/util/Atom.h
deleted file mode 100644
index 2a6ae982..00000000
--- a/src/common/util/Atom.h
+++ /dev/null
@@ -1,127 +0,0 @@
-/* This file is part of Ingen. Copyright (C) 2006 Dave Robillard.
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef ATOM_H
-#define ATOM_H
-
-#include <cstdlib>
-#include <cassert>
-#include <cstring>
-#include <string>
-
-using std::string;
-
-
-/** An OSC atom (fundamental data types OSC messages are composed of).
- */
-class Atom {
-public:
- enum Type {
- NIL,
- INT,
- FLOAT,
- STRING,
- BLOB
- };
-
- Atom() : _type(NIL), _blob_val(0) {}
- Atom(int32_t val) : _type(INT), _int_val(val) {}
- Atom(float val) : _type(FLOAT), _float_val(val) {}
- Atom(const char* val) : _type(STRING), _string_val(strdup(val)) {}
- Atom(const string& val) : _type(STRING), _string_val(strdup(val.c_str())) {}
-
- Atom(void* val) : _type(BLOB), _blob_size(sizeof(val)), _blob_val(malloc(_blob_size))
- { memcpy(_blob_val, val, sizeof(_blob_size)); }
-
- ~Atom()
- {
- if (_type == STRING)
- free(_string_val);
- else if (_type == BLOB)
- free(_blob_val);
- }
-
- // Gotta love C++ boilerplate:
-
- Atom(const Atom& copy)
- : _type(copy._type)
- , _blob_size(copy._blob_size)
- {
- switch (_type) {
- case NIL: _blob_val = 0; break;
- case INT: _int_val = copy._int_val; break;
- case FLOAT: _float_val = copy._float_val; break;
- case STRING: _string_val = strdup(copy._string_val); break;
-
- case BLOB: _blob_val = malloc(_blob_size);
- memcpy(_blob_val, copy._blob_val, _blob_size);
- break;
-
- default: break;
- }
- }
-
- Atom& operator=(const Atom& other)
- {
- if (_type == BLOB)
- free(_blob_val);
- else if (_type == STRING)
- free(_string_val);
-
- _type = other._type;
- _blob_size = other._blob_size;
-
- switch (_type) {
- case NIL: _blob_val = 0; break;
- case INT: _int_val = other._int_val; break;
- case FLOAT: _float_val = other._float_val; break;
- case STRING: _string_val = strdup(other._string_val); break;
-
- case BLOB: _blob_val = malloc(_blob_size);
- memcpy(_blob_val, other._blob_val, _blob_size);
- break;
-
- default: break;
- }
- return *this;
- }
-
- /** Type of this atom. Always check this before attempting to get the
- * value - attempting to get the incorrectly typed value is a fatal error.
- */
- Type type() const { return _type; }
-
- inline int32_t get_int32() const { assert(_type == INT); return _int_val; }
- inline float get_float() const { assert(_type == FLOAT); return _float_val; }
- inline const char* get_string() const { assert(_type == STRING); return _string_val; }
- inline const void* get_blob() const { assert(_type == BLOB); return _blob_val; }
-
- inline operator bool() const { return (_type != NIL); }
-
-private:
- Type _type;
-
- size_t _blob_size; ///< always a multiple of 32
-
- union {
- int32_t _int_val;
- float _float_val;
- char* _string_val;
- void* _blob_val;
- };
-};
-
-#endif // ATOM_H
diff --git a/src/common/util/Condition.h b/src/common/util/Condition.h
deleted file mode 100644
index 1ee28dbd..00000000
--- a/src/common/util/Condition.h
+++ /dev/null
@@ -1,42 +0,0 @@
-/* This file is part of Ingen. Copyright (C) 2006 Dave Robillard.
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef CONDITION_H
-#define CONDITION_H
-
-#include <pthread.h>
-
-
-/** Trivial (but pretty) wrapper around POSIX Conditions (zero memory overhead).
- *
- * A semaphore that isn't a counter and is slow and NOT realtime safe.
- */
-class Condition {
-public:
- inline Condition() { pthread_cond_init(&_cond, NULL); }
-
- inline ~Condition() { pthread_cond_destroy(&_cond); }
-
- inline void signal() { pthread_cond_signal(&_cond); }
- inline void wait(Mutex& mutex) { pthread_cond_wait(&_cond, &mutex._mutex); }
-
-private:
- pthread_cond_t _cond;
-};
-
-
-#endif // CONDITION_H
-
diff --git a/src/common/util/CountedPtr.h b/src/common/util/CountedPtr.h
deleted file mode 100644
index 63b2bdf4..00000000
--- a/src/common/util/CountedPtr.h
+++ /dev/null
@@ -1,58 +0,0 @@
-/* A Reference Counting Smart Pointer.
- * Copyright (C) 2006 Dave Robillard.
- *
- * This is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * This file is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef COUNTED_PTR_H
-#define COUNTED_PTR_H
-
-#include <cassert>
-#include <cstddef>
-
-#ifdef BOOST_SP_ENABLE_DEBUG_HOOKS
-#include <iostream>
-#include <list>
-#include <algorithm>
-
-static std::list<void*> counted_ptr_counters;
-
-// Use debug hooks to ensure 2 shared_ptrs never point to the same thing
-namespace boost {
-
- inline void sp_scalar_constructor_hook(void* object, unsigned long cnt, void* ptr) {
- assert(std::find(counted_ptr_counters.begin(), counted_ptr_counters.end(),
- (void*)object) == counted_ptr_counters.end());
- counted_ptr_counters.push_back(object);
- //std::cerr << "Creating CountedPtr to "
- // << object << ", count = " << cnt << std::endl;
- }
-
- inline void sp_scalar_destructor_hook(void* object, unsigned long cnt, void* ptr) {
- counted_ptr_counters.remove(object);
- //std::cerr << "Destroying CountedPtr to "
- // << object << ", count = " << cnt << std::endl;
- }
-
-}
-#endif // BOOST_SP_ENABLE_DEBUG_HOOKS
-
-
-#include <boost/shared_ptr.hpp>
-
-#define CountedPtr boost::shared_ptr
-#define PtrCast boost::dynamic_pointer_cast
-
-#endif // COUNTED_PTR_H
-
diff --git a/src/common/util/LibloAtom.h b/src/common/util/LibloAtom.h
deleted file mode 100644
index db76a807..00000000
--- a/src/common/util/LibloAtom.h
+++ /dev/null
@@ -1,73 +0,0 @@
-/* This file is part of Ingen. Copyright (C) 2006 Dave Robillard.
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef LIBLO_ATOM_H
-#define LIBLO_ATOM_H
-
-#include <lo/lo.h>
-#include "util/Atom.h"
-
-
-/** Support for serializing an Atom to/from liblo messages.
- *
- * (Here to prevent a unnecessary liblo dependency for Atom).
- */
-class LibloAtom {
-public:
- static void lo_message_add_atom(lo_message m, const Atom& atom) {
- switch (atom.type()) {
- //case NIL:
- // (see below)
- //break;
- case Atom::INT:
- lo_message_add_int32(m, atom.get_int32());
- break;
- case Atom::FLOAT:
- lo_message_add_float(m, atom.get_float());
- break;
- case Atom::STRING:
- lo_message_add_string(m, atom.get_string());
- break;
- case Atom::BLOB:
- // FIXME: is this okay? what does liblo do?
- lo_message_add_blob(m, const_cast<void*>(atom.get_blob()));
- break;
- default: // This catches Atom::Type::NIL too
- lo_message_add_nil(m);
- break;
- }
- }
-
- static Atom lo_arg_to_atom(char type, lo_arg* arg) {
- switch (type) {
- case 'i':
- return Atom(arg->i);
- case 'f':
- return Atom(arg->f);
- case 's':
- return Atom(&arg->s);
- //case 'b'
- // FIXME: How to get a blob from a lo_arg?
- //return Atom(arg->b);
- default:
- return Atom();
- }
- }
-
-};
-
-
-#endif // LIBLO_ATOM_H
diff --git a/src/common/util/Makefile.am b/src/common/util/Makefile.am
deleted file mode 100644
index 6bddb707..00000000
--- a/src/common/util/Makefile.am
+++ /dev/null
@@ -1,12 +0,0 @@
-EXTRA_DIST = \
- CountedPtr.h \
- Path.h \
- Queue.h \
- Semaphore.h \
- Mutex.h \
- Condition.h \
- Thread.h \
- Slave.h \
- Atom.h \
- LibloAtom.h \
- RedlandAtom.h
diff --git a/src/common/util/Mutex.h b/src/common/util/Mutex.h
deleted file mode 100644
index c5aaf3ae..00000000
--- a/src/common/util/Mutex.h
+++ /dev/null
@@ -1,41 +0,0 @@
-/* This file is part of Ingen. Copyright (C) 2006 Dave Robillard.
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef MUTEX_H
-#define MUTEX_H
-
-#include <pthread.h>
-
-
-/** Trivial (but pretty) wrapper around POSIX Mutexes (zero memory overhead).
- */
-class Mutex {
-public:
- inline Mutex() { pthread_mutex_init(&_mutex, NULL); }
-
- inline ~Mutex() { pthread_mutex_destroy(&_mutex); }
-
- inline bool try_lock() { return (pthread_mutex_trylock(&_mutex) == 0); }
- inline void lock() { pthread_mutex_lock(&_mutex); }
- inline void unlock() { pthread_mutex_unlock(&_mutex); }
-
-private:
- friend class Condition;
- pthread_mutex_t _mutex;
-};
-
-
-#endif // MUTEX_H
diff --git a/src/common/util/Path.h b/src/common/util/Path.h
deleted file mode 100644
index bcb047ad..00000000
--- a/src/common/util/Path.h
+++ /dev/null
@@ -1,251 +0,0 @@
-/* This file is part of Ingen. Copyright (C) 2006 Dave Robillard.
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef PATH_H
-#define PATH_H
-
-#include <cctype>
-#include <string>
-#include <cassert>
-using std::string;
-
-
-/** Simple wrapper around standard string with useful path-specific methods.
- *
- * This enforces that a Path is a valid OSC path (though it is used for
- * GraphObject paths, which aren't directly OSC paths but a portion of one).
- *
- * A path is divided by slashes (/). The first character MUST be a slash, and
- * the last character MUST NOT be a slash (except in the special case of the
- * root path "/", which is the only valid single-character path).
- *
- * Valid characters are the 95 printable ASCII characters (32-126), excluding:
- * space # * , ? [ ] { }
- */
-class Path : public std::basic_string<char> {
-public:
-
- /** Construct a Path from an std::string.
- *
- * It is a fatal error to construct a Path from an invalid string,
- * use @ref is_valid first to check.
- */
- Path(const std::basic_string<char>& path)
- : std::basic_string<char>(path)
- {
- assert(is_valid(path));
- }
-
-
- /** Construct a Path from a C string.
- *
- * It is a fatal error to construct a Path from an invalid string,
- * use @ref is_valid first to check.
- */
- Path(const char* cpath)
- : std::basic_string<char>(cpath)
- {
- assert(is_valid(cpath));
- }
-
-
- static bool is_valid(const std::basic_string<char>& path)
- {
- if (path.length() == 0)
- return false;
-
- // Must start with a /
- if (path.at(0) != '/')
- return false;
-
- // Must not end with a slash unless "/"
- if (path.length() > 1 && path.at(path.length()-1) == '/')
- return false;
-
- assert(path.find_last_of("/") != string::npos);
-
- // Double slash not allowed
- if (path.find("//") != string::npos)
- return false;
-
- // All characters must be printable ASCII
- for (size_t i=0; i < path.length(); ++i)
- if (path.at(i) < 32 || path.at(i) > 126)
- return false;
-
- // Disallowed characters
- if ( path.find(" ") != string::npos
- || path.find("#") != string::npos
- || path.find("*") != string::npos
- || path.find(",") != string::npos
- || path.find("?") != string::npos
- || path.find("[") != string::npos
- || path.find("]") != string::npos
- || path.find("{") != string::npos
- || path.find("}") != string::npos)
- return false;
-
- return true;
- }
-
- static bool is_valid_name(const std::basic_string<char>& path)
- {
- return is_valid(string("/").append(path));
- }
-
-
- /** Convert a string to a valid full path.
- *
- * This will make a best effort at turning @a str into a complete, valid
- * Path, and will always return one.
- */
- static string pathify(const std::basic_string<char>& str)
- {
- string path = str;
-
- if (path.length() == 0)
- return "/"; // this might not be wise
-
- // Must start with a /
- if (path.at(0) != '/')
- path = string("/").append(path);
-
- // Must not end with a slash unless "/"
- if (path.length() > 1 && path.at(path.length()-1) == '/')
- path = path.substr(0, path.length()-1); // chop trailing slash
-
- assert(path.find_last_of("/") != string::npos);
-
- replace_invalid_chars(path, false);
-
- assert(is_valid(path));
-
- return path;
- }
-
- /** Convert a string to a valid name (or "method" - tokens between slashes)
- *
- * This will strip all slashes, etc, and always return a valid name/method.
- */
- static string nameify(const std::basic_string<char>& str)
- {
- string name = str;
-
- if (name.length() == 0)
- return "."; // this might not be wise
-
- replace_invalid_chars(name, true);
-
- assert(is_valid(string("/") + name));
-
- return name;
- }
-
-
- /** Replace any invalid characters in @a str with a suitable replacement.
- *
- * Makes a pretty name - underscores are a valid character, but this chops
- * both spaces and underscores, uppercasing the next letter, to create
- * uniform CamelCase names that look nice
- */
- static void replace_invalid_chars(string& str, bool replace_slash = false)
- {
- for (size_t i=0; i < str.length(); ++i) {
- if (str[i] == ' ' || str[i] == '_') {
- str[i+1] = std::toupper(str[i+1]); // capitalize next char
- str = str.substr(0, i) + str.substr(i+1); // chop space/underscore
- } else if (str[i] == '[' || str[i] == '{') {
- str[i] = '(';
- } else if (str[i] == ']' || str[i] == '}') {
- str[i] = ')';
- } else if (str[i] < 32 || str.at(i) > 126
- || str[i] == '#'
- || str[i] == '*'
- || str[i] == ','
- || str[i] == '?'
- || (replace_slash && str[i] == '/')) {
- str[i] = '.';
- }
- }
-
- // Chop brackets
- while (true) {
-
- const string::size_type open = str.find("(");
- const string::size_type close = str.find(")");
-
- if (open != string::npos) {
- if (close != string::npos)
- str.erase(open, (close - open) + 1);
- } else {
- break;
- }
-
- }
- }
-
-
- /** Return the name of this object (everything after the last '/').
- * This is the "method name" for OSC paths.
- */
- inline std::basic_string<char> name() const
- {
- if ((*this) == "/")
- return "";
- else
- return substr(find_last_of("/")+1);
- }
-
-
- /** Return the parent's path.
- *
- * Calling this on the path "/" will return "/".
- * This is the (deepest) "container path" for OSC paths.
- */
- inline Path parent() const
- {
- std::basic_string<char> parent = substr(0, find_last_of("/"));
- return (parent == "") ? "/" : parent;
- }
-
- /** Parent path with a "/" appended.
- *
- * This exists to avoid needing to be careful about the special case of "/".
- * To create a child of a path, use parent.base() + child_name.
- * Returned value is always a valid path, with the single exception that
- * the last character is "/".
- */
- inline string base() const
- {
- if ((*this) == "/")
- return *this;
- else
- return (*this) + "/";
- }
-
- inline bool is_child_of(const Path& parent) const
- {
- return (length() > parent.length() && substr(0, parent.length()) == parent);
- }
-
- inline bool is_parent_of(const Path& child) const
- {
- return child.is_child_of(*this);
- }
-};
-
-
-#endif // PATH_H
diff --git a/src/common/util/Queue.h b/src/common/util/Queue.h
deleted file mode 100644
index a4c34222..00000000
--- a/src/common/util/Queue.h
+++ /dev/null
@@ -1,160 +0,0 @@
-/* This file is part of Ingen. Copyright (C) 2006 Dave Robillard.
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef QUEUE_H
-#define QUEUE_H
-
-#include <cassert>
-#include <cstdlib>
-
-
-/** Realtime-safe single-reader single-writer queue (aka lock-free ringbuffer)
- *
- * Implemented as a dequeue in a fixed array. This is read/write thread-safe,
- * pushing and popping may occur simultaneously by seperate threads, but
- * the push and pop operations themselves are not thread-safe.
- *
- * FIXME: Verify atomicity of everything here.
- */
-template <typename T>
-class Queue
-{
-public:
- Queue(size_t size);
- ~Queue();
-
- inline bool is_empty() const;
- inline bool is_full() const;
-
- inline size_t capacity() const { return m_size-1; }
- inline size_t fill() const;
-
- inline T& front() const;
-
- inline bool push(T obj);
- inline T& pop();
-
-private:
- // Prevent copies (these are undefined)
- Queue(const Queue& copy);
- Queue& operator=(const Queue& copy);
-
- volatile size_t m_front; ///< Index to front of queue (circular)
- volatile size_t m_back; ///< Index to back of queue (one past last element) (circular)
- const size_t m_size; ///< Size of @ref m_objects (you can store m_size-1 objects)
- T* const m_objects; ///< Fixed array containing queued elements
-};
-
-
-template<typename T>
-Queue<T>::Queue(size_t size)
-: m_front(0),
- m_back(0),
- m_size(size+1),
- m_objects((T*)calloc(m_size, sizeof(T)))
-{
- assert(size > 1);
-}
-
-
-template <typename T>
-Queue<T>::~Queue()
-{
- free(m_objects);
-}
-
-
-/** Return whether or not the queue is empty.
- */
-template <typename T>
-inline bool
-Queue<T>::is_empty() const
-{
- return (m_back == m_front);
-}
-
-
-/** Return whether or not the queue is full.
- */
-template <typename T>
-inline bool
-Queue<T>::is_full() const
-{
- // FIXME: This can probably be faster
- return (fill() == capacity());
-}
-
-
-/** Returns how many elements are currently in the queue.
- */
-template <typename T>
-inline size_t
-Queue<T>::fill() const
-{
- return (m_back + m_size - m_front) % m_size;
-}
-
-
-/** Return the element at the front of the queue without removing it
- */
-template <typename T>
-inline T&
-Queue<T>::front() const
-{
- return m_objects[m_front];
-}
-
-
-/** Push an item onto the back of the Queue - realtime-safe, not thread-safe.
- *
- * @returns true if @a elem was successfully pushed onto the queue,
- * false otherwise (queue is full).
- */
-template <typename T>
-inline bool
-Queue<T>::push(T elem)
-{
- if (is_full()) {
- return false;
- } else {
- m_objects[m_back] = elem;
- m_back = (m_back + 1) % (m_size);
- return true;
- }
-}
-
-
-/** Pop an item off the front of the queue - realtime-safe, not thread-safe.
- *
- * It is a fatal error to call pop() when the queue is empty.
- *
- * @returns the element popped.
- */
-template <typename T>
-inline T&
-Queue<T>::pop()
-{
- assert(!is_empty());
- assert(m_size > 0);
-
- T& r = m_objects[m_front];
- m_front = (m_front + 1) % (m_size);
-
- return r;
-}
-
-
-#endif // QUEUE_H
diff --git a/src/common/util/RedlandAtom.h b/src/common/util/RedlandAtom.h
deleted file mode 100644
index 8d2456a5..00000000
--- a/src/common/util/RedlandAtom.h
+++ /dev/null
@@ -1,93 +0,0 @@
-/* This file is part of Ingen. Copyright (C) 2006 Dave Robillard.
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef REDLAND_ATOM_H
-#define REDLAND_ATOM_H
-
-#include <sstream>
-#include <cstring>
-#include <raptor.h>
-#include "util/Atom.h"
-
-#define U(x) ((const unsigned char*)(x))
-
-/** Support for serializing an Atom to/from RDF (via redland aka librdf).
- *
- * (Here to prevent a unnecessary redland dependency for Atom).
- */
-class RedlandAtom {
-public:
- /** Set this atom's value to the object (value) portion of an RDF triple.
- *
- * Caller is responsible for calling free(triple->object).
- */
- static void atom_to_triple_object(raptor_statement* triple, const Atom& atom) {
- std::ostringstream os;
-
- triple->object_literal_language = NULL;
-
- switch (atom.type()) {
- case Atom::INT:
- os << atom.get_int32();
- triple->object = (unsigned char*)strdup(os.str().c_str());
- triple->object_type = RAPTOR_IDENTIFIER_TYPE_LITERAL;
- triple->object_literal_datatype = raptor_new_uri(
- U("http://www.w3.org/2001/XMLSchema#integer"));
- break;
- case Atom::FLOAT:
- os << atom.get_float();
- triple->object = (unsigned char*)strdup(os.str().c_str());
- triple->object_type = RAPTOR_IDENTIFIER_TYPE_LITERAL;
- triple->object_literal_datatype = raptor_new_uri(
- U("http://www.w3.org/2001/XMLSchema#float"));
- break;
- case Atom::STRING:
- triple->object = strdup(atom.get_string());
- triple->object_type = RAPTOR_IDENTIFIER_TYPE_LITERAL;
- break;
- case Atom::BLOB:
- case Atom::NIL:
- default:
- cerr << "WARNING: Unserializable Atom!" << endl;
- triple->object = NULL;
- triple->object_type = RAPTOR_IDENTIFIER_TYPE_UNKNOWN;
- }
- }
-
-#if 0
- static Atom node_to_atom(librdf_node* node) {
- /*switch (type) {
- case 'i':
- return Atom(arg->i);
- case 'f':
- return Atom(arg->f);
- case 's':
- return Atom(&arg->s);
- //case 'b'
- // FIXME: How to get a blob from a lo_arg?
- //return Atom(arg->b);
- default:
- return Atom();
- }*/
- cerr << "FIXME: node_to_atom\n";
- return Atom();
- }
-#endif
-
-};
-
-
-#endif // REDLAND_ATOM_H
diff --git a/src/common/util/Semaphore.h b/src/common/util/Semaphore.h
deleted file mode 100644
index 168a7059..00000000
--- a/src/common/util/Semaphore.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/* This file is part of Ingen. Copyright (C) 2006 Dave Robillard.
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef SEMAPHORE_H
-#define SEMAPHORE_H
-
-#include <semaphore.h>
-
-
-/** Trivial wrapper around POSIX semaphores (zero memory overhead).
- *
- * This was created to provide an alternative debuggable implementation of
- * semaphores based on a cond/mutex pair because semaphore's appeared not to
- * work in GDB. Turns out sem_wait can fail when run in GDB, and Debian
- * really needs to update it's man pages.
- *
- * This class remains as a trivial (yet pretty) wrapper/abstraction.
- */
-class Semaphore {
-public:
- inline Semaphore(unsigned int initial) { sem_init(&m_sem, 0, initial); }
-
- inline ~Semaphore() { sem_destroy(&m_sem); }
-
- /** Increment (and signal any waiters).
- *
- * Realtime safe.
- */
- inline void post() { sem_post(&m_sem); }
-
- /** Wait until count is > 0, then decrement.
- *
- * Note that sem_wait always returns 0 in practise. It returns nonzero
- * when run in GDB, so the while is necessary to allow debugging.
- *
- * Obviously not realtime safe.
- */
- inline void wait() { while (sem_wait(&m_sem) != 0) ; }
-
- /** Non-blocking version of wait().
- *
- * Realtime safe?
- */
- inline int try_wait() { return sem_trywait(&m_sem); }
-private:
- sem_t m_sem;
-};
-
-
-#endif // SEMAPHORE_H
diff --git a/src/common/util/Slave.h b/src/common/util/Slave.h
deleted file mode 100644
index 0d0976b8..00000000
--- a/src/common/util/Slave.h
+++ /dev/null
@@ -1,57 +0,0 @@
-/* This file is part of Ingen. Copyright (C) 2006 Dave Robillard.
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef SLAVE_H
-#define SLAVE_H
-
-#include <pthread.h>
-#include "util/Semaphore.h"
-#include "util/Thread.h"
-
-
-/** Thread driven by (realtime safe) signals.
- *
- * \ingroup engine
- */
-class Slave : public Thread
-{
-public:
- Slave() : _whip(0) {}
-
- /** Tell the slave to do whatever work it does. Realtime safe. */
- inline void whip() { _whip.post(); }
-
-protected:
- virtual void _whipped() = 0;
-
- Semaphore _whip;
-
-private:
- // Prevent copies (undefined)
- Slave(const Slave&);
- Slave& operator=(const Slave&);
-
- inline void _run()
- {
- while (true) {
- _whip.wait();
- _whipped();
- }
- }
-};
-
-
-#endif // SLAVE_H
diff --git a/src/common/util/Thread.h b/src/common/util/Thread.h
deleted file mode 100644
index c139434b..00000000
--- a/src/common/util/Thread.h
+++ /dev/null
@@ -1,100 +0,0 @@
-/* This file is part of Ingen. Copyright (C) 2006 Dave Robillard.
- *
- * Ingen is free software; you can redistribute it and/or modify it under the
- * terms of the GNU General Public License as published by the Free Software
- * Foundation; either version 2 of the License, or (at your option) any later
- * version.
- *
- * Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
- * WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
- * FOR A PARTICULAR PURPOSE. See the GNU General Public License for details.
- *
- * You should have received a copy of the GNU General Public License along
- * with this program; if not, write to the Free Software Foundation, Inc.,
- * 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
- */
-
-#ifndef THREAD_H
-#define THREAD_H
-
-#include <string>
-#include <iostream>
-#include <pthread.h>
-
-
-/** Abstract base class for a thread.
- *
- * Extend this and override the _run method to easily create a thread
- * to perform some task.
- *
- * \ingroup engine
- */
-class Thread
-{
-public:
- Thread() : _pthread_exists(false) {}
-
- virtual ~Thread() { stop(); }
-
- void set_name(const std::string& name) { _name = name; }
-
- virtual void start() {
- std::cout << "[" << _name << " Thread] Starting." << std::endl;
-
- pthread_attr_t attr;
- pthread_attr_init(&attr);
- pthread_attr_setstacksize(&attr, 1500000);
-
- pthread_create(&_pthread, &attr, _static_run, this);
- _pthread_exists = true;
- }
-
- virtual void stop() {
- if (_pthread_exists) {
- pthread_cancel(_pthread);
- pthread_join(_pthread, NULL);
- _pthread_exists = false;
- }
- }
-
- void set_scheduling(int policy, unsigned int priority) {
- sched_param sp;
- sp.sched_priority = priority;
- int result = pthread_setschedparam(_pthread, SCHED_FIFO, &sp);
- if (!result) {
- std::cout << "[" << _name << "] Set scheduling policy to ";
- switch (policy) {
- case SCHED_FIFO: std::cout << "SCHED_FIFO"; break;
- case SCHED_RR: std::cout << "SCHED_RR"; break;
- case SCHED_OTHER: std::cout << "SCHED_OTHER"; break;
- default: std::cout << "UNKNOWN"; break;
- }
- std::cout << ", priority " << sp.sched_priority << std::endl;
- } else {
- std::cout << "[" << _name << "] Unable to set scheduling policy ("
- << strerror(result) << ")" << std::endl;
- }
- }
-
-
-protected:
- virtual void _run() = 0;
-
-private:
- // Prevent copies (undefined)
- Thread(const Thread&);
- Thread& operator=(const Thread&);
-
- inline static void* _static_run(void* me) {
- Thread* myself = (Thread*)me;
- myself->_run();
- return NULL; // and I
- }
-
- std::string _name;
- bool _pthread_exists;
- pthread_t _pthread;
-};
-
-
-#endif // THREAD_H
diff --git a/src/libs/client/ConnectionModel.cpp b/src/libs/client/ConnectionModel.cpp
index e7f66077..bb2f2424 100644
--- a/src/libs/client/ConnectionModel.cpp
+++ b/src/libs/client/ConnectionModel.cpp
@@ -33,7 +33,7 @@ ConnectionModel::ConnectionModel(const Path& src_port, const Path& dst_port)
}
-ConnectionModel::ConnectionModel(CountedPtr<PortModel> src, CountedPtr<PortModel> dst)
+ConnectionModel::ConnectionModel(SharedPtr<PortModel> src, SharedPtr<PortModel> dst)
: _src_port_path(src->path()),
_dst_port_path(dst->path()),
_src_port(src),
@@ -77,7 +77,7 @@ ConnectionModel::patch_path() const
// Direct connection from patch input to patch output (pass through)
// (parent patch is parent of ports)
if (_src_port->parent() == _dst_port->parent()) {
- CountedPtr<PatchModel> parent_patch = PtrCast<PatchModel>(_src_port->parent());
+ SharedPtr<PatchModel> parent_patch = PtrCast<PatchModel>(_src_port->parent());
if (parent_patch)
return parent_patch->path();
}
@@ -101,7 +101,7 @@ ConnectionModel::patch_path() const
return patch_path;
}
-typedef list<CountedPtr<ConnectionModel> > ConnectionList;
+typedef list<SharedPtr<ConnectionModel> > ConnectionList;
} // namespace Client
diff --git a/src/libs/client/ConnectionModel.h b/src/libs/client/ConnectionModel.h
index e1530f88..6dc85405 100644
--- a/src/libs/client/ConnectionModel.h
+++ b/src/libs/client/ConnectionModel.h
@@ -18,8 +18,8 @@
#define CONNECTIONMODEL_H
#include <string>
-#include "util/Path.h"
-#include "util/CountedPtr.h"
+#include "raul/Path.h"
+#include "raul/SharedPtr.h"
#include "PortModel.h"
#include <cassert>
using std::string;
@@ -43,8 +43,8 @@ class Store;
class ConnectionModel
{
public:
- CountedPtr<PortModel> src_port() const { return _src_port; }
- CountedPtr<PortModel> dst_port() const { return _dst_port; }
+ SharedPtr<PortModel> src_port() const { return _src_port; }
+ SharedPtr<PortModel> dst_port() const { return _dst_port; }
const Path& src_port_path() const;
const Path& dst_port_path() const;
@@ -54,21 +54,21 @@ private:
friend class Store;
ConnectionModel(const Path& src_port, const Path& dst_port);
- ConnectionModel(CountedPtr<PortModel> src, CountedPtr<PortModel> dst);
+ ConnectionModel(SharedPtr<PortModel> src, SharedPtr<PortModel> dst);
- void set_src_port(CountedPtr<PortModel> port) { _src_port = port; _src_port_path = port->path(); }
- void set_dst_port(CountedPtr<PortModel> port) { _dst_port = port; _dst_port_path = port->path(); }
+ void set_src_port(SharedPtr<PortModel> port) { _src_port = port; _src_port_path = port->path(); }
+ void set_dst_port(SharedPtr<PortModel> port) { _dst_port = port; _dst_port_path = port->path(); }
void src_port_path(const string& s) { _src_port_path = s; }
void dst_port_path(const string& s) { _dst_port_path = s; }
Path _src_port_path; ///< Only used if _src_port == NULL
Path _dst_port_path; ///< Only used if _dst_port == NULL
- CountedPtr<PortModel> _src_port;
- CountedPtr<PortModel> _dst_port;
+ SharedPtr<PortModel> _src_port;
+ SharedPtr<PortModel> _dst_port;
};
-typedef list<CountedPtr<ConnectionModel> > ConnectionList;
+typedef list<SharedPtr<ConnectionModel> > ConnectionList;
} // namespace Client
diff --git a/src/libs/client/ControlModel.h b/src/libs/client/ControlModel.h
index 08143c73..337acfc6 100644
--- a/src/libs/client/ControlModel.h
+++ b/src/libs/client/ControlModel.h
@@ -18,7 +18,7 @@
#define CONTROLMODEL_H
#include <string>
-#include "util/Path.h"
+#include "raul/Path.h"
namespace Ingen {
namespace Client {
diff --git a/src/libs/client/DeprecatedSerializer.cpp b/src/libs/client/DeprecatedSerializer.cpp
index 1526c527..d3d5a09f 100644
--- a/src/libs/client/DeprecatedSerializer.cpp
+++ b/src/libs/client/DeprecatedSerializer.cpp
@@ -26,7 +26,7 @@
#include "PresetModel.h"
#include "ModelEngineInterface.h"
#include "PluginModel.h"
-#include "util/Path.h"
+#include "raul/Path.h"
#include <iostream>
#include <fstream>
#include <vector>
@@ -335,7 +335,7 @@ DeprecatedSerializer::load_node(const Path& parent, xmlDocPtr doc, const xmlNode
assert(Path::is_valid(path));
// FIXME: /nasty/ assumptions
- CountedPtr<PortModel> pm(new PortModel(Path(path).base() + port_name,
+ SharedPtr<PortModel> pm(new PortModel(Path(path).base() + port_name,
PortModel::CONTROL, PortModel::INPUT, PortModel::NONE,
0.0, user_min, user_max));
//pm->set_parent(nm);
@@ -459,7 +459,7 @@ DeprecatedSerializer::load_node(const Path& parent, xmlDocPtr doc, const xmlNode
_engine->set_metadata_map(path, initial_data);
- return CountedPtr<NodeModel>();
+ return SharedPtr<NodeModel>();
} else {
if (plugin_label == "note_in") {
diff --git a/src/libs/client/DeprecatedSerializer.h b/src/libs/client/DeprecatedSerializer.h
index 645c03f7..5ffe8731 100644
--- a/src/libs/client/DeprecatedSerializer.h
+++ b/src/libs/client/DeprecatedSerializer.h
@@ -22,8 +22,8 @@
#include <string>
#include <libxml/tree.h>
#include <cassert>
-#include "util/CountedPtr.h"
-#include "util/Path.h"
+#include "raul/SharedPtr.h"
+#include "raul/Path.h"
#include "ObjectModel.h"
using std::string;
@@ -45,7 +45,7 @@ class ModelEngineInterface;
class DeprecatedSerializer
{
public:
- DeprecatedSerializer(CountedPtr<ModelEngineInterface> engine)
+ DeprecatedSerializer(SharedPtr<ModelEngineInterface> engine)
: _patch_search_path("."), _engine(engine)
{
assert(_engine);
@@ -67,7 +67,7 @@ private:
string translate_load_path(const string& path);
string _patch_search_path;
- CountedPtr<ModelEngineInterface> _engine;
+ SharedPtr<ModelEngineInterface> _engine;
/// Translations of paths from the loading file to actual paths (for deprecated patches)
std::map<string, string> _load_path_translations;
diff --git a/src/libs/client/Makefile.am b/src/libs/client/Makefile.am
index de9b1ca4..6c8b93dd 100644
--- a/src/libs/client/Makefile.am
+++ b/src/libs/client/Makefile.am
@@ -3,8 +3,8 @@ AM_CXXFLAGS = -I$(top_srcdir)/src/common
if BUILD_CLIENT_LIB
noinst_LTLIBRARIES = libingenclient.la
-libingenclient_la_CXXFLAGS = -I$(top_srcdir)/src/common -DPKGDATADIR=\"$(pkgdatadir)\" @LXML2_CFLAGS@ @RAPTOR_CFLAGS@ @LSIGCPP_CFLAGS@
-libingenclient_la_LIBADD = @LXML2_LIBS@ @LOSC_LIBS@ @RAPTOR_LIBS@ @LSIGCPP_LIBS@
+libingenclient_la_CXXFLAGS = -I$(top_srcdir)/src/common -DPKGDATADIR=\"$(pkgdatadir)\" @LXML2_CFLAGS@ @RAPTOR_CFLAGS@ @LSIGCPP_CFLAGS@ @RAUL_CFLAGS@
+libingenclient_la_LIBADD = @LXML2_LIBS@ @LOSC_LIBS@ @RAPTOR_LIBS@ @LSIGCPP_LIBS@ @RAUL_LIBS@
libingenclient_la_SOURCES = \
OSCEngineSender.h \
diff --git a/src/libs/client/NodeModel.cpp b/src/libs/client/NodeModel.cpp
index c5e399d2..56df1a12 100644
--- a/src/libs/client/NodeModel.cpp
+++ b/src/libs/client/NodeModel.cpp
@@ -22,7 +22,7 @@ namespace Ingen {
namespace Client {
-NodeModel::NodeModel(CountedPtr<PluginModel> plugin, const Path& path, bool polyphonic)
+NodeModel::NodeModel(SharedPtr<PluginModel> plugin, const Path& path, bool polyphonic)
: ObjectModel(path),
m_polyphonic(polyphonic),
m_plugin_uri(plugin->uri()),
@@ -45,7 +45,7 @@ NodeModel::~NodeModel()
void
-NodeModel::remove_port(CountedPtr<PortModel> port)
+NodeModel::remove_port(SharedPtr<PortModel> port)
{
m_ports.remove(port);
removed_port_sig.emit(port);
@@ -89,30 +89,30 @@ NodeModel::set_path(const Path& p)
void
-NodeModel::add_child(CountedPtr<ObjectModel> c)
+NodeModel::add_child(SharedPtr<ObjectModel> c)
{
assert(c->parent().get() == this);
- CountedPtr<PortModel> pm = PtrCast<PortModel>(c);
+ SharedPtr<PortModel> pm = PtrCast<PortModel>(c);
assert(pm);
add_port(pm);
}
void
-NodeModel::remove_child(CountedPtr<ObjectModel> c)
+NodeModel::remove_child(SharedPtr<ObjectModel> c)
{
assert(c->path().is_child_of(_path));
assert(c->parent().get() == this);
- CountedPtr<PortModel> pm = PtrCast<PortModel>(c);
+ SharedPtr<PortModel> pm = PtrCast<PortModel>(c);
assert(pm);
remove_port(pm);
}
void
-NodeModel::add_port(CountedPtr<PortModel> pm)
+NodeModel::add_port(SharedPtr<PortModel> pm)
{
assert(pm);
assert(pm->path().is_child_of(_path));
@@ -128,14 +128,14 @@ NodeModel::add_port(CountedPtr<PortModel> pm)
}
-CountedPtr<PortModel>
+SharedPtr<PortModel>
NodeModel::get_port(const string& port_name) const
{
assert(port_name.find("/") == string::npos);
for (PortModelList::const_iterator i = m_ports.begin(); i != m_ports.end(); ++i)
if ((*i)->path().name() == port_name)
return (*i);
- return CountedPtr<PortModel>();
+ return SharedPtr<PortModel>();
}
diff --git a/src/libs/client/NodeModel.h b/src/libs/client/NodeModel.h
index 71c77022..e251d8ad 100644
--- a/src/libs/client/NodeModel.h
+++ b/src/libs/client/NodeModel.h
@@ -24,8 +24,8 @@
#include <sigc++/sigc++.h>
#include "ObjectModel.h"
#include "PortModel.h"
-#include "util/Path.h"
-#include "util/CountedPtr.h"
+#include "raul/Path.h"
+#include "raul/SharedPtr.h"
#include "PluginModel.h"
using std::string; using std::map; using std::find;
@@ -47,30 +47,30 @@ class NodeModel : public ObjectModel
public:
virtual ~NodeModel();
- CountedPtr<PortModel> get_port(const string& port_name) const;
+ SharedPtr<PortModel> get_port(const string& port_name) const;
const map<int, map<int, string> >& get_programs() const { return m_banks; }
const string& plugin_uri() const { return m_plugin_uri; }
- CountedPtr<PluginModel> plugin() const { return m_plugin; }
+ SharedPtr<PluginModel> plugin() const { return m_plugin; }
int num_ports() const { return m_ports.size(); }
const PortModelList& ports() const { return m_ports; }
virtual bool polyphonic() const { return m_polyphonic; }
// Signals
- sigc::signal<void, CountedPtr<PortModel> > new_port_sig;
- sigc::signal<void, CountedPtr<PortModel> > removed_port_sig;
+ sigc::signal<void, SharedPtr<PortModel> > new_port_sig;
+ sigc::signal<void, SharedPtr<PortModel> > removed_port_sig;
protected:
friend class Store;
NodeModel(const string& plugin_uri, const Path& path, bool polyphonic);
- NodeModel(CountedPtr<PluginModel> plugin, const Path& path, bool polyphonic);
+ NodeModel(SharedPtr<PluginModel> plugin, const Path& path, bool polyphonic);
NodeModel(const Path& path);
- void add_child(CountedPtr<ObjectModel> c);
- void remove_child(CountedPtr<ObjectModel> c);
- void add_port(CountedPtr<PortModel> pm);
- void remove_port(CountedPtr<PortModel> pm);
+ void add_child(SharedPtr<ObjectModel> c);
+ void remove_child(SharedPtr<ObjectModel> c);
+ void add_port(SharedPtr<PortModel> pm);
+ void remove_port(SharedPtr<PortModel> pm);
void remove_port(const Path& port_path);
void add_program(int bank, int program, const string& name);
void remove_program(int bank, int program);
@@ -83,7 +83,7 @@ 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)
- CountedPtr<PluginModel> m_plugin; ///< The plugin this node is an instance of
+ SharedPtr<PluginModel> m_plugin; ///< The plugin this node is an instance of
map<int, map<int, string> > m_banks; ///< DSSI banks
private:
@@ -93,7 +93,7 @@ private:
};
-typedef map<string, CountedPtr<NodeModel> > NodeModelMap;
+typedef map<string, SharedPtr<NodeModel> > NodeModelMap;
} // namespace Client
diff --git a/src/libs/client/OSCClientReceiver.cpp b/src/libs/client/OSCClientReceiver.cpp
index 0ae41e75..eb320df0 100644
--- a/src/libs/client/OSCClientReceiver.cpp
+++ b/src/libs/client/OSCClientReceiver.cpp
@@ -15,7 +15,7 @@
*/
#include "OSCClientReceiver.h"
-#include "util/LibloAtom.h"
+#include "raul/AtomLiblo.h"
#include <list>
#include <cassert>
#include <cstring>
@@ -338,7 +338,7 @@ OSCClientReceiver::m_metadata_update_cb(const char* path, const char* types, lo_
const char* obj_path = &argv[0]->s;
const char* key = &argv[1]->s;
- Atom value = LibloAtom::lo_arg_to_atom(types[2], argv[2]);
+ Atom value = AtomLiblo::lo_arg_to_atom(types[2], argv[2]);
metadata_update(obj_path, key, value);
diff --git a/src/libs/client/OSCEngineSender.cpp b/src/libs/client/OSCEngineSender.cpp
index 826b53b2..6ba3dfb5 100644
--- a/src/libs/client/OSCEngineSender.cpp
+++ b/src/libs/client/OSCEngineSender.cpp
@@ -17,7 +17,7 @@
#include <iostream>
#include "OSCEngineSender.h"
#include "interface/ClientKey.h"
-#include "util/LibloAtom.h"
+#include "raul/AtomLiblo.h"
using std::cout; using std::cerr; using std::endl;
namespace Ingen {
@@ -107,7 +107,7 @@ OSCEngineSender::attach(int32_t ping_id, bool block)
* traversal. It is a parameter to remain compatible with EngineInterface.
*/
void
-OSCEngineSender::register_client(ClientKey key, CountedPtr<ClientInterface> client)
+OSCEngineSender::register_client(ClientKey key, SharedPtr<ClientInterface> client)
{
// FIXME: use parameters.. er, somehow.
assert(_engine_addr);
@@ -381,7 +381,7 @@ OSCEngineSender::set_metadata(const string& obj_path,
lo_message_add_int32(m, next_id());
lo_message_add_string(m, obj_path.c_str());
lo_message_add_string(m, predicate.c_str());
- LibloAtom::lo_message_add_atom(m, value);
+ AtomLiblo::lo_message_add_atom(m, value);
lo_send_message(_engine_addr, "/om/metadata/set", m);
}
diff --git a/src/libs/client/OSCEngineSender.h b/src/libs/client/OSCEngineSender.h
index fb133706..e46542b6 100644
--- a/src/libs/client/OSCEngineSender.h
+++ b/src/libs/client/OSCEngineSender.h
@@ -58,7 +58,7 @@ public:
/* *** EngineInterface implementation below here *** */
// Client registration
- void register_client(ClientKey key, CountedPtr<ClientInterface> client);
+ void register_client(ClientKey key, SharedPtr<ClientInterface> client);
void unregister_client(ClientKey key);
diff --git a/src/libs/client/ObjectModel.cpp b/src/libs/client/ObjectModel.cpp
index 50f8b56d..6b60c5a4 100644
--- a/src/libs/client/ObjectModel.cpp
+++ b/src/libs/client/ObjectModel.cpp
@@ -63,7 +63,7 @@ ObjectModel::add_metadata(const MetadataMap& data)
* @a model as correct. The paths of the two models MUST be equal.
*/
void
-ObjectModel::set(CountedPtr<ObjectModel> model)
+ObjectModel::set(SharedPtr<ObjectModel> model)
{
assert(_path == model->path());
diff --git a/src/libs/client/ObjectModel.h b/src/libs/client/ObjectModel.h
index bc780cba..8b6b72ba 100644
--- a/src/libs/client/ObjectModel.h
+++ b/src/libs/client/ObjectModel.h
@@ -24,9 +24,9 @@
#include <algorithm>
#include <cassert>
#include <sigc++/sigc++.h>
-#include "util/Atom.h"
-#include "util/Path.h"
-#include "util/CountedPtr.h"
+#include "raul/Atom.h"
+#include "raul/Path.h"
+#include "raul/SharedPtr.h"
using std::string; using std::map; using std::find;
using std::cout; using std::cerr; using std::endl;
@@ -56,7 +56,7 @@ public:
const MetadataMap& metadata() const { return _metadata; }
inline const Path& path() const { return _path; }
- CountedPtr<ObjectModel> parent() const { return _parent; }
+ SharedPtr<ObjectModel> parent() const { return _parent; }
// Signals
sigc::signal<void, const string&, const Atom&> metadata_update_sig;
@@ -68,20 +68,20 @@ protected:
ObjectModel(const Path& path);
virtual void set_path(const Path& p) { _path = p; }
- virtual void set_parent(CountedPtr<ObjectModel> p) { assert(p); _parent = p; }
- virtual void add_child(CountedPtr<ObjectModel> c) = 0;
- virtual void remove_child(CountedPtr<ObjectModel> c) = 0;
+ virtual void set_parent(SharedPtr<ObjectModel> p) { assert(p); _parent = p; }
+ virtual void add_child(SharedPtr<ObjectModel> c) = 0;
+ virtual void remove_child(SharedPtr<ObjectModel> c) = 0;
void add_metadata(const MetadataMap& data);
- void set(CountedPtr<ObjectModel> model);
+ void set(SharedPtr<ObjectModel> model);
void set_metadata(const string& key, const Atom& value)
{ _metadata[key] = value; metadata_update_sig.emit(key, value); }
Path _path;
- CountedPtr<ObjectModel> _parent;
+ SharedPtr<ObjectModel> _parent;
MetadataMap _metadata;
diff --git a/src/libs/client/PatchModel.cpp b/src/libs/client/PatchModel.cpp
index 1d2078c2..22d39d42 100644
--- a/src/libs/client/PatchModel.cpp
+++ b/src/libs/client/PatchModel.cpp
@@ -41,7 +41,7 @@ PatchModel::set_path(const Path& new_path)
#ifdef DEBUG
// Be sure connection paths are updated and sane
- for (list<CountedPtr<ConnectionModel> >::iterator j = m_connections.begin();
+ for (list<SharedPtr<ConnectionModel> >::iterator j = m_connections.begin();
j != m_connections.end(); ++j) {
assert((*j)->src_port_path().parent().parent() == new_path);
assert((*j)->src_port_path().parent().parent() == new_path);
@@ -51,17 +51,17 @@ PatchModel::set_path(const Path& new_path)
void
-PatchModel::add_child(CountedPtr<ObjectModel> c)
+PatchModel::add_child(SharedPtr<ObjectModel> c)
{
assert(c->parent().get() == this);
- CountedPtr<PortModel> pm = PtrCast<PortModel>(c);
+ SharedPtr<PortModel> pm = PtrCast<PortModel>(c);
if (pm) {
add_port(pm);
return;
}
- CountedPtr<NodeModel> nm = PtrCast<NodeModel>(c);
+ SharedPtr<NodeModel> nm = PtrCast<NodeModel>(c);
if (nm) {
add_node(nm);
return;
@@ -70,18 +70,18 @@ PatchModel::add_child(CountedPtr<ObjectModel> c)
void
-PatchModel::remove_child(CountedPtr<ObjectModel> c)
+PatchModel::remove_child(SharedPtr<ObjectModel> c)
{
assert(c->path().is_child_of(_path));
assert(c->parent().get() == this);
- CountedPtr<PortModel> pm = PtrCast<PortModel>(c);
+ SharedPtr<PortModel> pm = PtrCast<PortModel>(c);
if (pm) {
remove_port(pm);
return;
}
- CountedPtr<NodeModel> nm = PtrCast<NodeModel>(c);
+ SharedPtr<NodeModel> nm = PtrCast<NodeModel>(c);
if (nm) {
remove_node(nm);
return;
@@ -89,17 +89,17 @@ PatchModel::remove_child(CountedPtr<ObjectModel> c)
}
-CountedPtr<NodeModel>
+SharedPtr<NodeModel>
PatchModel::get_node(const string& name) const
{
assert(name.find("/") == string::npos);
NodeModelMap::const_iterator i = m_nodes.find(name);
- return ((i != m_nodes.end()) ? (*i).second : CountedPtr<NodeModel>());
+ return ((i != m_nodes.end()) ? (*i).second : SharedPtr<NodeModel>());
}
void
-PatchModel::add_node(CountedPtr<NodeModel> nm)
+PatchModel::add_node(SharedPtr<NodeModel> nm)
{
assert(nm);
assert(nm->path().is_child_of(_path));
@@ -116,7 +116,7 @@ PatchModel::add_node(CountedPtr<NodeModel> nm)
void
-PatchModel::remove_node(CountedPtr<NodeModel> nm)
+PatchModel::remove_node(SharedPtr<NodeModel> nm)
{
assert(nm->path().is_child_of(_path));
assert(nm->parent().get() == this);
@@ -155,7 +155,7 @@ PatchModel::remove_node(const string& name)
void
PatchModel::clear()
{
- //for (list<CountedPtr<ConnectionModel> >::iterator j = m_connections.begin(); j != m_connections.end(); ++j)
+ //for (list<SharedPtr<ConnectionModel> >::iterator j = m_connections.begin(); j != m_connections.end(); ++j)
// delete (*j);
for (NodeModelMap::iterator i = m_nodes.begin(); i != m_nodes.end(); ++i) {
@@ -190,8 +190,8 @@ PatchModel::rename_node(const Path& old_path, const Path& new_path)
NodeModelMap::iterator i = m_nodes.find(old_path.name());
if (i != m_nodes.end()) {
- CountedPtr<NodeModel> nm = (*i).second;
- for (list<CountedPtr<ConnectionModel> >::iterator j = m_connections.begin(); j != m_connections.end(); ++j) {
+ SharedPtr<NodeModel> nm = (*i).second;
+ for (list<SharedPtr<ConnectionModel> >::iterator j = m_connections.begin(); j != m_connections.end(); ++j) {
if ((*j)->src_port_path().parent() == old_path)
(*j)->src_port_path(new_path.base() + (*j)->src_port_path().name());
if ((*j)->dst_port_path().parent() == old_path)
@@ -208,13 +208,13 @@ PatchModel::rename_node(const Path& old_path, const Path& new_path)
}
-CountedPtr<ConnectionModel>
+SharedPtr<ConnectionModel>
PatchModel::get_connection(const string& src_port_path, const string& dst_port_path) const
{
- for (list<CountedPtr<ConnectionModel> >::const_iterator i = m_connections.begin(); i != m_connections.end(); ++i)
+ for (list<SharedPtr<ConnectionModel> >::const_iterator i = m_connections.begin(); i != m_connections.end(); ++i)
if ((*i)->src_port_path() == src_port_path && (*i)->dst_port_path() == dst_port_path)
return (*i);
- return CountedPtr<ConnectionModel>();
+ return SharedPtr<ConnectionModel>();
}
@@ -226,7 +226,7 @@ PatchModel::get_connection(const string& src_port_path, const string& dst_port_p
* this patch is a fatal error.
*/
void
-PatchModel::add_connection(CountedPtr<ConnectionModel> cm)
+PatchModel::add_connection(SharedPtr<ConnectionModel> cm)
{
// Store should have 'resolved' the connection already
assert(cm);
@@ -240,7 +240,7 @@ PatchModel::add_connection(CountedPtr<ConnectionModel> cm)
assert(cm->dst_port()->parent().get() == this
|| cm->dst_port()->parent()->parent().get() == this);
- CountedPtr<ConnectionModel> existing = get_connection(cm->src_port_path(), cm->dst_port_path());
+ SharedPtr<ConnectionModel> existing = get_connection(cm->src_port_path(), cm->dst_port_path());
if (existing) {
assert(cm->src_port() == existing->src_port());
@@ -256,8 +256,8 @@ void
PatchModel::remove_connection(const string& src_port_path, const string& dst_port_path)
{
cerr << path() << " PatchModel::remove_connection: " << src_port_path << " -> " << dst_port_path << endl;
- for (list<CountedPtr<ConnectionModel> >::iterator i = m_connections.begin(); i != m_connections.end(); ++i) {
- CountedPtr<ConnectionModel> cm = (*i);
+ for (list<SharedPtr<ConnectionModel> >::iterator i = m_connections.begin(); i != m_connections.end(); ++i) {
+ SharedPtr<ConnectionModel> cm = (*i);
if (cm->src_port_path() == src_port_path && cm->dst_port_path() == dst_port_path) {
m_connections.erase(i); // cuts our reference
assert(!get_connection(src_port_path, dst_port_path)); // no duplicates
diff --git a/src/libs/client/PatchModel.h b/src/libs/client/PatchModel.h
index a7679b15..7dbad00b 100644
--- a/src/libs/client/PatchModel.h
+++ b/src/libs/client/PatchModel.h
@@ -23,7 +23,7 @@
#include <map>
#include <sigc++/sigc++.h>
#include "NodeModel.h"
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "ConnectionModel.h"
using std::list; using std::string; using std::map;
@@ -44,8 +44,8 @@ public:
const NodeModelMap& nodes() const { return m_nodes; }
const ConnectionList& connections() const { return m_connections; }
- CountedPtr<ConnectionModel> get_connection(const string& src_port_path, const string& dst_port_path) const;
- CountedPtr<NodeModel> get_node(const string& node_name) const;
+ SharedPtr<ConnectionModel> get_connection(const string& src_port_path, const string& dst_port_path) const;
+ SharedPtr<NodeModel> get_node(const string& node_name) const;
size_t poly() const { return m_poly; }
const string& filename() const { return m_filename; }
@@ -53,9 +53,9 @@ public:
bool polyphonic() const;
// Signals
- sigc::signal<void, CountedPtr<NodeModel> > new_node_sig;
- sigc::signal<void, CountedPtr<NodeModel> > removed_node_sig;
- sigc::signal<void, CountedPtr<ConnectionModel> > new_connection_sig;
+ sigc::signal<void, SharedPtr<NodeModel> > new_node_sig;
+ sigc::signal<void, SharedPtr<NodeModel> > removed_node_sig;
+ sigc::signal<void, SharedPtr<ConnectionModel> > new_connection_sig;
sigc::signal<void, const Path&, const Path& > removed_connection_sig;
sigc::signal<void> enabled_sig;
sigc::signal<void> disabled_sig;
@@ -76,12 +76,12 @@ private:
void disable();
void clear();
void set_path(const Path& path);
- void add_node(CountedPtr<NodeModel> nm);
- void remove_node(CountedPtr<NodeModel> nm);
- void add_child(CountedPtr<ObjectModel> c);
- void remove_child(CountedPtr<ObjectModel> c);
+ void add_node(SharedPtr<NodeModel> nm);
+ void remove_node(SharedPtr<NodeModel> nm);
+ void add_child(SharedPtr<ObjectModel> c);
+ void remove_child(SharedPtr<ObjectModel> c);
- void add_connection(CountedPtr<ConnectionModel> cm);
+ void add_connection(SharedPtr<ConnectionModel> cm);
void remove_connection(const string& src_port_path, const string& dst_port_path);
void rename_node(const Path& old_path, const Path& new_path);
@@ -98,7 +98,7 @@ private:
size_t m_poly;
};
-typedef map<string, CountedPtr<PatchModel> > PatchModelMap;
+typedef map<string, SharedPtr<PatchModel> > PatchModelMap;
} // namespace Client
diff --git a/src/libs/client/PluginModel.h b/src/libs/client/PluginModel.h
index 42548f64..e4b4233d 100644
--- a/src/libs/client/PluginModel.h
+++ b/src/libs/client/PluginModel.h
@@ -19,7 +19,7 @@
#include <string>
#include <iostream>
-#include "util/Path.h"
+#include "raul/Path.h"
using std::string; using std::cerr; using std::endl;
namespace Ingen {
diff --git a/src/libs/client/PortModel.h b/src/libs/client/PortModel.h
index c4b08ce8..b9254b84 100644
--- a/src/libs/client/PortModel.h
+++ b/src/libs/client/PortModel.h
@@ -22,8 +22,8 @@
#include <list>
#include <sigc++/sigc++.h>
#include "ObjectModel.h"
-#include "util/CountedPtr.h"
-#include "util/Path.h"
+#include "raul/SharedPtr.h"
+#include "raul/Path.h"
using std::string; using std::list;
namespace Ingen {
@@ -58,8 +58,8 @@ public:
// Signals
sigc::signal<void, float> control_change_sig; ///< "Control" ports only
- sigc::signal<void, CountedPtr<PortModel> > connection_sig;
- sigc::signal<void, CountedPtr<PortModel> > disconnection_sig;
+ sigc::signal<void, SharedPtr<PortModel> > connection_sig;
+ sigc::signal<void, SharedPtr<PortModel> > disconnection_sig;
private:
friend class Store;
@@ -86,15 +86,15 @@ private:
inline void value(float f) { m_current_val = f; control_change_sig.emit(f); }
- void add_child(CountedPtr<ObjectModel> c) { throw; }
- void remove_child(CountedPtr<ObjectModel> c) { throw; }
+ void add_child(SharedPtr<ObjectModel> c) { throw; }
+ void remove_child(SharedPtr<ObjectModel> c) { throw; }
// Prevent copies (undefined)
PortModel(const PortModel& copy);
PortModel& operator=(const PortModel& copy);
- void connected_to(CountedPtr<PortModel> p) { ++m_connections; connection_sig.emit(p); }
- void disconnected_from(CountedPtr<PortModel> p) { --m_connections; disconnection_sig.emit(p); }
+ void connected_to(SharedPtr<PortModel> p) { ++m_connections; connection_sig.emit(p); }
+ void disconnected_from(SharedPtr<PortModel> p) { --m_connections; disconnection_sig.emit(p); }
Type m_type;
@@ -104,7 +104,7 @@ private:
size_t m_connections;
};
-typedef list<CountedPtr<PortModel> > PortModelList;
+typedef list<SharedPtr<PortModel> > PortModelList;
} // namespace Client
diff --git a/src/libs/client/Serializer.cpp b/src/libs/client/Serializer.cpp
index 6bfa08d6..bfcb0de6 100644
--- a/src/libs/client/Serializer.cpp
+++ b/src/libs/client/Serializer.cpp
@@ -34,9 +34,9 @@
#include "PresetModel.h"
#include "ModelEngineInterface.h"
#include "PluginModel.h"
-#include "util/Path.h"
-#include "util/Atom.h"
-#include "util/RedlandAtom.h"
+#include "raul/Path.h"
+#include "raul/Atom.h"
+#include "raul/AtomRaptor.h"
#define U(x) ((const unsigned char*)(x))
@@ -47,7 +47,7 @@ namespace Ingen {
namespace Client {
-Serializer::Serializer(CountedPtr<ModelEngineInterface> engine)
+Serializer::Serializer(SharedPtr<ModelEngineInterface> engine)
: _serializer(NULL)
, _string_output(NULL)
, _patch_search_path(".")
@@ -70,7 +70,7 @@ Serializer::~Serializer()
* This must be called before any serializing methods.
*/
void
-Serializer::start_to_filename(const string& filename) throw(std::logic_error)
+Serializer::start_to_filename(const string& filename) throw (std::logic_error)
{
if (_serializer)
throw std::logic_error("start_to_string called with serialization in progress");
@@ -90,7 +90,7 @@ Serializer::start_to_filename(const string& filename) throw(std::logic_error)
* the desired objects have been serialized.
*/
void
-Serializer::start_to_string() throw(std::logic_error)
+Serializer::start_to_string() throw (std::logic_error)
{
if (_serializer)
throw std::logic_error("start_to_string called with serialization in progress");
@@ -282,31 +282,31 @@ Serializer::serialize_atom(
triple.predicate = (void*)raptor_new_uri((const unsigned char*)predicate_uri.c_str());
triple.predicate_type = RAPTOR_IDENTIFIER_TYPE_RESOURCE;
- RedlandAtom::atom_to_triple_object(&triple, atom);
+ AtomRaptor::atom_to_triple_object(&triple, atom);
raptor_serialize_statement(_serializer, &triple);
}
void
-Serializer::serialize(CountedPtr<ObjectModel> object) throw (std::logic_error)
+Serializer::serialize(SharedPtr<ObjectModel> object) throw (std::logic_error)
{
if (!_serializer)
throw std::logic_error("serialize_patch called without serialization in progress");
- CountedPtr<PatchModel> patch = PtrCast<PatchModel>(object);
+ SharedPtr<PatchModel> patch = PtrCast<PatchModel>(object);
if (patch) {
serialize_patch(patch);
return;
}
- CountedPtr<NodeModel> node = PtrCast<NodeModel>(object);
+ SharedPtr<NodeModel> node = PtrCast<NodeModel>(object);
if (node) {
serialize_node(node);
return;
}
- CountedPtr<PortModel> port = PtrCast<PortModel>(object);
+ SharedPtr<PortModel> port = PtrCast<PortModel>(object);
if (port) {
serialize_port(port);
return;
@@ -318,7 +318,7 @@ Serializer::serialize(CountedPtr<ObjectModel> object) throw (std::logic_error)
void
-Serializer::serialize_patch(CountedPtr<PatchModel> patch)
+Serializer::serialize_patch(SharedPtr<PatchModel> patch)
{
assert(_serializer);
@@ -361,7 +361,7 @@ Serializer::serialize_patch(CountedPtr<PatchModel> patch)
void
Serializer::serialize_node(
- CountedPtr<NodeModel> node, const string ns_prefix)
+ SharedPtr<NodeModel> node, const string ns_prefix)
{
assert(_serializer);
@@ -394,7 +394,7 @@ Serializer::serialize_node(
void
-Serializer::serialize_port(CountedPtr<PortModel> port, const string ns_prefix)
+Serializer::serialize_port(SharedPtr<PortModel> port, const string ns_prefix)
{
assert(_serializer);
@@ -417,7 +417,7 @@ Serializer::serialize_port(CountedPtr<PortModel> port, const string ns_prefix)
void
-Serializer::serialize_connection(CountedPtr<ConnectionModel> connection) throw (std::logic_error)
+Serializer::serialize_connection(SharedPtr<ConnectionModel> connection) throw (std::logic_error)
{
assert(_serializer);
diff --git a/src/libs/client/Serializer.h b/src/libs/client/Serializer.h
index 1af18de7..15c49101 100644
--- a/src/libs/client/Serializer.h
+++ b/src/libs/client/Serializer.h
@@ -23,9 +23,9 @@
#include <stdexcept>
#include <raptor.h>
#include <cassert>
-#include "util/CountedPtr.h"
-#include "util/Path.h"
-#include "util/Atom.h"
+#include "raul/SharedPtr.h"
+#include "raul/Path.h"
+#include "raul/Atom.h"
#include "ObjectModel.h"
using std::string;
@@ -53,7 +53,7 @@ class ModelEngineInterface;
class Serializer
{
public:
- Serializer(CountedPtr<ModelEngineInterface> engine);
+ Serializer(SharedPtr<ModelEngineInterface> engine);
~Serializer();
void path(const string& path) { _patch_search_path = path; }
@@ -70,19 +70,19 @@ public:
void start_to_filename(const string& filename) throw (std::logic_error);
void start_to_string() throw (std::logic_error);
- void serialize(CountedPtr<ObjectModel> object) throw (std::logic_error);
- void serialize_connection(CountedPtr<ConnectionModel> c) throw (std::logic_error);
+ void serialize(SharedPtr<ObjectModel> object) throw (std::logic_error);
+ void serialize_connection(SharedPtr<ConnectionModel> c) throw (std::logic_error);
string finish() throw (std::logic_error);
private:
// Model -> RDF
- void serialize_patch(CountedPtr<PatchModel> p);
+ void serialize_patch(SharedPtr<PatchModel> p);
- void serialize_node(CountedPtr<NodeModel> n, const string ns_prefix="");
+ void serialize_node(SharedPtr<NodeModel> n, const string ns_prefix="");
- void serialize_port(CountedPtr<PortModel> p, const string ns_prefix="");
+ void serialize_port(SharedPtr<PortModel> p, const string ns_prefix="");
@@ -110,7 +110,7 @@ private:
unsigned char* _string_output;
string _patch_search_path;
map<string, string> _prefixes;
- CountedPtr<ModelEngineInterface> _engine;
+ SharedPtr<ModelEngineInterface> _engine;
};
diff --git a/src/libs/client/Store.cpp b/src/libs/client/Store.cpp
index fb16697b..30942ae3 100644
--- a/src/libs/client/Store.cpp
+++ b/src/libs/client/Store.cpp
@@ -28,7 +28,7 @@ namespace Client {
-Store::Store(CountedPtr<EngineInterface> engine, CountedPtr<SigClientInterface> emitter)
+Store::Store(SharedPtr<EngineInterface> engine, SharedPtr<SigClientInterface> emitter)
: _engine(engine)
, _emitter(emitter)
{
@@ -57,12 +57,12 @@ Store::clear()
void
-Store::add_plugin_orphan(CountedPtr<NodeModel> node)
+Store::add_plugin_orphan(SharedPtr<NodeModel> node)
{
cerr << "WARNING: Node " << node->path() << " received, but plugin "
<< node->plugin_uri() << " unknown." << endl;
- map<string, list<CountedPtr<NodeModel> > >::iterator spawn
+ map<string, list<SharedPtr<NodeModel> > >::iterator spawn
= _plugin_orphans.find(node->plugin_uri());
_engine->request_plugin(node->plugin_uri());
@@ -70,7 +70,7 @@ Store::add_plugin_orphan(CountedPtr<NodeModel> node)
if (spawn != _plugin_orphans.end()) {
spawn->second.push_back(node);
} else {
- list<CountedPtr<NodeModel> > l;
+ list<SharedPtr<NodeModel> > l;
l.push_back(node);
_plugin_orphans[node->plugin_uri()] = l;
}
@@ -78,18 +78,18 @@ Store::add_plugin_orphan(CountedPtr<NodeModel> node)
void
-Store::resolve_plugin_orphans(CountedPtr<PluginModel> plugin)
+Store::resolve_plugin_orphans(SharedPtr<PluginModel> plugin)
{
- map<string, list<CountedPtr<NodeModel> > >::iterator n
+ map<string, list<SharedPtr<NodeModel> > >::iterator n
= _plugin_orphans.find(plugin->uri());
if (n != _plugin_orphans.end()) {
- list<CountedPtr<NodeModel> > spawn = n->second; // take a copy
+ list<SharedPtr<NodeModel> > spawn = n->second; // take a copy
_plugin_orphans.erase(plugin->uri()); // prevent infinite recursion
- for (list<CountedPtr<NodeModel> >::iterator i = spawn.begin();
+ for (list<SharedPtr<NodeModel> >::iterator i = spawn.begin();
i != spawn.end(); ++i) {
add_object(*i);
}
@@ -98,7 +98,7 @@ Store::resolve_plugin_orphans(CountedPtr<PluginModel> plugin)
void
-Store::add_connection_orphan(CountedPtr<ConnectionModel> connection)
+Store::add_connection_orphan(SharedPtr<ConnectionModel> connection)
{
cerr << "WARNING: Orphan connection " << connection->src_port_path()
<< " -> " << connection->dst_port_path() << " received." << endl;
@@ -108,11 +108,11 @@ Store::add_connection_orphan(CountedPtr<ConnectionModel> connection)
void
-Store::resolve_connection_orphans(CountedPtr<PortModel> port)
+Store::resolve_connection_orphans(SharedPtr<PortModel> port)
{
assert(port->parent());
- for (list<CountedPtr<ConnectionModel> >::iterator c = _connection_orphans.begin();
+ for (list<SharedPtr<ConnectionModel> >::iterator c = _connection_orphans.begin();
c != _connection_orphans.end(); ) {
if ((*c)->src_port_path() == port->path())
@@ -121,11 +121,11 @@ Store::resolve_connection_orphans(CountedPtr<PortModel> port)
if ((*c)->dst_port_path() == port->path())
(*c)->set_dst_port(port);
- list<CountedPtr<ConnectionModel> >::iterator next = c;
+ list<SharedPtr<ConnectionModel> >::iterator next = c;
++next;
if ((*c)->src_port() && (*c)->dst_port()) {
- CountedPtr<PatchModel> patch = PtrCast<PatchModel>(this->object((*c)->patch_path()));
+ SharedPtr<PatchModel> patch = PtrCast<PatchModel>(this->object((*c)->patch_path()));
if (patch) {
cerr << "Resolved orphan connection " << (*c)->src_port_path() <<
(*c)->dst_port_path() << endl;
@@ -140,11 +140,11 @@ Store::resolve_connection_orphans(CountedPtr<PortModel> port)
void
-Store::add_orphan(CountedPtr<ObjectModel> child)
+Store::add_orphan(SharedPtr<ObjectModel> child)
{
cerr << "WARNING: Orphan object " << child->path() << " received." << endl;
- map<Path, list<CountedPtr<ObjectModel> > >::iterator children
+ map<Path, list<SharedPtr<ObjectModel> > >::iterator children
= _orphans.find(child->path().parent());
_engine->request_object(child->path().parent());
@@ -152,7 +152,7 @@ Store::add_orphan(CountedPtr<ObjectModel> child)
if (children != _orphans.end()) {
children->second.push_back(child);
} else {
- list<CountedPtr<ObjectModel> > l;
+ list<SharedPtr<ObjectModel> > l;
l.push_back(child);
_orphans[child->path().parent()] = l;
}
@@ -178,7 +178,7 @@ Store::add_metadata_orphan(const Path& subject_path, const string& predicate, co
void
-Store::resolve_metadata_orphans(CountedPtr<ObjectModel> subject)
+Store::resolve_metadata_orphans(SharedPtr<ObjectModel> subject)
{
map<Path, list<std::pair<string, Atom> > >::iterator v
= _metadata_orphans.find(subject->path());
@@ -198,18 +198,18 @@ Store::resolve_metadata_orphans(CountedPtr<ObjectModel> subject)
void
-Store::resolve_orphans(CountedPtr<ObjectModel> parent)
+Store::resolve_orphans(SharedPtr<ObjectModel> parent)
{
- map<Path, list<CountedPtr<ObjectModel> > >::iterator c
+ map<Path, list<SharedPtr<ObjectModel> > >::iterator c
= _orphans.find(parent->path());
if (c != _orphans.end()) {
- list<CountedPtr<ObjectModel> > children = c->second; // take a copy
+ list<SharedPtr<ObjectModel> > children = c->second; // take a copy
_orphans.erase(parent->path()); // prevent infinite recursion
- for (list<CountedPtr<ObjectModel> >::iterator i = children.begin();
+ for (list<SharedPtr<ObjectModel> >::iterator i = children.begin();
i != children.end(); ++i) {
add_object(*i);
}
@@ -218,7 +218,7 @@ Store::resolve_orphans(CountedPtr<ObjectModel> parent)
void
-Store::add_object(CountedPtr<ObjectModel> object)
+Store::add_object(SharedPtr<ObjectModel> object)
{
// If we already have "this" object, merge the existing one into the new
// one (with precedence to the new values).
@@ -228,7 +228,7 @@ Store::add_object(CountedPtr<ObjectModel> object)
} else {
if (object->path() != "/") {
- CountedPtr<ObjectModel> parent = this->object(object->path().parent());
+ SharedPtr<ObjectModel> parent = this->object(object->path().parent());
if (parent) {
assert(object->path().is_child_of(parent->path()));
object->set_parent(parent);
@@ -241,7 +241,7 @@ Store::add_object(CountedPtr<ObjectModel> object)
resolve_metadata_orphans(parent);
resolve_orphans(parent);
- CountedPtr<PortModel> port = PtrCast<PortModel>(object);
+ SharedPtr<PortModel> port = PtrCast<PortModel>(object);
if (port)
resolve_connection_orphans(port);
@@ -259,14 +259,14 @@ Store::add_object(CountedPtr<ObjectModel> object)
}
-CountedPtr<ObjectModel>
+SharedPtr<ObjectModel>
Store::remove_object(const Path& path)
{
- map<Path, CountedPtr<ObjectModel> >::iterator i = _objects.find(path);
+ map<Path, SharedPtr<ObjectModel> >::iterator i = _objects.find(path);
if (i != _objects.end()) {
assert((*i).second->path() == path);
- CountedPtr<ObjectModel> result = (*i).second;
+ SharedPtr<ObjectModel> result = (*i).second;
_objects.erase(i);
//cout << "[Store] Removed " << path << endl;
@@ -276,7 +276,7 @@ Store::remove_object(const Path& path)
if (result->path() != "/") {
assert(result->parent());
- CountedPtr<ObjectModel> parent = this->object(result->path().parent());
+ SharedPtr<ObjectModel> parent = this->object(result->path().parent());
if (parent) {
parent->remove_child(result);
}
@@ -288,30 +288,30 @@ Store::remove_object(const Path& path)
} else {
cerr << "[Store] Unable to find object " << path << " to remove." << endl;
- return CountedPtr<ObjectModel>();
+ return SharedPtr<ObjectModel>();
}
}
-CountedPtr<PluginModel>
+SharedPtr<PluginModel>
Store::plugin(const string& uri)
{
assert(uri.length() > 0);
- map<string, CountedPtr<PluginModel> >::iterator i = _plugins.find(uri);
+ map<string, SharedPtr<PluginModel> >::iterator i = _plugins.find(uri);
if (i == _plugins.end())
- return CountedPtr<PluginModel>();
+ return SharedPtr<PluginModel>();
else
return (*i).second;
}
-CountedPtr<ObjectModel>
+SharedPtr<ObjectModel>
Store::object(const Path& path)
{
assert(path.length() > 0);
- map<Path, CountedPtr<ObjectModel> >::iterator i = _objects.find(path);
+ map<Path, SharedPtr<ObjectModel> >::iterator i = _objects.find(path);
if (i == _objects.end()) {
- return CountedPtr<ObjectModel>();
+ return SharedPtr<ObjectModel>();
} else {
assert(i->second->path() == "/" || i->second->parent());
return i->second;
@@ -319,7 +319,7 @@ Store::object(const Path& path)
}
void
-Store::add_plugin(CountedPtr<PluginModel> pm)
+Store::add_plugin(SharedPtr<PluginModel> pm)
{
// FIXME: dupes? merge, like with objects?
@@ -334,7 +334,7 @@ Store::add_plugin(CountedPtr<PluginModel> pm)
void
Store::destruction_event(const Path& path)
{
- CountedPtr<ObjectModel> removed = remove_object(path);
+ SharedPtr<ObjectModel> removed = remove_object(path);
removed.reset();
@@ -345,7 +345,7 @@ Store::destruction_event(const Path& path)
void
Store::new_plugin_event(const string& uri, const string& name)
{
- CountedPtr<PluginModel> p(new PluginModel(uri, name));
+ SharedPtr<PluginModel> p(new PluginModel(uri, name));
add_plugin(p);
resolve_plugin_orphans(p);
}
@@ -354,7 +354,7 @@ Store::new_plugin_event(const string& uri, const string& name)
void
Store::new_patch_event(const Path& path, uint32_t poly)
{
- CountedPtr<PatchModel> p(new PatchModel(path, poly));
+ SharedPtr<PatchModel> p(new PatchModel(path, poly));
add_object(p);
}
@@ -364,12 +364,12 @@ Store::new_node_event(const string& plugin_uri, const Path& node_path, bool is_p
{
// FIXME: num_ports unused
- CountedPtr<PluginModel> plug = plugin(plugin_uri);
+ SharedPtr<PluginModel> plug = plugin(plugin_uri);
if (!plug) {
- CountedPtr<NodeModel> n(new NodeModel(plugin_uri, node_path, is_polyphonic));
+ SharedPtr<NodeModel> n(new NodeModel(plugin_uri, node_path, is_polyphonic));
add_plugin_orphan(n);
} else {
- CountedPtr<NodeModel> n(new NodeModel(plug, node_path, is_polyphonic));
+ SharedPtr<NodeModel> n(new NodeModel(plug, node_path, is_polyphonic));
add_object(n);
}
}
@@ -388,7 +388,7 @@ Store::new_port_event(const Path& path, const string& type, bool is_output)
PortModel::Direction pdir = is_output ? PortModel::OUTPUT : PortModel::INPUT;
- CountedPtr<PortModel> p(new PortModel(path, ptype, pdir));
+ SharedPtr<PortModel> p(new PortModel(path, ptype, pdir));
add_object(p);
if (p->parent())
resolve_connection_orphans(p);
@@ -398,7 +398,7 @@ Store::new_port_event(const Path& path, const string& type, bool is_output)
void
Store::patch_enabled_event(const Path& path)
{
- CountedPtr<PatchModel> patch = PtrCast<PatchModel>(object(path));
+ SharedPtr<PatchModel> patch = PtrCast<PatchModel>(object(path));
if (patch)
patch->enable();
}
@@ -407,7 +407,7 @@ Store::patch_enabled_event(const Path& path)
void
Store::patch_disabled_event(const Path& path)
{
- CountedPtr<PatchModel> patch = PtrCast<PatchModel>(object(path));
+ SharedPtr<PatchModel> patch = PtrCast<PatchModel>(object(path));
if (patch)
patch->disable();
}
@@ -416,7 +416,7 @@ Store::patch_disabled_event(const Path& path)
void
Store::patch_cleared_event(const Path& path)
{
- CountedPtr<PatchModel> patch = PtrCast<PatchModel>(object(path));
+ SharedPtr<PatchModel> patch = PtrCast<PatchModel>(object(path));
if (patch) {
NodeModelMap children = patch->nodes(); // take a copy
for (NodeModelMap::iterator i = children.begin(); i != children.end(); ++i) {
@@ -429,7 +429,7 @@ Store::patch_cleared_event(const Path& path)
void
Store::metadata_update_event(const Path& subject_path, const string& predicate, const Atom& value)
{
- CountedPtr<ObjectModel> subject = object(subject_path);
+ SharedPtr<ObjectModel> subject = object(subject_path);
if (subject) {
subject->set_metadata(predicate, value);
@@ -443,7 +443,7 @@ Store::metadata_update_event(const Path& subject_path, const string& predicate,
void
Store::control_change_event(const Path& port_path, float value)
{
- CountedPtr<PortModel> port = PtrCast<PortModel>(object(port_path));
+ SharedPtr<PortModel> port = PtrCast<PortModel>(object(port_path));
if (port)
port->value(value);
else
@@ -454,20 +454,20 @@ Store::control_change_event(const Path& port_path, float value)
void
Store::connection_event(const Path& src_port_path, const Path& dst_port_path)
{
- CountedPtr<PortModel> src_port = PtrCast<PortModel>(object(src_port_path));
- CountedPtr<PortModel> dst_port = PtrCast<PortModel>(object(dst_port_path));
+ SharedPtr<PortModel> src_port = PtrCast<PortModel>(object(src_port_path));
+ SharedPtr<PortModel> dst_port = PtrCast<PortModel>(object(dst_port_path));
- CountedPtr<ConnectionModel> dangling_cm(new ConnectionModel(src_port_path, dst_port_path));
+ SharedPtr<ConnectionModel> dangling_cm(new ConnectionModel(src_port_path, dst_port_path));
if (src_port && dst_port) {
assert(src_port->parent());
assert(dst_port->parent());
- CountedPtr<PatchModel> patch = PtrCast<PatchModel>(this->object(dangling_cm->patch_path()));
+ SharedPtr<PatchModel> patch = PtrCast<PatchModel>(this->object(dangling_cm->patch_path()));
assert(patch);
- CountedPtr<ConnectionModel> cm(new ConnectionModel(src_port, dst_port));
+ SharedPtr<ConnectionModel> cm(new ConnectionModel(src_port, dst_port));
src_port->connected_to(dst_port);
dst_port->connected_to(src_port);
@@ -488,8 +488,8 @@ Store::disconnection_event(const Path& src_port_path, const Path& dst_port_path)
// Find the ports and create a ConnectionModel just to get at the parent path
// finding logic in ConnectionModel. So I'm lazy.
- CountedPtr<PortModel> src_port = PtrCast<PortModel>(object(src_port_path));
- CountedPtr<PortModel> dst_port = PtrCast<PortModel>(object(dst_port_path));
+ SharedPtr<PortModel> src_port = PtrCast<PortModel>(object(src_port_path));
+ SharedPtr<PortModel> dst_port = PtrCast<PortModel>(object(dst_port_path));
assert(src_port);
assert(dst_port);
@@ -497,9 +497,9 @@ Store::disconnection_event(const Path& src_port_path, const Path& dst_port_path)
src_port->disconnected_from(dst_port);
dst_port->disconnected_from(src_port);
- CountedPtr<ConnectionModel> cm(new ConnectionModel(src_port, dst_port));
+ SharedPtr<ConnectionModel> cm(new ConnectionModel(src_port, dst_port));
- CountedPtr<PatchModel> patch = PtrCast<PatchModel>(this->object(cm->patch_path()));
+ SharedPtr<PatchModel> patch = PtrCast<PatchModel>(this->object(cm->patch_path()));
if (patch)
patch->remove_connection(src_port_path, dst_port_path);
diff --git a/src/libs/client/Store.h b/src/libs/client/Store.h
index 6a8700f9..d1599423 100644
--- a/src/libs/client/Store.h
+++ b/src/libs/client/Store.h
@@ -21,10 +21,10 @@
#include <string>
#include <map>
#include <list>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include <sigc++/sigc++.h>
-#include "util/Path.h"
-#include "util/Atom.h"
+#include "raul/Path.h"
+#include "raul/Atom.h"
#include "interface/EngineInterface.h"
using std::string; using std::map; using std::list;
using Ingen::Shared::EngineInterface;
@@ -47,39 +47,39 @@ class ConnectionModel;
*/
class Store : public sigc::trackable { // FIXME: is trackable necessary?
public:
- Store(CountedPtr<EngineInterface> engine, CountedPtr<SigClientInterface> emitter);
+ Store(SharedPtr<EngineInterface> engine, SharedPtr<SigClientInterface> emitter);
- CountedPtr<PluginModel> plugin(const string& uri);
- CountedPtr<ObjectModel> object(const Path& path);
+ SharedPtr<PluginModel> plugin(const string& uri);
+ SharedPtr<ObjectModel> object(const Path& path);
void clear();
size_t num_object() { return _objects.size(); }
- const map<string, CountedPtr<PluginModel> >& plugins() const { return _plugins; }
- const map<Path, CountedPtr<ObjectModel> >& objects() const { return _objects; }
+ const map<string, SharedPtr<PluginModel> >& plugins() const { return _plugins; }
+ const map<Path, SharedPtr<ObjectModel> >& objects() const { return _objects; }
- sigc::signal<void, CountedPtr<ObjectModel> > new_object_sig;
+ sigc::signal<void, SharedPtr<ObjectModel> > new_object_sig;
private:
- void add_object(CountedPtr<ObjectModel> object);
- CountedPtr<ObjectModel> remove_object(const Path& path);
+ void add_object(SharedPtr<ObjectModel> object);
+ SharedPtr<ObjectModel> remove_object(const Path& path);
- void add_plugin(CountedPtr<PluginModel> plugin);
+ void add_plugin(SharedPtr<PluginModel> plugin);
// It would be nice to integrate these somehow..
- void add_orphan(CountedPtr<ObjectModel> orphan);
- void resolve_orphans(CountedPtr<ObjectModel> parent);
+ void add_orphan(SharedPtr<ObjectModel> orphan);
+ void resolve_orphans(SharedPtr<ObjectModel> parent);
- void add_connection_orphan(CountedPtr<ConnectionModel> orphan);
- void resolve_connection_orphans(CountedPtr<PortModel> port);
+ void add_connection_orphan(SharedPtr<ConnectionModel> orphan);
+ void resolve_connection_orphans(SharedPtr<PortModel> port);
- void add_plugin_orphan(CountedPtr<NodeModel> orphan);
- void resolve_plugin_orphans(CountedPtr<PluginModel> plugin);
+ void add_plugin_orphan(SharedPtr<NodeModel> orphan);
+ void resolve_plugin_orphans(SharedPtr<PluginModel> plugin);
void add_metadata_orphan(const Path& subject, const string& predicate, const Atom& value);
- void resolve_metadata_orphans(CountedPtr<ObjectModel> subject);
+ void resolve_metadata_orphans(SharedPtr<ObjectModel> subject);
// Slots for SigClientInterface signals
void destruction_event(const Path& path);
@@ -95,27 +95,27 @@ private:
void connection_event(const Path& src_port_path, const Path& dst_port_path);
void disconnection_event(const Path& src_port_path, const Path& dst_port_path);
- CountedPtr<EngineInterface> _engine;
- CountedPtr<SigClientInterface> _emitter;
+ SharedPtr<EngineInterface> _engine;
+ SharedPtr<SigClientInterface> _emitter;
- typedef map<Path, CountedPtr<ObjectModel> > ObjectMap;
+ typedef map<Path, SharedPtr<ObjectModel> > ObjectMap;
ObjectMap _objects; ///< Keyed by Ingen path
- map<string, CountedPtr<PluginModel> > _plugins; ///< Keyed by URI
+ map<string, SharedPtr<PluginModel> > _plugins; ///< Keyed by URI
/** Objects we've received, but depend on the existance of another unknown object.
* Keyed by the path of the depended-on object (for tolerance of orderless comms) */
- map<Path, list<CountedPtr<ObjectModel> > > _orphans;
+ map<Path, list<SharedPtr<ObjectModel> > > _orphans;
/** Same idea, except with plugins instead of parents.
* It's unfortunate everything doesn't just have a URI and this was the same.. ahem.. */
- map<string, list<CountedPtr<NodeModel> > > _plugin_orphans;
+ map<string, list<SharedPtr<NodeModel> > > _plugin_orphans;
/** Not orphans OF metadata like the above, but orphans which are metadata */
map<Path, list<std::pair<string, Atom> > > _metadata_orphans;
/** Ditto */
- list<CountedPtr<ConnectionModel> > _connection_orphans;
+ list<SharedPtr<ConnectionModel> > _connection_orphans;
};
diff --git a/src/libs/client/ThreadedSigClientInterface.h b/src/libs/client/ThreadedSigClientInterface.h
index f29d3cc4..056540fb 100644
--- a/src/libs/client/ThreadedSigClientInterface.h
+++ b/src/libs/client/ThreadedSigClientInterface.h
@@ -22,8 +22,8 @@
#include <sigc++/sigc++.h>
#include "interface/ClientInterface.h"
#include "SigClientInterface.h"
-#include "util/Queue.h"
-#include "util/Atom.h"
+#include "raul/Queue.h"
+#include "raul/Atom.h"
using std::string;
/** Returns nothing and takes no parameters (because they have all been bound) */
diff --git a/src/libs/engine/AlsaMidiDriver.h b/src/libs/engine/AlsaMidiDriver.h
index bc5e6203..baf29da6 100644
--- a/src/libs/engine/AlsaMidiDriver.h
+++ b/src/libs/engine/AlsaMidiDriver.h
@@ -19,7 +19,7 @@
#include <alsa/asoundlib.h>
#include "List.h"
-#include "util/Queue.h"
+#include "raul/Queue.h"
#include "MidiDriver.h"
namespace Ingen {
diff --git a/src/libs/engine/ClientBroadcaster.cpp b/src/libs/engine/ClientBroadcaster.cpp
index a214131a..6e722024 100644
--- a/src/libs/engine/ClientBroadcaster.cpp
+++ b/src/libs/engine/ClientBroadcaster.cpp
@@ -40,7 +40,7 @@ namespace Ingen {
/** Register a client to receive messages over the notification band.
*/
void
-ClientBroadcaster::register_client(const ClientKey key, CountedPtr<ClientInterface> client)
+ClientBroadcaster::register_client(const ClientKey key, SharedPtr<ClientInterface> client)
{
bool found = false;
for (ClientList::iterator i = _clients.begin(); i != _clients.end(); ++i)
@@ -48,7 +48,7 @@ ClientBroadcaster::register_client(const ClientKey key, CountedPtr<ClientInterfa
found = true;
if (!found) {
- _clients.push_back(pair<ClientKey, CountedPtr<ClientInterface> >(key, client));
+ _clients.push_back(pair<ClientKey, SharedPtr<ClientInterface> >(key, client));
cout << "[ClientBroadcaster] Registered client " << key.uri()
<< " (" << _clients.size() << " clients)" << endl;
} else {
@@ -103,7 +103,7 @@ ClientBroadcaster::unregister_client(const ClientKey& key)
* (A responder is passed to remove the dependency on liblo addresses in request
* events, in anticipation of libom and multiple ways of responding to clients).
*/
-CountedPtr<ClientInterface>
+SharedPtr<ClientInterface>
ClientBroadcaster::client(const ClientKey& key)
{
for (ClientList::iterator i = _clients.begin(); i != _clients.end(); ++i)
@@ -112,7 +112,7 @@ ClientBroadcaster::client(const ClientKey& key)
cerr << "[ClientBroadcaster] Failed to find client." << endl;
- return CountedPtr<ClientInterface>();
+ return SharedPtr<ClientInterface>();
}
@@ -124,7 +124,7 @@ ClientBroadcaster::send_error(const string& msg)
}
void
-ClientBroadcaster::send_plugins_to(CountedPtr<ClientInterface> client, const list<Plugin*>& plugin_list)
+ClientBroadcaster::send_plugins_to(SharedPtr<ClientInterface> client, const list<Plugin*>& plugin_list)
{
#if 0
// FIXME: This probably isn't actually thread safe
diff --git a/src/libs/engine/ClientBroadcaster.h b/src/libs/engine/ClientBroadcaster.h
index 97f2abf2..529dffdb 100644
--- a/src/libs/engine/ClientBroadcaster.h
+++ b/src/libs/engine/ClientBroadcaster.h
@@ -25,7 +25,7 @@
#include <pthread.h>
#include "types.h"
#include "interface/ClientInterface.h"
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
using std::list; using std::string; using std::pair;
@@ -55,10 +55,10 @@ using Shared::ClientInterface;
class ClientBroadcaster
{
public:
- void register_client(const ClientKey key, CountedPtr<ClientInterface> client);
+ void register_client(const ClientKey key, SharedPtr<ClientInterface> client);
bool unregister_client(const ClientKey& key);
- CountedPtr<ClientInterface> client(const ClientKey& key);
+ SharedPtr<ClientInterface> client(const ClientKey& key);
// Notification band:
@@ -88,10 +88,10 @@ public:
void send_program_add(const string& node_path, int bank, int program, const string& name);
void send_program_remove(const string& node_path, int bank, int program);
- void send_plugins_to(CountedPtr<ClientInterface>, const list<Plugin*>& plugin_list);
+ void send_plugins_to(SharedPtr<ClientInterface>, const list<Plugin*>& plugin_list);
private:
- typedef list<pair<ClientKey, CountedPtr<ClientInterface> > > ClientList;
+ typedef list<pair<ClientKey, SharedPtr<ClientInterface> > > ClientList;
//list<pair<ClientKey, ClientInterface* const> > _clients;
ClientList _clients;
};
diff --git a/src/libs/engine/DirectResponder.h b/src/libs/engine/DirectResponder.h
index e2af3e3b..12b82105 100644
--- a/src/libs/engine/DirectResponder.h
+++ b/src/libs/engine/DirectResponder.h
@@ -18,7 +18,7 @@
#ifndef DIRECTRESPONDER_H
#define DIRECTRESPONDER_H
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "interface/ClientInterface.h"
#include "Responder.h"
@@ -30,7 +30,7 @@ namespace Ingen {
class DirectResponder : public Responder
{
public:
- DirectResponder(CountedPtr<ClientInterface> client, int32_t id)
+ DirectResponder(SharedPtr<ClientInterface> client, int32_t id)
: _client(client), _id(id)
{}
@@ -39,10 +39,10 @@ public:
void respond_ok() { _client->response(_id, true, ""); }
void respond_error(const string& msg) { _client->response(_id, false, msg); }
- CountedPtr<ClientInterface> client() { return _client; }
+ SharedPtr<ClientInterface> client() { return _client; }
private:
- CountedPtr<ClientInterface> _client;
+ SharedPtr<ClientInterface> _client;
int32_t _id;
};
diff --git a/src/libs/engine/Engine.cpp b/src/libs/engine/Engine.cpp
index 5d064d49..6cf50f52 100644
--- a/src/libs/engine/Engine.cpp
+++ b/src/libs/engine/Engine.cpp
@@ -20,8 +20,8 @@
#include <sys/mman.h>
#include <iostream>
#include <unistd.h>
+#include "raul/Queue.h"
#include "Event.h"
-#include "util/Queue.h"
#include "JackAudioDriver.h"
#include "NodeFactory.h"
#include "ClientBroadcaster.h"
@@ -154,11 +154,11 @@ Engine::activate()
return;
// Create root patch
- CreatePatchEvent create_ev(*this, CountedPtr<Responder>(new Responder()), 0, "/", 1);
+ CreatePatchEvent create_ev(*this, SharedPtr<Responder>(new Responder()), 0, "/", 1);
create_ev.pre_process();
create_ev.execute(1, 0, 1);
create_ev.post_process();
- EnablePatchEvent enable_ev(*this, CountedPtr<Responder>(new Responder()), 0, "/");
+ EnablePatchEvent enable_ev(*this, SharedPtr<Responder>(new Responder()), 0, "/");
enable_ev.pre_process();
enable_ev.execute(1, 0, 1);
enable_ev.post_process();
diff --git a/src/libs/engine/Event.h b/src/libs/engine/Event.h
index dc6f8aaa..01809cfc 100644
--- a/src/libs/engine/Event.h
+++ b/src/libs/engine/Event.h
@@ -18,7 +18,7 @@
#define EVENT_H
#include <cassert>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "types.h"
#include "MaidObject.h"
#include "Responder.h"
@@ -68,7 +68,7 @@ protected:
Event(const Event&);
Event& operator=(const Event&);
- Event(Engine& engine, CountedPtr<Responder> responder, FrameTime time)
+ Event(Engine& engine, SharedPtr<Responder> responder, FrameTime time)
: _engine(engine)
, _responder(responder)
, _time(time)
@@ -76,7 +76,7 @@ protected:
{}
Engine& _engine;
- CountedPtr<Responder> _responder;
+ SharedPtr<Responder> _responder;
FrameTime _time;
bool _executed;
};
diff --git a/src/libs/engine/GraphObject.h b/src/libs/engine/GraphObject.h
index 4f72a2e6..82cef94f 100644
--- a/src/libs/engine/GraphObject.h
+++ b/src/libs/engine/GraphObject.h
@@ -22,8 +22,8 @@
#include <cstddef>
#include <cassert>
#include "MaidObject.h"
-#include "util/Path.h"
-#include "util/Atom.h"
+#include "raul/Path.h"
+#include "raul/Atom.h"
#include "types.h"
using std::string;
diff --git a/src/libs/engine/JackAudioDriver.cpp b/src/libs/engine/JackAudioDriver.cpp
index 66a16d51..756cfd68 100644
--- a/src/libs/engine/JackAudioDriver.cpp
+++ b/src/libs/engine/JackAudioDriver.cpp
@@ -25,7 +25,7 @@
#include "QueuedEvent.h"
#include "EventSource.h"
#include "PostProcessor.h"
-#include "util/Queue.h"
+#include "raul/Queue.h"
#include "Node.h"
#include "Patch.h"
#include "Port.h"
diff --git a/src/libs/engine/JackMidiDriver.h b/src/libs/engine/JackMidiDriver.h
index cf651291..7ff2ad5b 100644
--- a/src/libs/engine/JackMidiDriver.h
+++ b/src/libs/engine/JackMidiDriver.h
@@ -21,7 +21,7 @@
#include <jack/midiport.h>
#include "config.h"
#include "List.h"
-#include "util/Queue.h"
+#include "raul/Queue.h"
#include "MidiDriver.h"
namespace Ingen {
diff --git a/src/libs/engine/Maid.h b/src/libs/engine/Maid.h
index c0e6cb74..a7e74f79 100644
--- a/src/libs/engine/Maid.h
+++ b/src/libs/engine/Maid.h
@@ -18,7 +18,7 @@
#define MAID_H
#include "MaidObject.h"
-#include "util/Queue.h"
+#include "raul/Queue.h"
/** Explicitly driven garbage collector.
diff --git a/src/libs/engine/Makefile.am b/src/libs/engine/Makefile.am
index ac58885f..0b12e524 100644
--- a/src/libs/engine/Makefile.am
+++ b/src/libs/engine/Makefile.am
@@ -1,8 +1,8 @@
SUBDIRS = tests events
-AM_CXXFLAGS = @JACK_CFLAGS@ @LOSC_CFLAGS@ @ALSA_CFLAGS@ @LASH_CFLAGS@ @SLV2_CFLAGS@ -I$(top_srcdir)/src/common -I$(top_srcdir)/src/libs/engine/events
+AM_CXXFLAGS = @RAUL_CFLAGS@ @JACK_CFLAGS@ @LOSC_CFLAGS@ @ALSA_CFLAGS@ @LASH_CFLAGS@ @SLV2_CFLAGS@ -I$(top_srcdir)/src/common -I$(top_srcdir)/src/libs/engine/events
-libingen_la_LIBADD = @JACK_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ @LASH_LIBS@ @SLV2_LIBS@
+libingen_la_LIBADD = @RAUL_LIBS@ @JACK_LIBS@ @LOSC_LIBS@ @ALSA_LIBS@ @LASH_LIBS@ @SLV2_LIBS@
MAINTAINERCLEANFILES = Makefile.in
diff --git a/src/libs/engine/OSCClientSender.cpp b/src/libs/engine/OSCClientSender.cpp
index 17b730fb..24dc1cb0 100644
--- a/src/libs/engine/OSCClientSender.cpp
+++ b/src/libs/engine/OSCClientSender.cpp
@@ -29,7 +29,7 @@
#include "AudioDriver.h"
#include "interface/ClientInterface.h"
#include "Responder.h"
-#include "util/LibloAtom.h"
+#include "raul/AtomLiblo.h"
using std::cout; using std::cerr; using std::endl;
namespace Ingen {
@@ -427,7 +427,7 @@ OSCClientSender::metadata_update(string path, string key, Atom value)
lo_message m = lo_message_new();
lo_message_add_string(m, path.c_str());
lo_message_add_string(m, key.c_str());
- LibloAtom::lo_message_add_atom(m, value);
+ AtomLiblo::lo_message_add_atom(m, value);
lo_send_message(_address, "/om/metadata/update", m);
}
diff --git a/src/libs/engine/OSCEngineReceiver.cpp b/src/libs/engine/OSCEngineReceiver.cpp
index 50876850..3354e648 100644
--- a/src/libs/engine/OSCEngineReceiver.cpp
+++ b/src/libs/engine/OSCEngineReceiver.cpp
@@ -20,9 +20,9 @@
#include <string>
#include <lo/lo.h>
#include "types.h"
-#include "util/Queue.h"
-#include "util/CountedPtr.h"
-#include "util/LibloAtom.h"
+#include "raul/Queue.h"
+#include "raul/SharedPtr.h"
+#include "raul/AtomLiblo.h"
#include "QueuedEventSource.h"
#include "interface/ClientKey.h"
#include "interface/ClientInterface.h"
@@ -48,12 +48,12 @@ using Shared::ClientKey;
*/
-OSCEngineReceiver::OSCEngineReceiver(CountedPtr<Engine> engine, size_t queue_size, const char* const port)
+OSCEngineReceiver::OSCEngineReceiver(SharedPtr<Engine> engine, size_t queue_size, const char* const port)
: EngineInterface(),
QueuedEngineInterface(engine, queue_size, queue_size), // FIXME
_port(port),
_server(NULL),
- _osc_responder(CountedPtr<OSCResponder>())
+ _osc_responder(SharedPtr<OSCResponder>())
{
_server = lo_server_new(port, error_cb);
@@ -231,7 +231,7 @@ OSCEngineReceiver::set_response_address_cb(const char* path, const char* types,
} else {
// Shitty deal, make a new one
//cerr << "** Setting response address to " << url << "(2)" << endl;
- me->_osc_responder = CountedPtr<OSCResponder>(
+ me->_osc_responder = SharedPtr<OSCResponder>(
new OSCResponder(me->_engine->broadcaster(), id, url));
me->set_responder(me->_osc_responder);
@@ -242,7 +242,7 @@ OSCEngineReceiver::set_response_address_cb(const char* path, const char* types,
// Otherwise we have a NULL responder, definitely need to set a new one
} else {
//cerr << "** null responder\n";
- me->_osc_responder = CountedPtr<OSCResponder>(new OSCResponder(me->_engine->broadcaster(), id, url));
+ me->_osc_responder = SharedPtr<OSCResponder>(new OSCResponder(me->_engine->broadcaster(), id, url));
me->set_responder(me->_osc_responder);
//cerr << "** Setting response address to " << url << "(2)" << endl;
}
@@ -325,7 +325,7 @@ OSCEngineReceiver::m_register_client_cb(const char* path, const char* types, lo_
lo_address addr = lo_message_get_source(msg);
char* const url = lo_address_get_url(addr);
- CountedPtr<ClientInterface> client(new OSCClientSender((const char*)url));
+ SharedPtr<ClientInterface> client(new OSCClientSender((const char*)url));
register_client(ClientKey(ClientKey::OSC_URL, (const char*)url), client);
free(url);
@@ -766,7 +766,7 @@ OSCEngineReceiver::m_metadata_set_cb(const char* path, const char* types, lo_arg
const char* node_path = &argv[1]->s;
const char* key = &argv[2]->s;
- Atom value = LibloAtom::lo_arg_to_atom(types[3], argv[3]);
+ Atom value = AtomLiblo::lo_arg_to_atom(types[3], argv[3]);
set_metadata(node_path, key, value);
diff --git a/src/libs/engine/OSCEngineReceiver.h b/src/libs/engine/OSCEngineReceiver.h
index c31587e6..3cba46f1 100644
--- a/src/libs/engine/OSCEngineReceiver.h
+++ b/src/libs/engine/OSCEngineReceiver.h
@@ -20,7 +20,7 @@
#include "config.h"
#include <string>
#include <lo/lo.h>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "QueuedEngineInterface.h"
#include "OSCResponder.h"
using std::string;
@@ -60,7 +60,7 @@ inline static int name##_cb(LO_HANDLER_ARGS, void* myself)\
class OSCEngineReceiver : public QueuedEngineInterface
{
public:
- OSCEngineReceiver(CountedPtr<Engine> engine, size_t queue_size, const char* const port);
+ OSCEngineReceiver(SharedPtr<Engine> engine, size_t queue_size, const char* const port);
~OSCEngineReceiver();
void activate();
@@ -124,7 +124,7 @@ private:
lo_server _server;
/** Cached OSC responder (for most recent incoming message) */
- CountedPtr<OSCResponder> _osc_responder;
+ SharedPtr<OSCResponder> _osc_responder;
};
diff --git a/src/libs/engine/OSCResponder.cpp b/src/libs/engine/OSCResponder.cpp
index a2931ca5..acc7e7ac 100644
--- a/src/libs/engine/OSCResponder.cpp
+++ b/src/libs/engine/OSCResponder.cpp
@@ -77,13 +77,13 @@ OSCResponder::respond_error(const string& msg)
}
-CountedPtr<ClientInterface>
+SharedPtr<ClientInterface>
OSCResponder::client()
{
if (_broadcaster)
return _broadcaster->client(client_key());
else
- return CountedPtr<ClientInterface>();
+ return SharedPtr<ClientInterface>();
}
} // namespace OM
diff --git a/src/libs/engine/OSCResponder.h b/src/libs/engine/OSCResponder.h
index 767375dc..80a121a4 100644
--- a/src/libs/engine/OSCResponder.h
+++ b/src/libs/engine/OSCResponder.h
@@ -52,7 +52,7 @@ public:
ClientKey client_key() { return ClientKey(ClientKey::OSC_URL, _url); }
- CountedPtr<ClientInterface> client();
+ SharedPtr<ClientInterface> client();
private:
diff --git a/src/libs/engine/ObjectStore.cpp b/src/libs/engine/ObjectStore.cpp
index 517f805e..852d734b 100644
--- a/src/libs/engine/ObjectStore.cpp
+++ b/src/libs/engine/ObjectStore.cpp
@@ -19,7 +19,7 @@
#include "Node.h"
#include "Port.h"
#include "List.h"
-#include "util/Path.h"
+#include "raul/Path.h"
#include "Tree.h"
namespace Ingen {
diff --git a/src/libs/engine/ObjectStore.h b/src/libs/engine/ObjectStore.h
index c899b0ff..3f2fcfc3 100644
--- a/src/libs/engine/ObjectStore.h
+++ b/src/libs/engine/ObjectStore.h
@@ -19,7 +19,7 @@
#define OBJECTSTORE_H
#include <string>
-#include "util/Path.h"
+#include "raul/Path.h"
#include "Tree.h"
using std::string;
diff --git a/src/libs/engine/PostProcessor.cpp b/src/libs/engine/PostProcessor.cpp
index 5fd1218a..264e4f6f 100644
--- a/src/libs/engine/PostProcessor.cpp
+++ b/src/libs/engine/PostProcessor.cpp
@@ -19,7 +19,7 @@
#include <iostream>
#include <pthread.h>
#include "Event.h"
-#include "util/Queue.h"
+#include "raul/Queue.h"
#include "Maid.h"
diff --git a/src/libs/engine/PostProcessor.h b/src/libs/engine/PostProcessor.h
index 212e3797..284e64c1 100644
--- a/src/libs/engine/PostProcessor.h
+++ b/src/libs/engine/PostProcessor.h
@@ -19,8 +19,8 @@
#include <pthread.h>
#include "types.h"
-#include "util/Queue.h"
-#include "util/Slave.h"
+#include "raul/Queue.h"
+#include "raul/Slave.h"
class Maid;
diff --git a/src/libs/engine/QueuedEngineInterface.cpp b/src/libs/engine/QueuedEngineInterface.cpp
index 53c5668c..4628bdfd 100644
--- a/src/libs/engine/QueuedEngineInterface.cpp
+++ b/src/libs/engine/QueuedEngineInterface.cpp
@@ -18,15 +18,15 @@
#include "config.h"
#include "QueuedEventSource.h"
#include "events.h"
-#include "util/Queue.h"
+#include "raul/Queue.h"
#include "Engine.h"
#include "AudioDriver.h"
namespace Ingen {
-QueuedEngineInterface::QueuedEngineInterface(CountedPtr<Engine> engine, size_t queued_size, size_t stamped_size)
+QueuedEngineInterface::QueuedEngineInterface(SharedPtr<Engine> engine, size_t queued_size, size_t stamped_size)
: QueuedEventSource(queued_size, stamped_size)
-, _responder(CountedPtr<Responder>(new Responder())) // NULL responder
+, _responder(SharedPtr<Responder>(new Responder())) // NULL responder
, _engine(engine)
{
}
@@ -47,7 +47,7 @@ QueuedEngineInterface::now() const
* Ownership of @a responder is taken.
*/
void
-QueuedEngineInterface::set_responder(CountedPtr<Responder> responder)
+QueuedEngineInterface::set_responder(SharedPtr<Responder> responder)
{
_responder = responder;
}
@@ -64,7 +64,7 @@ QueuedEngineInterface::set_next_response_id(int32_t id)
void
QueuedEngineInterface::disable_responses()
{
- static CountedPtr<Responder> null_responder(new Responder());
+ static SharedPtr<Responder> null_responder(new Responder());
//cerr << "DISABLE\n";
set_responder(null_responder);
}
@@ -74,7 +74,7 @@ QueuedEngineInterface::disable_responses()
void
-QueuedEngineInterface::register_client(ClientKey key, CountedPtr<ClientInterface> client)
+QueuedEngineInterface::register_client(ClientKey key, SharedPtr<ClientInterface> client)
{
push_queued(new RegisterClientEvent(*_engine.get(), _responder, now(), key, client));
}
diff --git a/src/libs/engine/QueuedEngineInterface.h b/src/libs/engine/QueuedEngineInterface.h
index 2a922acd..d40cd1a8 100644
--- a/src/libs/engine/QueuedEngineInterface.h
+++ b/src/libs/engine/QueuedEngineInterface.h
@@ -20,7 +20,7 @@
#include <inttypes.h>
#include <string>
#include <memory>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "interface/EngineInterface.h"
#include "interface/ClientInterface.h"
#include "interface/ClientKey.h"
@@ -60,16 +60,16 @@ class Engine;
class QueuedEngineInterface : public QueuedEventSource, public virtual EngineInterface
{
public:
- QueuedEngineInterface(CountedPtr<Engine> engine, size_t queued_size, size_t stamped_size);
+ QueuedEngineInterface(SharedPtr<Engine> engine, size_t queued_size, size_t stamped_size);
virtual ~QueuedEngineInterface() {}
void set_next_response_id(int32_t id);
- virtual void set_responder(CountedPtr<Responder> responder);
+ virtual void set_responder(SharedPtr<Responder> responder);
virtual void disable_responses();
// Client registration
- virtual void register_client(ClientKey key, CountedPtr<ClientInterface> client);
+ virtual void register_client(ClientKey key, SharedPtr<ClientInterface> client);
virtual void unregister_client(ClientKey key);
@@ -155,9 +155,9 @@ public:
protected:
/** Where responses to current messages will go. */
- CountedPtr<Responder> _responder;
+ SharedPtr<Responder> _responder;
- CountedPtr<Engine> _engine;
+ SharedPtr<Engine> _engine;
private:
SampleCount now() const;
diff --git a/src/libs/engine/QueuedEvent.h b/src/libs/engine/QueuedEvent.h
index 780e6a36..bd79821b 100644
--- a/src/libs/engine/QueuedEvent.h
+++ b/src/libs/engine/QueuedEvent.h
@@ -74,7 +74,7 @@ protected:
QueuedEvent& operator=(const QueuedEvent&);
QueuedEvent(Engine& engine,
- CountedPtr<Responder> responder,
+ SharedPtr<Responder> responder,
FrameTime time,
bool blocking = false,
QueuedEventSource* source = NULL)
@@ -87,7 +87,7 @@ protected:
// NULL event base (for internal events only!)
QueuedEvent(Engine& engine)
- : Event(engine, CountedPtr<Ingen::Responder>(), 0)
+ : Event(engine, SharedPtr<Ingen::Responder>(), 0)
, _pre_processed(false), _blocking(false), _source(NULL)
{}
diff --git a/src/libs/engine/QueuedEventSource.h b/src/libs/engine/QueuedEventSource.h
index fddb61ab..efceaa26 100644
--- a/src/libs/engine/QueuedEventSource.h
+++ b/src/libs/engine/QueuedEventSource.h
@@ -20,9 +20,9 @@
#include <cstdlib>
#include <pthread.h>
#include "types.h"
-#include "util/Semaphore.h"
-#include "util/Queue.h"
-#include "util/Slave.h"
+#include "raul/Semaphore.h"
+#include "raul/Queue.h"
+#include "raul/Slave.h"
#include "Event.h"
#include "EventSource.h"
diff --git a/src/libs/engine/Responder.h b/src/libs/engine/Responder.h
index 63b6fc7f..acfa6beb 100644
--- a/src/libs/engine/Responder.h
+++ b/src/libs/engine/Responder.h
@@ -19,7 +19,7 @@
#include <inttypes.h>
#include <string>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "interface/ClientKey.h"
#include "interface/ClientInterface.h"
using std::string;
@@ -52,7 +52,7 @@ public:
virtual ~Responder() {}
virtual ClientKey client_key() { return ClientKey(); }
- virtual CountedPtr<ClientInterface> client() { return CountedPtr<ClientInterface>(); }
+ virtual SharedPtr<ClientInterface> client() { return SharedPtr<ClientInterface>(); }
virtual void set_id(int32_t id) {}
diff --git a/src/libs/engine/events/ActivateEvent.cpp b/src/libs/engine/events/ActivateEvent.cpp
index c63c86e1..6c64f190 100644
--- a/src/libs/engine/events/ActivateEvent.cpp
+++ b/src/libs/engine/events/ActivateEvent.cpp
@@ -21,7 +21,7 @@
namespace Ingen {
-ActivateEvent::ActivateEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp)
+ActivateEvent::ActivateEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp)
: QueuedEvent(engine, responder, timestamp)
{
_engine.activate();
diff --git a/src/libs/engine/events/ActivateEvent.h b/src/libs/engine/events/ActivateEvent.h
index 696fc0de..642859a7 100644
--- a/src/libs/engine/events/ActivateEvent.h
+++ b/src/libs/engine/events/ActivateEvent.h
@@ -29,7 +29,7 @@ namespace Ingen {
class ActivateEvent : public QueuedEvent
{
public:
- ActivateEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp);
+ ActivateEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp);
void post_process();
};
diff --git a/src/libs/engine/events/AddNodeEvent.cpp b/src/libs/engine/events/AddNodeEvent.cpp
index 1a317e39..74a08b00 100644
--- a/src/libs/engine/events/AddNodeEvent.cpp
+++ b/src/libs/engine/events/AddNodeEvent.cpp
@@ -25,15 +25,15 @@
#include "NodeFactory.h"
#include "ClientBroadcaster.h"
#include "Maid.h"
-#include "util/Path.h"
+#include "raul/Path.h"
#include "ObjectStore.h"
-#include "util/Path.h"
+#include "raul/Path.h"
#include "Port.h"
namespace Ingen {
-AddNodeEvent::AddNodeEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& path,
+AddNodeEvent::AddNodeEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path,
const string& plugin_uri, bool poly)
: QueuedEvent(engine, responder, timestamp),
m_path(path),
@@ -51,7 +51,7 @@ AddNodeEvent::AddNodeEvent(Engine& engine, CountedPtr<Responder> responder, Samp
*
* Do not use.
*/
-AddNodeEvent::AddNodeEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& path,
+AddNodeEvent::AddNodeEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path,
const string& plugin_type, const string& plugin_lib, const string& plugin_label, bool poly)
: QueuedEvent(engine, responder, timestamp),
m_path(path),
diff --git a/src/libs/engine/events/AddNodeEvent.h b/src/libs/engine/events/AddNodeEvent.h
index 22e164ea..b4d7b0ba 100644
--- a/src/libs/engine/events/AddNodeEvent.h
+++ b/src/libs/engine/events/AddNodeEvent.h
@@ -18,7 +18,7 @@
#define ADDNODEEVENT_H
#include "QueuedEvent.h"
-#include "util/Path.h"
+#include "raul/Path.h"
#include <string>
using std::string;
@@ -40,7 +40,7 @@ class AddNodeEvent : public QueuedEvent
{
public:
AddNodeEvent(Engine& engine,
- CountedPtr<Responder> responder,
+ SharedPtr<Responder> responder,
SampleCount timestamp,
const string& node_path,
const string& plugin_uri,
@@ -48,7 +48,7 @@ public:
// DEPRECATED
AddNodeEvent(Engine& engine,
- CountedPtr<Responder> responder,
+ SharedPtr<Responder> responder,
SampleCount timestamp,
const string& node_path,
const string& plugin_type,
diff --git a/src/libs/engine/events/AddPortEvent.cpp b/src/libs/engine/events/AddPortEvent.cpp
index ae692b1b..08126d3a 100644
--- a/src/libs/engine/events/AddPortEvent.cpp
+++ b/src/libs/engine/events/AddPortEvent.cpp
@@ -22,11 +22,11 @@
#include "Engine.h"
#include "Patch.h"
#include "Maid.h"
-#include "util/Path.h"
+#include "raul/Path.h"
#include "QueuedEventSource.h"
#include "ObjectStore.h"
#include "ClientBroadcaster.h"
-#include "util/Path.h"
+#include "raul/Path.h"
#include "Port.h"
#include "AudioDriver.h"
#include "MidiDriver.h"
@@ -38,7 +38,7 @@
namespace Ingen {
-AddPortEvent::AddPortEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& type, bool is_output, QueuedEventSource* source)
+AddPortEvent::AddPortEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& type, bool is_output, QueuedEventSource* source)
: QueuedEvent(engine, responder, timestamp, true, source),
_path(path),
_type(type),
diff --git a/src/libs/engine/events/AddPortEvent.h b/src/libs/engine/events/AddPortEvent.h
index 0ef33515..4f74b47e 100644
--- a/src/libs/engine/events/AddPortEvent.h
+++ b/src/libs/engine/events/AddPortEvent.h
@@ -18,7 +18,7 @@
#define ADDPORTEVENT_H
#include "QueuedEvent.h"
-#include "util/Path.h"
+#include "raul/Path.h"
#include "DataType.h"
#include "Array.h"
#include <string>
@@ -41,7 +41,7 @@ class DriverPort;
class AddPortEvent : public QueuedEvent
{
public:
- AddPortEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& type, bool is_output, QueuedEventSource* source);
+ AddPortEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& type, bool is_output, QueuedEventSource* source);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/events/AllNotesOffEvent.cpp b/src/libs/engine/events/AllNotesOffEvent.cpp
index eacebda1..c90b1e45 100644
--- a/src/libs/engine/events/AllNotesOffEvent.cpp
+++ b/src/libs/engine/events/AllNotesOffEvent.cpp
@@ -24,7 +24,7 @@ namespace Ingen {
/** Note off with patch explicitly passed - triggered by MIDI.
*/
-AllNotesOffEvent::AllNotesOffEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, Patch* patch)
+AllNotesOffEvent::AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Patch* patch)
: Event(engine, responder, timestamp),
m_patch(patch)
{
@@ -33,7 +33,7 @@ AllNotesOffEvent::AllNotesOffEvent(Engine& engine, CountedPtr<Responder> respond
/** Note off event with lookup - triggered by OSC.
*/
-AllNotesOffEvent::AllNotesOffEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& patch_path)
+AllNotesOffEvent::AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path)
: Event(engine, responder, timestamp),
m_patch(NULL),
m_patch_path(patch_path)
diff --git a/src/libs/engine/events/AllNotesOffEvent.h b/src/libs/engine/events/AllNotesOffEvent.h
index 5c8f46f0..53b8f158 100644
--- a/src/libs/engine/events/AllNotesOffEvent.h
+++ b/src/libs/engine/events/AllNotesOffEvent.h
@@ -33,8 +33,8 @@ class Patch;
class AllNotesOffEvent : public Event
{
public:
- AllNotesOffEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, Patch* patch);
- AllNotesOffEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& patch_path);
+ AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Patch* patch);
+ AllNotesOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path);
void execute(SampleCount nframes, FrameTime start, FrameTime end);
void post_process();
diff --git a/src/libs/engine/events/ClearPatchEvent.cpp b/src/libs/engine/events/ClearPatchEvent.cpp
index 5023e89e..52366139 100644
--- a/src/libs/engine/events/ClearPatchEvent.cpp
+++ b/src/libs/engine/events/ClearPatchEvent.cpp
@@ -30,7 +30,7 @@
namespace Ingen {
-ClearPatchEvent::ClearPatchEvent(Engine& engine, CountedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& patch_path)
+ClearPatchEvent::ClearPatchEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& patch_path)
: QueuedEvent(engine, responder, time, true, source),
m_patch_path(patch_path),
m_patch(NULL),
diff --git a/src/libs/engine/events/ClearPatchEvent.h b/src/libs/engine/events/ClearPatchEvent.h
index 234b8a51..0ed9294b 100644
--- a/src/libs/engine/events/ClearPatchEvent.h
+++ b/src/libs/engine/events/ClearPatchEvent.h
@@ -35,7 +35,7 @@ class Patch;
class ClearPatchEvent : public QueuedEvent
{
public:
- ClearPatchEvent(Engine& engine, CountedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& patch_path);
+ ClearPatchEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& patch_path);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/events/ConnectionEvent.cpp b/src/libs/engine/events/ConnectionEvent.cpp
index 17d3c9cb..c54e440f 100644
--- a/src/libs/engine/events/ConnectionEvent.cpp
+++ b/src/libs/engine/events/ConnectionEvent.cpp
@@ -27,7 +27,7 @@
#include "Port.h"
#include "Maid.h"
#include "ObjectStore.h"
-#include "util/Path.h"
+#include "raul/Path.h"
using std::string;
namespace Ingen {
@@ -36,7 +36,7 @@ namespace Ingen {
//// ConnectionEvent ////
-ConnectionEvent::ConnectionEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path)
+ConnectionEvent::ConnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path)
: QueuedEvent(engine, responder, timestamp),
m_src_port_path(src_port_path),
m_dst_port_path(dst_port_path),
@@ -152,7 +152,7 @@ ConnectionEvent::post_process()
template <typename T>
-TypedConnectionEvent<T>::TypedConnectionEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port)
+TypedConnectionEvent<T>::TypedConnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port)
: QueuedEvent(engine, responder, timestamp),
m_src_port(src_port),
m_dst_port(dst_port),
diff --git a/src/libs/engine/events/ConnectionEvent.h b/src/libs/engine/events/ConnectionEvent.h
index 2f65eb3a..7328ca91 100644
--- a/src/libs/engine/events/ConnectionEvent.h
+++ b/src/libs/engine/events/ConnectionEvent.h
@@ -19,7 +19,7 @@
#include <string>
#include "QueuedEvent.h"
-#include "util/Path.h"
+#include "raul/Path.h"
#include "types.h"
using std::string;
@@ -46,7 +46,7 @@ template <typename T> class TypedConnectionEvent; // helper, defined below
class ConnectionEvent : public QueuedEvent
{
public:
- ConnectionEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path);
+ ConnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path);
~ConnectionEvent();
void pre_process();
@@ -80,7 +80,7 @@ template <typename T>
class TypedConnectionEvent : public QueuedEvent
{
public:
- TypedConnectionEvent(Engine& engine, CountedPtr<Responder> responder, FrameTime time, OutputPort<T>* src_port, InputPort<T>* dst_port);
+ TypedConnectionEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, OutputPort<T>* src_port, InputPort<T>* dst_port);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/events/CreatePatchEvent.cpp b/src/libs/engine/events/CreatePatchEvent.cpp
index 97be5557..f5baf53e 100644
--- a/src/libs/engine/events/CreatePatchEvent.cpp
+++ b/src/libs/engine/events/CreatePatchEvent.cpp
@@ -24,13 +24,13 @@
#include "Maid.h"
#include "ClientBroadcaster.h"
#include "AudioDriver.h"
-#include "util/Path.h"
+#include "raul/Path.h"
#include "ObjectStore.h"
namespace Ingen {
-CreatePatchEvent::CreatePatchEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& path, int poly)
+CreatePatchEvent::CreatePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, int poly)
: QueuedEvent(engine, responder, timestamp),
m_path(path),
m_patch(NULL),
diff --git a/src/libs/engine/events/CreatePatchEvent.h b/src/libs/engine/events/CreatePatchEvent.h
index 63a33271..f62b3ee5 100644
--- a/src/libs/engine/events/CreatePatchEvent.h
+++ b/src/libs/engine/events/CreatePatchEvent.h
@@ -17,7 +17,7 @@
#ifndef CREATEPATCHEVENT_H
#define CREATEPATCHEVENT_H
-#include "util/Path.h"
+#include "raul/Path.h"
#include "QueuedEvent.h"
#include <string>
using std::string;
@@ -39,7 +39,7 @@ class Plugin;
class CreatePatchEvent : public QueuedEvent
{
public:
- CreatePatchEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& path, int poly);
+ CreatePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, int poly);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/events/DSSIConfigureEvent.cpp b/src/libs/engine/events/DSSIConfigureEvent.cpp
index 9a26de0c..91225cb0 100644
--- a/src/libs/engine/events/DSSIConfigureEvent.cpp
+++ b/src/libs/engine/events/DSSIConfigureEvent.cpp
@@ -24,7 +24,7 @@
namespace Ingen {
-DSSIConfigureEvent::DSSIConfigureEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key, const string& val)
+DSSIConfigureEvent::DSSIConfigureEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key, const string& val)
: QueuedEvent(engine, responder, timestamp),
m_node_path(node_path),
m_key(key),
diff --git a/src/libs/engine/events/DSSIConfigureEvent.h b/src/libs/engine/events/DSSIConfigureEvent.h
index bef3fbb7..24472480 100644
--- a/src/libs/engine/events/DSSIConfigureEvent.h
+++ b/src/libs/engine/events/DSSIConfigureEvent.h
@@ -30,7 +30,7 @@ namespace Ingen {
class DSSIConfigureEvent : public QueuedEvent
{
public:
- DSSIConfigureEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key, const string& val);
+ DSSIConfigureEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key, const string& val);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/events/DSSIControlEvent.cpp b/src/libs/engine/events/DSSIControlEvent.cpp
index 4ab3cd6c..6c12611c 100644
--- a/src/libs/engine/events/DSSIControlEvent.cpp
+++ b/src/libs/engine/events/DSSIControlEvent.cpp
@@ -23,7 +23,7 @@
namespace Ingen {
-DSSIControlEvent::DSSIControlEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int port_num, Sample val)
+DSSIControlEvent::DSSIControlEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int port_num, Sample val)
: QueuedEvent(engine, responder, timestamp),
m_node_path(node_path),
m_port_num(port_num),
diff --git a/src/libs/engine/events/DSSIControlEvent.h b/src/libs/engine/events/DSSIControlEvent.h
index 9eeeb136..38114c4e 100644
--- a/src/libs/engine/events/DSSIControlEvent.h
+++ b/src/libs/engine/events/DSSIControlEvent.h
@@ -32,7 +32,7 @@ namespace Ingen {
class DSSIControlEvent : public QueuedEvent
{
public:
- DSSIControlEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int port_num, Sample val);
+ DSSIControlEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int port_num, Sample val);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/events/DSSIProgramEvent.cpp b/src/libs/engine/events/DSSIProgramEvent.cpp
index c6a9e0b7..5e992cbf 100644
--- a/src/libs/engine/events/DSSIProgramEvent.cpp
+++ b/src/libs/engine/events/DSSIProgramEvent.cpp
@@ -28,7 +28,7 @@ using std::cout; using std::cerr; using std::endl;
namespace Ingen {
-DSSIProgramEvent::DSSIProgramEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int bank, int program)
+DSSIProgramEvent::DSSIProgramEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int bank, int program)
: QueuedEvent(engine, responder, timestamp),
m_node_path(node_path),
m_bank(bank),
diff --git a/src/libs/engine/events/DSSIProgramEvent.h b/src/libs/engine/events/DSSIProgramEvent.h
index 51967cf0..e01a2cbf 100644
--- a/src/libs/engine/events/DSSIProgramEvent.h
+++ b/src/libs/engine/events/DSSIProgramEvent.h
@@ -30,7 +30,7 @@ namespace Ingen {
class DSSIProgramEvent : public QueuedEvent
{
public:
- DSSIProgramEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int bank, int program);
+ DSSIProgramEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, int bank, int program);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/events/DSSIUpdateEvent.cpp b/src/libs/engine/events/DSSIUpdateEvent.cpp
index edfe1394..158d7875 100644
--- a/src/libs/engine/events/DSSIUpdateEvent.cpp
+++ b/src/libs/engine/events/DSSIUpdateEvent.cpp
@@ -27,7 +27,7 @@ using std::cerr; using std::endl;
namespace Ingen {
-DSSIUpdateEvent::DSSIUpdateEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& url)
+DSSIUpdateEvent::DSSIUpdateEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& url)
: QueuedEvent(engine, responder, timestamp),
m_path(path),
m_url(url),
diff --git a/src/libs/engine/events/DSSIUpdateEvent.h b/src/libs/engine/events/DSSIUpdateEvent.h
index 91163efe..752ec5e8 100644
--- a/src/libs/engine/events/DSSIUpdateEvent.h
+++ b/src/libs/engine/events/DSSIUpdateEvent.h
@@ -36,7 +36,7 @@ class DSSINode;
class DSSIUpdateEvent : public QueuedEvent
{
public:
- DSSIUpdateEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& url);
+ DSSIUpdateEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& url);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/events/DeactivateEvent.cpp b/src/libs/engine/events/DeactivateEvent.cpp
index ff1740dc..87c20c8d 100644
--- a/src/libs/engine/events/DeactivateEvent.cpp
+++ b/src/libs/engine/events/DeactivateEvent.cpp
@@ -21,7 +21,7 @@
namespace Ingen {
-DeactivateEvent::DeactivateEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp)
+DeactivateEvent::DeactivateEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp)
: QueuedEvent(engine, responder, timestamp)
{
}
diff --git a/src/libs/engine/events/DeactivateEvent.h b/src/libs/engine/events/DeactivateEvent.h
index ddeb75f5..87abae22 100644
--- a/src/libs/engine/events/DeactivateEvent.h
+++ b/src/libs/engine/events/DeactivateEvent.h
@@ -29,7 +29,7 @@ namespace Ingen {
class DeactivateEvent : public QueuedEvent
{
public:
- DeactivateEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp);
+ DeactivateEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/events/DestroyEvent.cpp b/src/libs/engine/events/DestroyEvent.cpp
index bdf5f679..10b870a2 100644
--- a/src/libs/engine/events/DestroyEvent.cpp
+++ b/src/libs/engine/events/DestroyEvent.cpp
@@ -27,14 +27,14 @@
#include "ClientBroadcaster.h"
#include "Maid.h"
#include "ObjectStore.h"
-#include "util/Path.h"
+#include "raul/Path.h"
#include "QueuedEventSource.h"
#include "Port.h"
namespace Ingen {
-DestroyEvent::DestroyEvent(Engine& engine, CountedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& path, bool block)
+DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, const string& path, bool block)
: QueuedEvent(engine, responder, time, source, source),
m_path(path),
m_node(NULL),
@@ -47,7 +47,7 @@ DestroyEvent::DestroyEvent(Engine& engine, CountedPtr<Responder> responder, Fram
}
-DestroyEvent::DestroyEvent(Engine& engine, CountedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, Node* node, bool block)
+DestroyEvent::DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime time, QueuedEventSource* source, Node* node, bool block)
: QueuedEvent(engine, responder, block, source),
m_path(node->path()),
m_node(node),
diff --git a/src/libs/engine/events/DestroyEvent.h b/src/libs/engine/events/DestroyEvent.h
index fc2995a3..23d0ba90 100644
--- a/src/libs/engine/events/DestroyEvent.h
+++ b/src/libs/engine/events/DestroyEvent.h
@@ -17,7 +17,7 @@
#ifndef DESTROYEVENT_H
#define DESTROYEVENT_H
-#include "util/Path.h"
+#include "raul/Path.h"
#include "QueuedEvent.h"
#include <string>
@@ -44,8 +44,8 @@ class DisconnectPortEvent;
class DestroyEvent : public QueuedEvent
{
public:
- DestroyEvent(Engine& engine, CountedPtr<Responder> responder, FrameTime timestamp, QueuedEventSource* source, const string& path, bool block = true);
- DestroyEvent(Engine& engine, CountedPtr<Responder> responder, FrameTime timestamp, QueuedEventSource* source, Node* node, bool block = true);
+ DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime timestamp, QueuedEventSource* source, const string& path, bool block = true);
+ DestroyEvent(Engine& engine, SharedPtr<Responder> responder, FrameTime timestamp, QueuedEventSource* source, Node* node, bool block = true);
~DestroyEvent();
void pre_process();
diff --git a/src/libs/engine/events/DisablePatchEvent.cpp b/src/libs/engine/events/DisablePatchEvent.cpp
index 8e6d64a1..ed0234f7 100644
--- a/src/libs/engine/events/DisablePatchEvent.cpp
+++ b/src/libs/engine/events/DisablePatchEvent.cpp
@@ -26,7 +26,7 @@
namespace Ingen {
-DisablePatchEvent::DisablePatchEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& patch_path)
+DisablePatchEvent::DisablePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path)
: QueuedEvent(engine, responder, timestamp),
m_patch_path(patch_path),
m_patch(NULL)
diff --git a/src/libs/engine/events/DisablePatchEvent.h b/src/libs/engine/events/DisablePatchEvent.h
index 09347b08..42e04e3b 100644
--- a/src/libs/engine/events/DisablePatchEvent.h
+++ b/src/libs/engine/events/DisablePatchEvent.h
@@ -34,7 +34,7 @@ class Patch;
class DisablePatchEvent : public QueuedEvent
{
public:
- DisablePatchEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& patch_path);
+ DisablePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/events/DisconnectNodeEvent.cpp b/src/libs/engine/events/DisconnectNodeEvent.cpp
index 5be1167e..e843e272 100644
--- a/src/libs/engine/events/DisconnectNodeEvent.cpp
+++ b/src/libs/engine/events/DisconnectNodeEvent.cpp
@@ -31,14 +31,14 @@
#include "ClientBroadcaster.h"
#include "util.h"
#include "ObjectStore.h"
-#include "util/Path.h"
+#include "raul/Path.h"
using std::cerr; using std::endl;
namespace Ingen {
-DisconnectNodeEvent::DisconnectNodeEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path)
+DisconnectNodeEvent::DisconnectNodeEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path)
: QueuedEvent(engine, responder, timestamp),
m_node_path(node_path),
m_patch(NULL),
@@ -98,7 +98,7 @@ DisconnectNodeEvent::pre_process()
for (ConnectionListIterator i = m_patch->connections().begin(); i != m_patch->connections().end(); ++i) {
c = (*i);
if ((c->src_port()->parent_node() == m_node || c->dst_port()->parent_node() == m_node) && !c->pending_disconnection()) {
- DisconnectionEvent* ev = new DisconnectionEvent(_engine, CountedPtr<Responder>(new Responder()), _time,
+ DisconnectionEvent* ev = new DisconnectionEvent(_engine, SharedPtr<Responder>(new Responder()), _time,
c->src_port(), c->dst_port());
ev->pre_process();
m_disconnection_events.push_back(new ListNode<DisconnectionEvent*>(ev));
diff --git a/src/libs/engine/events/DisconnectNodeEvent.h b/src/libs/engine/events/DisconnectNodeEvent.h
index 90aeabed..2c706b65 100644
--- a/src/libs/engine/events/DisconnectNodeEvent.h
+++ b/src/libs/engine/events/DisconnectNodeEvent.h
@@ -18,7 +18,7 @@
#define DISCONNECTNODEEVENT_H
#include <string>
-#include "util/Path.h"
+#include "raul/Path.h"
#include "QueuedEvent.h"
#include "List.h"
using std::string;
@@ -42,7 +42,7 @@ template <typename T> class OutputPort;
class DisconnectNodeEvent : public QueuedEvent
{
public:
- DisconnectNodeEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path);
+ DisconnectNodeEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path);
DisconnectNodeEvent(Engine& engine, Node* node);
~DisconnectNodeEvent();
diff --git a/src/libs/engine/events/DisconnectPortEvent.cpp b/src/libs/engine/events/DisconnectPortEvent.cpp
index f6dfa40c..782b4cf4 100644
--- a/src/libs/engine/events/DisconnectPortEvent.cpp
+++ b/src/libs/engine/events/DisconnectPortEvent.cpp
@@ -31,14 +31,14 @@
#include "ClientBroadcaster.h"
#include "util.h"
#include "ObjectStore.h"
-#include "util/Path.h"
+#include "raul/Path.h"
using std::cerr; using std::endl;
namespace Ingen {
-DisconnectPortEvent::DisconnectPortEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path)
+DisconnectPortEvent::DisconnectPortEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path)
: QueuedEvent(engine, responder, timestamp),
m_port_path(port_path),
m_patch(NULL),
@@ -103,7 +103,7 @@ DisconnectPortEvent::pre_process()
for (List<Connection*>::const_iterator i = m_patch->connections().begin(); i != m_patch->connections().end(); ++i) {
c = (*i);
if ((c->src_port() == m_port || c->dst_port() == m_port) && !c->pending_disconnection()) {
- DisconnectionEvent* ev = new DisconnectionEvent(_engine, CountedPtr<Responder>(new Responder()), _time,
+ DisconnectionEvent* ev = new DisconnectionEvent(_engine, SharedPtr<Responder>(new Responder()), _time,
c->src_port(), c->dst_port());
ev->pre_process();
m_disconnection_events.push_back(new ListNode<DisconnectionEvent*>(ev));
diff --git a/src/libs/engine/events/DisconnectPortEvent.h b/src/libs/engine/events/DisconnectPortEvent.h
index 0c185317..42c0d4e9 100644
--- a/src/libs/engine/events/DisconnectPortEvent.h
+++ b/src/libs/engine/events/DisconnectPortEvent.h
@@ -18,7 +18,7 @@
#define DISCONNECTPORTEVENT_H
#include <string>
-#include "util/Path.h"
+#include "raul/Path.h"
#include "QueuedEvent.h"
#include "List.h"
@@ -43,7 +43,7 @@ using std::string;
class DisconnectPortEvent : public QueuedEvent
{
public:
- DisconnectPortEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path);
+ DisconnectPortEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path);
DisconnectPortEvent(Engine& engine, Port* port);
~DisconnectPortEvent();
diff --git a/src/libs/engine/events/DisconnectionEvent.cpp b/src/libs/engine/events/DisconnectionEvent.cpp
index a83e6e3f..ef7046b8 100644
--- a/src/libs/engine/events/DisconnectionEvent.cpp
+++ b/src/libs/engine/events/DisconnectionEvent.cpp
@@ -26,7 +26,7 @@
#include "Port.h"
#include "Maid.h"
#include "ObjectStore.h"
-#include "util/Path.h"
+#include "raul/Path.h"
using std::string;
namespace Ingen {
@@ -35,7 +35,7 @@ namespace Ingen {
//// DisconnectionEvent ////
-DisconnectionEvent::DisconnectionEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path)
+DisconnectionEvent::DisconnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path)
: QueuedEvent(engine, responder, timestamp),
m_src_port_path(src_port_path),
m_dst_port_path(dst_port_path),
@@ -49,7 +49,7 @@ DisconnectionEvent::DisconnectionEvent(Engine& engine, CountedPtr<Responder> res
}
-DisconnectionEvent::DisconnectionEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, Port* const src_port, Port* const dst_port)
+DisconnectionEvent::DisconnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Port* const src_port, Port* const dst_port)
: QueuedEvent(engine, responder, timestamp),
m_src_port_path(src_port->path()),
m_dst_port_path(dst_port->path()),
@@ -160,7 +160,7 @@ DisconnectionEvent::post_process()
template <typename T>
-TypedDisconnectionEvent<T>::TypedDisconnectionEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port)
+TypedDisconnectionEvent<T>::TypedDisconnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port)
: QueuedEvent(engine, responder, timestamp),
m_src_port(src_port),
m_dst_port(dst_port),
diff --git a/src/libs/engine/events/DisconnectionEvent.h b/src/libs/engine/events/DisconnectionEvent.h
index 1dc53d13..499799ae 100644
--- a/src/libs/engine/events/DisconnectionEvent.h
+++ b/src/libs/engine/events/DisconnectionEvent.h
@@ -18,7 +18,7 @@
#define DISCONNECTIONEVENT_H
#include <string>
-#include "util/Path.h"
+#include "raul/Path.h"
#include "QueuedEvent.h"
#include "types.h"
using std::string;
@@ -46,8 +46,8 @@ template <typename T> class TypedDisconnectionEvent; // helper, defined below
class DisconnectionEvent : public QueuedEvent
{
public:
- DisconnectionEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path);
- DisconnectionEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, Port* const src_port, Port* const dst_port);
+ DisconnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& src_port_path, const string& dst_port_path);
+ DisconnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Port* const src_port, Port* const dst_port);
~DisconnectionEvent();
void pre_process();
@@ -82,7 +82,7 @@ template <typename T>
class TypedDisconnectionEvent : public QueuedEvent
{
public:
- TypedDisconnectionEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port);
+ TypedDisconnectionEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, OutputPort<T>* src_port, InputPort<T>* dst_port);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/events/EnablePatchEvent.cpp b/src/libs/engine/events/EnablePatchEvent.cpp
index 3d238372..b4abddf0 100644
--- a/src/libs/engine/events/EnablePatchEvent.cpp
+++ b/src/libs/engine/events/EnablePatchEvent.cpp
@@ -25,7 +25,7 @@
namespace Ingen {
-EnablePatchEvent::EnablePatchEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& patch_path)
+EnablePatchEvent::EnablePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path)
: QueuedEvent(engine, responder, timestamp),
m_patch_path(patch_path),
m_patch(NULL),
diff --git a/src/libs/engine/events/EnablePatchEvent.h b/src/libs/engine/events/EnablePatchEvent.h
index 8e39e3a7..53d2b779 100644
--- a/src/libs/engine/events/EnablePatchEvent.h
+++ b/src/libs/engine/events/EnablePatchEvent.h
@@ -37,7 +37,7 @@ class Node;
class EnablePatchEvent : public QueuedEvent
{
public:
- EnablePatchEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& patch_path);
+ EnablePatchEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& patch_path);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/events/LashRestoreDoneEvent.h b/src/libs/engine/events/LashRestoreDoneEvent.h
index be07bed0..65f21aa1 100644
--- a/src/libs/engine/events/LashRestoreDoneEvent.h
+++ b/src/libs/engine/events/LashRestoreDoneEvent.h
@@ -39,7 +39,7 @@ class Port;
class LashRestoreDoneEvent : public QueuedEvent
{
public:
- LashRestoreDoneEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp) : QueuedEvent(engine, responder, timestamp) {}
+ LashRestoreDoneEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp) : QueuedEvent(engine, responder, timestamp) {}
void post_process()
{
diff --git a/src/libs/engine/events/LoadPluginsEvent.cpp b/src/libs/engine/events/LoadPluginsEvent.cpp
index daf61378..663b39a7 100644
--- a/src/libs/engine/events/LoadPluginsEvent.cpp
+++ b/src/libs/engine/events/LoadPluginsEvent.cpp
@@ -26,7 +26,7 @@ using std::cerr;
namespace Ingen {
-LoadPluginsEvent::LoadPluginsEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp)
+LoadPluginsEvent::LoadPluginsEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp)
: QueuedEvent(engine, responder, timestamp)
{
}
diff --git a/src/libs/engine/events/LoadPluginsEvent.h b/src/libs/engine/events/LoadPluginsEvent.h
index a143d812..d9c0a34d 100644
--- a/src/libs/engine/events/LoadPluginsEvent.h
+++ b/src/libs/engine/events/LoadPluginsEvent.h
@@ -32,7 +32,7 @@ class Plugin;
class LoadPluginsEvent : public QueuedEvent
{
public:
- LoadPluginsEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp);
+ LoadPluginsEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp);
void pre_process();
void post_process();
diff --git a/src/libs/engine/events/MidiLearnEvent.cpp b/src/libs/engine/events/MidiLearnEvent.cpp
index c56db8d8..b36a5363 100644
--- a/src/libs/engine/events/MidiLearnEvent.cpp
+++ b/src/libs/engine/events/MidiLearnEvent.cpp
@@ -37,7 +37,7 @@ MidiLearnResponseEvent::post_process()
// MidiLearnEvent
-MidiLearnEvent::MidiLearnEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path)
+MidiLearnEvent::MidiLearnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path)
: QueuedEvent(engine, responder, timestamp),
m_node_path(node_path),
m_node(NULL),
diff --git a/src/libs/engine/events/MidiLearnEvent.h b/src/libs/engine/events/MidiLearnEvent.h
index 8c4ed6d2..a6eb7d2d 100644
--- a/src/libs/engine/events/MidiLearnEvent.h
+++ b/src/libs/engine/events/MidiLearnEvent.h
@@ -38,7 +38,7 @@ class MidiLearnResponseEvent : public Event
{
public:
MidiLearnResponseEvent(Engine& engine, const string& port_path, SampleCount timestamp)
- : Event(engine, CountedPtr<Responder>(), timestamp),
+ : Event(engine, SharedPtr<Responder>(), timestamp),
m_port_path(port_path),
m_value(0.0f)
{}
@@ -64,7 +64,7 @@ private:
class MidiLearnEvent : public QueuedEvent
{
public:
- MidiLearnEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path);
+ MidiLearnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/events/NoteOffEvent.cpp b/src/libs/engine/events/NoteOffEvent.cpp
index 26f3a324..adc7ac56 100644
--- a/src/libs/engine/events/NoteOffEvent.cpp
+++ b/src/libs/engine/events/NoteOffEvent.cpp
@@ -27,7 +27,7 @@ namespace Ingen {
/** Note off with patch explicitly passed - triggered by MIDI.
*/
-NoteOffEvent::NoteOffEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, Node* node, uchar note_num)
+NoteOffEvent::NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Node* node, uchar note_num)
: Event(engine, responder, timestamp),
m_node(node),
m_note_num(note_num)
@@ -37,7 +37,7 @@ NoteOffEvent::NoteOffEvent(Engine& engine, CountedPtr<Responder> responder, Samp
/** Note off event with lookup - triggered by OSC.
*/
-NoteOffEvent::NoteOffEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num)
+NoteOffEvent::NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num)
: Event(engine, responder, timestamp),
m_node(NULL),
m_node_path(node_path),
diff --git a/src/libs/engine/events/NoteOffEvent.h b/src/libs/engine/events/NoteOffEvent.h
index e3e9a56b..35706f26 100644
--- a/src/libs/engine/events/NoteOffEvent.h
+++ b/src/libs/engine/events/NoteOffEvent.h
@@ -34,8 +34,8 @@ class Node;
class NoteOffEvent : public Event
{
public:
- NoteOffEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, Node* node, uchar note_num);
- NoteOffEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num);
+ NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Node* node, uchar note_num);
+ NoteOffEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num);
void execute(SampleCount nframes, FrameTime start, FrameTime end);
void post_process();
diff --git a/src/libs/engine/events/NoteOnEvent.cpp b/src/libs/engine/events/NoteOnEvent.cpp
index 540bc618..f94ebb97 100644
--- a/src/libs/engine/events/NoteOnEvent.cpp
+++ b/src/libs/engine/events/NoteOnEvent.cpp
@@ -30,7 +30,7 @@ namespace Ingen {
*
* Used to be triggered by MIDI. Not used anymore.
*/
-NoteOnEvent::NoteOnEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, Node* patch, uchar note_num, uchar velocity)
+NoteOnEvent::NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Node* patch, uchar note_num, uchar velocity)
: Event(engine, responder, timestamp),
m_node(patch),
m_note_num(note_num),
@@ -44,7 +44,7 @@ NoteOnEvent::NoteOnEvent(Engine& engine, CountedPtr<Responder> responder, Sample
*
* Triggered by OSC.
*/
-NoteOnEvent::NoteOnEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num, uchar velocity)
+NoteOnEvent::NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num, uchar velocity)
: Event(engine, responder, timestamp),
m_node(NULL),
m_node_path(node_path),
diff --git a/src/libs/engine/events/NoteOnEvent.h b/src/libs/engine/events/NoteOnEvent.h
index 92ffbca5..f7bceb4a 100644
--- a/src/libs/engine/events/NoteOnEvent.h
+++ b/src/libs/engine/events/NoteOnEvent.h
@@ -34,8 +34,8 @@ class Node;
class NoteOnEvent : public Event
{
public:
- NoteOnEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, Node* patch, uchar note_num, uchar velocity);
- NoteOnEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num, uchar velocity);
+ NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, Node* patch, uchar note_num, uchar velocity);
+ NoteOnEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, uchar note_num, uchar velocity);
void execute(SampleCount nframes, FrameTime start, FrameTime end);
void post_process();
diff --git a/src/libs/engine/events/PingQueuedEvent.h b/src/libs/engine/events/PingQueuedEvent.h
index 883ee818..b505e4ce 100644
--- a/src/libs/engine/events/PingQueuedEvent.h
+++ b/src/libs/engine/events/PingQueuedEvent.h
@@ -34,7 +34,7 @@ class Port;
class PingQueuedEvent : public QueuedEvent
{
public:
- PingQueuedEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp) : QueuedEvent(engine, responder, timestamp) {}
+ PingQueuedEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp) : QueuedEvent(engine, responder, timestamp) {}
void post_process() { _responder->respond_ok(); }
};
diff --git a/src/libs/engine/events/RegisterClientEvent.cpp b/src/libs/engine/events/RegisterClientEvent.cpp
index 81cb3b81..afe713e2 100644
--- a/src/libs/engine/events/RegisterClientEvent.cpp
+++ b/src/libs/engine/events/RegisterClientEvent.cpp
@@ -22,10 +22,10 @@
namespace Ingen {
-RegisterClientEvent::RegisterClientEvent(Engine& engine, CountedPtr<Responder> responder,
+RegisterClientEvent::RegisterClientEvent(Engine& engine, SharedPtr<Responder> responder,
SampleCount timestamp,
ClientKey key,
- CountedPtr<ClientInterface> client)
+ SharedPtr<ClientInterface> client)
: QueuedEvent(engine, responder, timestamp)
, _key(key)
, _client(client)
diff --git a/src/libs/engine/events/RegisterClientEvent.h b/src/libs/engine/events/RegisterClientEvent.h
index d68a0f83..eac92185 100644
--- a/src/libs/engine/events/RegisterClientEvent.h
+++ b/src/libs/engine/events/RegisterClientEvent.h
@@ -35,17 +35,17 @@ namespace Ingen {
class RegisterClientEvent : public QueuedEvent
{
public:
- RegisterClientEvent(Engine& engine, CountedPtr<Responder> responder,
+ RegisterClientEvent(Engine& engine, SharedPtr<Responder> responder,
SampleCount timestamp,
ClientKey key,
- CountedPtr<ClientInterface> client);
+ SharedPtr<ClientInterface> client);
void pre_process();
void post_process();
private:
ClientKey _key;
- CountedPtr<ClientInterface> _client;
+ SharedPtr<ClientInterface> _client;
};
diff --git a/src/libs/engine/events/RenameEvent.cpp b/src/libs/engine/events/RenameEvent.cpp
index 75db4395..f7b9bcf8 100644
--- a/src/libs/engine/events/RenameEvent.cpp
+++ b/src/libs/engine/events/RenameEvent.cpp
@@ -21,13 +21,13 @@
#include "Tree.h"
#include "Engine.h"
#include "ClientBroadcaster.h"
-#include "util/Path.h"
+#include "raul/Path.h"
#include "ObjectStore.h"
namespace Ingen {
-RenameEvent::RenameEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& name)
+RenameEvent::RenameEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& name)
: QueuedEvent(engine, responder, timestamp),
m_old_path(path),
m_name(name),
diff --git a/src/libs/engine/events/RenameEvent.h b/src/libs/engine/events/RenameEvent.h
index fd01820b..cf866fb9 100644
--- a/src/libs/engine/events/RenameEvent.h
+++ b/src/libs/engine/events/RenameEvent.h
@@ -18,7 +18,7 @@
#define RENAMEEVENT_H
#include "QueuedEvent.h"
-#include "util/Path.h"
+#include "raul/Path.h"
#include <string>
using std::string;
@@ -42,7 +42,7 @@ class DisconnectPortEvent;
class RenameEvent : public QueuedEvent
{
public:
- RenameEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& name);
+ RenameEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& name);
~RenameEvent();
void pre_process();
diff --git a/src/libs/engine/events/RequestAllObjectsEvent.cpp b/src/libs/engine/events/RequestAllObjectsEvent.cpp
index 893aa5df..3c164ce2 100644
--- a/src/libs/engine/events/RequestAllObjectsEvent.cpp
+++ b/src/libs/engine/events/RequestAllObjectsEvent.cpp
@@ -24,7 +24,7 @@
namespace Ingen {
-RequestAllObjectsEvent::RequestAllObjectsEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp)
+RequestAllObjectsEvent::RequestAllObjectsEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp)
: QueuedEvent(engine, responder, timestamp)
{
}
diff --git a/src/libs/engine/events/RequestAllObjectsEvent.h b/src/libs/engine/events/RequestAllObjectsEvent.h
index 7651700f..46d22aab 100644
--- a/src/libs/engine/events/RequestAllObjectsEvent.h
+++ b/src/libs/engine/events/RequestAllObjectsEvent.h
@@ -35,13 +35,13 @@ namespace Shared {
class RequestAllObjectsEvent : public QueuedEvent
{
public:
- RequestAllObjectsEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp);
+ RequestAllObjectsEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp);
void pre_process();
void post_process();
private:
- CountedPtr<ClientInterface> m_client;
+ SharedPtr<ClientInterface> m_client;
};
diff --git a/src/libs/engine/events/RequestMetadataEvent.cpp b/src/libs/engine/events/RequestMetadataEvent.cpp
index aaea89c6..9437ccbf 100644
--- a/src/libs/engine/events/RequestMetadataEvent.cpp
+++ b/src/libs/engine/events/RequestMetadataEvent.cpp
@@ -27,12 +27,12 @@ using std::string;
namespace Ingen {
-RequestMetadataEvent::RequestMetadataEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key)
+RequestMetadataEvent::RequestMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& node_path, const string& key)
: QueuedEvent(engine, responder, timestamp),
m_path(node_path),
m_key(key),
m_object(NULL),
- m_client(CountedPtr<ClientInterface>())
+ m_client(SharedPtr<ClientInterface>())
{
}
diff --git a/src/libs/engine/events/RequestMetadataEvent.h b/src/libs/engine/events/RequestMetadataEvent.h
index f4296ac2..23db4faf 100644
--- a/src/libs/engine/events/RequestMetadataEvent.h
+++ b/src/libs/engine/events/RequestMetadataEvent.h
@@ -19,7 +19,7 @@
#include <string>
#include "QueuedEvent.h"
-#include "util/Atom.h"
+#include "raul/Atom.h"
using std::string;
namespace Ingen {
@@ -37,7 +37,7 @@ namespace Shared {
class RequestMetadataEvent : public QueuedEvent
{
public:
- RequestMetadataEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key);
+ RequestMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key);
void pre_process();
void post_process();
@@ -47,7 +47,7 @@ private:
string m_key;
Atom m_value;
GraphObject* m_object;
- CountedPtr<ClientInterface> m_client;
+ SharedPtr<ClientInterface> m_client;
};
diff --git a/src/libs/engine/events/RequestObjectEvent.cpp b/src/libs/engine/events/RequestObjectEvent.cpp
index 3b0dc6fd..cd63f28e 100644
--- a/src/libs/engine/events/RequestObjectEvent.cpp
+++ b/src/libs/engine/events/RequestObjectEvent.cpp
@@ -31,7 +31,7 @@ using std::string;
namespace Ingen {
-RequestObjectEvent::RequestObjectEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& path)
+RequestObjectEvent::RequestObjectEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path)
: QueuedEvent(engine, responder, timestamp),
m_path(path),
m_object(NULL)
diff --git a/src/libs/engine/events/RequestObjectEvent.h b/src/libs/engine/events/RequestObjectEvent.h
index 276b60fa..b6041d2e 100644
--- a/src/libs/engine/events/RequestObjectEvent.h
+++ b/src/libs/engine/events/RequestObjectEvent.h
@@ -37,7 +37,7 @@ using Shared::ClientInterface;
class RequestObjectEvent : public QueuedEvent
{
public:
- RequestObjectEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path);
+ RequestObjectEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
@@ -46,7 +46,7 @@ public:
private:
string m_path;
GraphObject* m_object;
- CountedPtr<ClientInterface> m_client;
+ SharedPtr<ClientInterface> m_client;
};
diff --git a/src/libs/engine/events/RequestPluginEvent.cpp b/src/libs/engine/events/RequestPluginEvent.cpp
index 95141226..4b509f78 100644
--- a/src/libs/engine/events/RequestPluginEvent.cpp
+++ b/src/libs/engine/events/RequestPluginEvent.cpp
@@ -30,7 +30,7 @@ using std::string;
namespace Ingen {
-RequestPluginEvent::RequestPluginEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& uri)
+RequestPluginEvent::RequestPluginEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& uri)
: QueuedEvent(engine, responder, timestamp),
m_uri(uri),
m_plugin(NULL)
diff --git a/src/libs/engine/events/RequestPluginEvent.h b/src/libs/engine/events/RequestPluginEvent.h
index 1c12c78e..8833f842 100644
--- a/src/libs/engine/events/RequestPluginEvent.h
+++ b/src/libs/engine/events/RequestPluginEvent.h
@@ -37,7 +37,7 @@ using Shared::ClientInterface;
class RequestPluginEvent : public QueuedEvent
{
public:
- RequestPluginEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& uri);
+ RequestPluginEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& uri);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
@@ -46,7 +46,7 @@ public:
private:
string m_uri;
const Plugin* m_plugin;
- CountedPtr<ClientInterface> m_client;
+ SharedPtr<ClientInterface> m_client;
};
diff --git a/src/libs/engine/events/RequestPluginsEvent.cpp b/src/libs/engine/events/RequestPluginsEvent.cpp
index 789be0ea..da726e13 100644
--- a/src/libs/engine/events/RequestPluginsEvent.cpp
+++ b/src/libs/engine/events/RequestPluginsEvent.cpp
@@ -23,7 +23,7 @@
namespace Ingen {
-RequestPluginsEvent::RequestPluginsEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp)
+RequestPluginsEvent::RequestPluginsEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp)
: QueuedEvent(engine, responder, timestamp)
{
}
diff --git a/src/libs/engine/events/RequestPluginsEvent.h b/src/libs/engine/events/RequestPluginsEvent.h
index cd2d05fc..6355c037 100644
--- a/src/libs/engine/events/RequestPluginsEvent.h
+++ b/src/libs/engine/events/RequestPluginsEvent.h
@@ -38,13 +38,13 @@ namespace Shared {
class RequestPluginsEvent : public QueuedEvent
{
public:
- RequestPluginsEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp);
+ RequestPluginsEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp);
void pre_process();
void post_process();
private:
- CountedPtr<ClientInterface> m_client;
+ SharedPtr<ClientInterface> m_client;
std::list<Plugin*> m_plugins;
};
diff --git a/src/libs/engine/events/RequestPortValueEvent.cpp b/src/libs/engine/events/RequestPortValueEvent.cpp
index 55f4731f..a3346086 100644
--- a/src/libs/engine/events/RequestPortValueEvent.cpp
+++ b/src/libs/engine/events/RequestPortValueEvent.cpp
@@ -28,7 +28,7 @@ using std::string;
namespace Ingen {
-RequestPortValueEvent::RequestPortValueEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path)
+RequestPortValueEvent::RequestPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path)
: QueuedEvent(engine, responder, timestamp),
m_port_path(port_path),
m_port(NULL),
diff --git a/src/libs/engine/events/RequestPortValueEvent.h b/src/libs/engine/events/RequestPortValueEvent.h
index 204f1911..55831f31 100644
--- a/src/libs/engine/events/RequestPortValueEvent.h
+++ b/src/libs/engine/events/RequestPortValueEvent.h
@@ -37,7 +37,7 @@ using Shared::ClientInterface;
class RequestPortValueEvent : public QueuedEvent
{
public:
- RequestPortValueEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path);
+ RequestPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
@@ -47,7 +47,7 @@ private:
string m_port_path;
Port* m_port;
Sample m_value;
- CountedPtr<ClientInterface> m_client;
+ SharedPtr<ClientInterface> m_client;
};
diff --git a/src/libs/engine/events/SetMetadataEvent.cpp b/src/libs/engine/events/SetMetadataEvent.cpp
index c4937df5..ba3d88e9 100644
--- a/src/libs/engine/events/SetMetadataEvent.cpp
+++ b/src/libs/engine/events/SetMetadataEvent.cpp
@@ -27,7 +27,7 @@ using std::string;
namespace Ingen {
-SetMetadataEvent::SetMetadataEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key, const Atom& value)
+SetMetadataEvent::SetMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key, const Atom& value)
: QueuedEvent(engine, responder, timestamp),
m_path(path),
m_key(key),
diff --git a/src/libs/engine/events/SetMetadataEvent.h b/src/libs/engine/events/SetMetadataEvent.h
index b78f2502..a795a115 100644
--- a/src/libs/engine/events/SetMetadataEvent.h
+++ b/src/libs/engine/events/SetMetadataEvent.h
@@ -19,7 +19,7 @@
#include <string>
#include "QueuedEvent.h"
-#include "util/Atom.h"
+#include "raul/Atom.h"
using std::string;
@@ -35,7 +35,7 @@ class GraphObject;
class SetMetadataEvent : public QueuedEvent
{
public:
- SetMetadataEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key, const Atom& value);
+ SetMetadataEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& path, const string& key, const Atom& value);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/events/SetPortValueEvent.cpp b/src/libs/engine/events/SetPortValueEvent.cpp
index 41395feb..417cab32 100644
--- a/src/libs/engine/events/SetPortValueEvent.cpp
+++ b/src/libs/engine/events/SetPortValueEvent.cpp
@@ -27,7 +27,7 @@ namespace Ingen {
/** Voice-specific control setting
*/
-SetPortValueEvent::SetPortValueEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val)
+SetPortValueEvent::SetPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val)
: Event(engine, responder, timestamp),
m_voice_num(voice_num),
m_port_path(port_path),
@@ -38,7 +38,7 @@ SetPortValueEvent::SetPortValueEvent(Engine& engine, CountedPtr<Responder> respo
}
-SetPortValueEvent::SetPortValueEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val)
+SetPortValueEvent::SetPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val)
: Event(engine, responder, timestamp),
m_voice_num(-1),
m_port_path(port_path),
diff --git a/src/libs/engine/events/SetPortValueEvent.h b/src/libs/engine/events/SetPortValueEvent.h
index 2572df55..ed4bb86e 100644
--- a/src/libs/engine/events/SetPortValueEvent.h
+++ b/src/libs/engine/events/SetPortValueEvent.h
@@ -34,8 +34,8 @@ class Port;
class SetPortValueEvent : public Event
{
public:
- SetPortValueEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val);
- SetPortValueEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val);
+ SetPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val);
+ SetPortValueEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val);
void execute(SampleCount nframes, FrameTime start, FrameTime end);
void post_process();
diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.cpp b/src/libs/engine/events/SetPortValueQueuedEvent.cpp
index 21ccf214..2d7deeef 100644
--- a/src/libs/engine/events/SetPortValueQueuedEvent.cpp
+++ b/src/libs/engine/events/SetPortValueQueuedEvent.cpp
@@ -28,7 +28,7 @@ namespace Ingen {
/** Voice-specific control setting
*/
-SetPortValueQueuedEvent::SetPortValueQueuedEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val)
+SetPortValueQueuedEvent::SetPortValueQueuedEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val)
: QueuedEvent(engine, responder, timestamp),
m_voice_num(voice_num),
m_port_path(port_path),
@@ -39,7 +39,7 @@ SetPortValueQueuedEvent::SetPortValueQueuedEvent(Engine& engine, CountedPtr<Resp
}
-SetPortValueQueuedEvent::SetPortValueQueuedEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val)
+SetPortValueQueuedEvent::SetPortValueQueuedEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val)
: QueuedEvent(engine, responder, timestamp),
m_voice_num(-1),
m_port_path(port_path),
diff --git a/src/libs/engine/events/SetPortValueQueuedEvent.h b/src/libs/engine/events/SetPortValueQueuedEvent.h
index dc5add84..118899dd 100644
--- a/src/libs/engine/events/SetPortValueQueuedEvent.h
+++ b/src/libs/engine/events/SetPortValueQueuedEvent.h
@@ -34,8 +34,8 @@ class Port;
class SetPortValueQueuedEvent : public QueuedEvent
{
public:
- SetPortValueQueuedEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val);
- SetPortValueQueuedEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val);
+ SetPortValueQueuedEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, const string& port_path, Sample val);
+ SetPortValueQueuedEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, size_t voice_num, const string& port_path, Sample val);
void pre_process();
void execute(SampleCount nframes, FrameTime start, FrameTime end);
diff --git a/src/libs/engine/events/UnregisterClientEvent.cpp b/src/libs/engine/events/UnregisterClientEvent.cpp
index 310df7c5..40c33cc0 100644
--- a/src/libs/engine/events/UnregisterClientEvent.cpp
+++ b/src/libs/engine/events/UnregisterClientEvent.cpp
@@ -23,7 +23,7 @@
namespace Ingen {
-UnregisterClientEvent::UnregisterClientEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, ClientKey key)
+UnregisterClientEvent::UnregisterClientEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, ClientKey key)
: QueuedEvent(engine, responder, timestamp)
, _key(key)
{
diff --git a/src/libs/engine/events/UnregisterClientEvent.h b/src/libs/engine/events/UnregisterClientEvent.h
index 29166345..82c02a0e 100644
--- a/src/libs/engine/events/UnregisterClientEvent.h
+++ b/src/libs/engine/events/UnregisterClientEvent.h
@@ -39,7 +39,7 @@ using Shared::ClientKey;
class UnregisterClientEvent : public QueuedEvent
{
public:
- UnregisterClientEvent(Engine& engine, CountedPtr<Responder> responder, SampleCount timestamp, ClientKey key);
+ UnregisterClientEvent(Engine& engine, SharedPtr<Responder> responder, SampleCount timestamp, ClientKey key);
void post_process();
diff --git a/src/progs/demolition/demolition.cpp b/src/progs/demolition/demolition.cpp
index 3693b5f3..abecd1c5 100644
--- a/src/progs/demolition/demolition.cpp
+++ b/src/progs/demolition/demolition.cpp
@@ -22,7 +22,7 @@
#include "Store.h"
#include "PatchLibrarian.h"
#include "PluginModel.h"
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include <iostream>
#include <unistd.h>
#include <stdlib.h>
@@ -49,8 +49,8 @@ void rename_object();
// Yay globals!
-CountedPtr<OSCModelEngineInterface> engine;
-CountedPtr<Store> store;
+SharedPtr<OSCModelEngineInterface> engine;
+SharedPtr<Store> store;
// OSC listening non-threaded signal emitter
@@ -88,10 +88,10 @@ main(int argc, char** argv)
else
client_port = 0; // will choose a free port automatically
- engine = CountedPtr<ModelEngineInterface>(new OSCModelEngineInterface(engine_url));
- CountedPtr<SigClientInterface> emitter(new OSCSigEmitter(16182));
+ engine = SharedPtr<ModelEngineInterface>(new OSCModelEngineInterface(engine_url));
+ SharedPtr<SigClientInterface> emitter(new OSCSigEmitter(16182));
- store = CountedPtr<Store>(new Store(engine, emitter));
+ store = SharedPtr<Store>(new Store(engine, emitter));
engine->activate();
@@ -170,7 +170,7 @@ random_name()
Path
random_object()
{
- typedef map<Path, CountedPtr<ObjectModel> > ObjectMap;
+ typedef map<Path, SharedPtr<ObjectModel> > ObjectMap;
const ObjectMap& objects = store->objects();
@@ -190,7 +190,7 @@ random_object()
string
random_plugin()
{
- typedef map<string, CountedPtr<PluginModel> > PluginMap;
+ typedef map<string, SharedPtr<PluginModel> > PluginMap;
const PluginMap& plugins = store->plugins();
diff --git a/src/progs/ingenuity/App.cpp b/src/progs/ingenuity/App.cpp
index 55cab815..4e58a9dd 100644
--- a/src/progs/ingenuity/App.cpp
+++ b/src/progs/ingenuity/App.cpp
@@ -30,7 +30,7 @@
#include "MessagesWindow.h"
#include "ConfigWindow.h"
#include "GladeFactory.h"
-#include "util/Path.h"
+#include "raul/Path.h"
#include "ObjectModel.h"
#include "PatchModel.h"
#include "PatchTreeWindow.h"
@@ -90,7 +90,7 @@ App::instantiate()
void
-App::attach(const CountedPtr<ModelEngineInterface>& engine, const CountedPtr<SigClientInterface>& client)
+App::attach(const SharedPtr<ModelEngineInterface>& engine, const SharedPtr<SigClientInterface>& client)
{
assert( ! _engine);
assert( ! _client);
diff --git a/src/progs/ingenuity/App.h b/src/progs/ingenuity/App.h
index 553175fb..282958b9 100644
--- a/src/progs/ingenuity/App.h
+++ b/src/progs/ingenuity/App.h
@@ -25,7 +25,7 @@
#include <libgnomecanvasmm.h>
#include <gtkmm.h>
#include <libglademm.h>
-#include <util/CountedPtr.h>
+#include <raul/SharedPtr.h>
using std::string; using std::map; using std::list;
using std::cerr; using std::endl;
@@ -80,8 +80,8 @@ public:
int num_open_patch_windows();
- void attach(const CountedPtr<ModelEngineInterface>& engine,
- const CountedPtr<SigClientInterface>& client);
+ void attach(const SharedPtr<ModelEngineInterface>& engine,
+ const SharedPtr<SigClientInterface>& client);
ConnectWindow* connect_window() const { return _connect_window; }
Gtk::Dialog* about_dialog() const { return _about_dialog; }
@@ -93,8 +93,8 @@ public:
Loader* loader() const { return _loader; }
WindowFactory* window_factory() const { return _window_factory; }
- const CountedPtr<ModelEngineInterface>& engine() const { return _engine; }
- const CountedPtr<SigClientInterface>& client() const { return _client; }
+ const SharedPtr<ModelEngineInterface>& engine() const { return _engine; }
+ const SharedPtr<SigClientInterface>& client() const { return _client; }
static inline App& instance() { assert(_instance); return *_instance; }
static void instantiate();
@@ -103,8 +103,8 @@ protected:
App();
static App* _instance;
- CountedPtr<ModelEngineInterface> _engine;
- CountedPtr<SigClientInterface> _client;
+ SharedPtr<ModelEngineInterface> _engine;
+ SharedPtr<SigClientInterface> _client;
Store* _store;
Loader* _loader;
diff --git a/src/progs/ingenuity/BreadCrumb.h b/src/progs/ingenuity/BreadCrumb.h
index 908e0f80..a8242672 100644
--- a/src/progs/ingenuity/BreadCrumb.h
+++ b/src/progs/ingenuity/BreadCrumb.h
@@ -18,8 +18,8 @@
#define BREADCRUMB_H
#include <gtkmm.h>
-#include "util/Path.h"
-#include "util/CountedPtr.h"
+#include "raul/Path.h"
+#include "raul/SharedPtr.h"
#include "PatchView.h"
namespace Ingenuity {
@@ -37,7 +37,7 @@ namespace Ingenuity {
class BreadCrumb : public Gtk::ToggleButton
{
public:
- BreadCrumb(const Path& path, CountedPtr<PatchView> view = CountedPtr<PatchView>())
+ BreadCrumb(const Path& path, SharedPtr<PatchView> view = SharedPtr<PatchView>())
: _path(path)
, _view(view)
{
@@ -47,13 +47,13 @@ public:
show_all();
}
- void set_view(CountedPtr<PatchView> view) {
+ void set_view(SharedPtr<PatchView> view) {
assert( !view || view->patch()->path() == _path);
_view = view;
}
const Path& path() const { return _path; }
- CountedPtr<PatchView> view() const { return _view; }
+ SharedPtr<PatchView> view() const { return _view; }
void set_path(const Path& path)
{
@@ -70,7 +70,7 @@ public:
private:
Path _path;
- CountedPtr<PatchView> _view;
+ SharedPtr<PatchView> _view;
};
} // namespace Ingenuity
diff --git a/src/progs/ingenuity/BreadCrumbBox.cpp b/src/progs/ingenuity/BreadCrumbBox.cpp
index 5fa5eb6e..88772953 100644
--- a/src/progs/ingenuity/BreadCrumbBox.cpp
+++ b/src/progs/ingenuity/BreadCrumbBox.cpp
@@ -28,14 +28,14 @@ BreadCrumbBox::BreadCrumbBox()
}
-CountedPtr<PatchView>
+SharedPtr<PatchView>
BreadCrumbBox::view(const Path& path)
{
for (std::list<BreadCrumb*>::const_iterator i = _breadcrumbs.begin(); i != _breadcrumbs.end(); ++i)
if ((*i)->path() == path)
return (*i)->view();
- return CountedPtr<PatchView>();
+ return SharedPtr<PatchView>();
}
@@ -45,7 +45,7 @@ BreadCrumbBox::view(const Path& path)
* children preserved.
*/
void
-BreadCrumbBox::build(Path path, CountedPtr<PatchView> view)
+BreadCrumbBox::build(Path path, SharedPtr<PatchView> view)
{
bool old_enable_signal = _enable_signal;
_enable_signal = false;
@@ -130,10 +130,10 @@ BreadCrumbBox::build(Path path, CountedPtr<PatchView> view)
*/
BreadCrumb*
BreadCrumbBox::create_crumb(const Path& path,
- CountedPtr<PatchView> view)
+ SharedPtr<PatchView> view)
{
BreadCrumb* but = manage(new BreadCrumb(path,
- (view && path == view->patch()->path()) ? view : CountedPtr<PatchView>()));
+ (view && path == view->patch()->path()) ? view : SharedPtr<PatchView>()));
but->signal_toggled().connect(sigc::bind(sigc::mem_fun(
this, &BreadCrumbBox::breadcrumb_clicked), but));
diff --git a/src/progs/ingenuity/BreadCrumbBox.h b/src/progs/ingenuity/BreadCrumbBox.h
index 93af05a3..13577bb7 100644
--- a/src/progs/ingenuity/BreadCrumbBox.h
+++ b/src/progs/ingenuity/BreadCrumbBox.h
@@ -21,8 +21,8 @@
#include <gtkmm.h>
#include <libglademm/xml.h>
#include <libglademm.h>
-#include "util/Path.h"
-#include "util/CountedPtr.h"
+#include "raul/Path.h"
+#include "raul/SharedPtr.h"
#include "PatchView.h"
namespace Ingenuity {
@@ -41,15 +41,15 @@ class BreadCrumbBox : public Gtk::HBox
public:
BreadCrumbBox();
- CountedPtr<PatchView> view(const Path& path);
+ SharedPtr<PatchView> view(const Path& path);
- void build(Path path, CountedPtr<PatchView> view);
+ void build(Path path, SharedPtr<PatchView> view);
- sigc::signal<void, const Path&, CountedPtr<PatchView> > signal_patch_selected;
+ sigc::signal<void, const Path&, SharedPtr<PatchView> > signal_patch_selected;
private:
BreadCrumb* create_crumb(const Path& path,
- CountedPtr<PatchView> view = CountedPtr<PatchView>());
+ SharedPtr<PatchView> view = SharedPtr<PatchView>());
void breadcrumb_clicked(BreadCrumb* crumb);
diff --git a/src/progs/ingenuity/ConnectWindow.cpp b/src/progs/ingenuity/ConnectWindow.cpp
index 256be92f..c2c746bf 100644
--- a/src/progs/ingenuity/ConnectWindow.cpp
+++ b/src/progs/ingenuity/ConnectWindow.cpp
@@ -54,7 +54,7 @@ struct OSCSigEmitter : public OSCClientReceiver, public ThreadedSigClientInterfa
struct QueuedModelEngineInterface : public QueuedEngineInterface, public ModelEngineInterface {
- QueuedModelEngineInterface(CountedPtr<Ingen::Engine> engine)
+ QueuedModelEngineInterface(SharedPtr<Ingen::Engine> engine)
: Ingen::Shared::EngineInterface()
, Ingen::QueuedEngineInterface(engine, Ingen::event_queue_size, Ingen::event_queue_size)
{
@@ -138,9 +138,9 @@ ConnectWindow::connect()
_connect_button->set_sensitive(false);
if (_mode == CONNECT_REMOTE) {
- CountedPtr<ModelEngineInterface> engine(new OSCModelEngineInterface(_url_entry->get_text()));
+ SharedPtr<ModelEngineInterface> engine(new OSCModelEngineInterface(_url_entry->get_text()));
OSCSigEmitter* ose = new OSCSigEmitter(1024, 16181); // FIXME: args
- CountedPtr<SigClientInterface> client(ose);
+ SharedPtr<SigClientInterface> client(ose);
App::instance().attach(engine, client);
Glib::signal_timeout().connect(
@@ -168,15 +168,15 @@ ConnectWindow::connect()
throw;
#ifdef MONOLITHIC_INGENUITY
} else if (_mode == INTERNAL) {
- CountedPtr<Ingen::Engine> engine(new Ingen::Engine());
+ SharedPtr<Ingen::Engine> engine(new Ingen::Engine());
QueuedModelEngineInterface* qmei = new QueuedModelEngineInterface(engine);
- CountedPtr<ModelEngineInterface> engine_interface(qmei);
+ SharedPtr<ModelEngineInterface> engine_interface(qmei);
ThreadedSigClientInterface* tsci = new ThreadedSigClientInterface(Ingen::event_queue_size);
- CountedPtr<SigClientInterface> client(tsci);
+ SharedPtr<SigClientInterface> client(tsci);
App::instance().attach(engine_interface, client);
- qmei->set_responder(CountedPtr<Ingen::Responder>(new Ingen::DirectResponder(client, 1)));
+ qmei->set_responder(SharedPtr<Ingen::Responder>(new Ingen::DirectResponder(client, 1)));
engine->set_event_source(qmei);
Glib::signal_timeout().connect(
@@ -348,7 +348,7 @@ ConnectWindow::gtk_callback()
++stage;
} else if (stage == 7) {
if (App::instance().store()->objects().size() > 0) {
- CountedPtr<PatchModel> root = PtrCast<PatchModel>(App::instance().store()->object("/"));
+ SharedPtr<PatchModel> root = PtrCast<PatchModel>(App::instance().store()->object("/"));
assert(root);
App::instance().window_factory()->present_patch(root);
++stage;
diff --git a/src/progs/ingenuity/ConnectWindow.h b/src/progs/ingenuity/ConnectWindow.h
index d74f6032..2fc8e957 100644
--- a/src/progs/ingenuity/ConnectWindow.h
+++ b/src/progs/ingenuity/ConnectWindow.h
@@ -20,7 +20,7 @@
#include <gtkmm.h>
#include <libglademm/xml.h>
#include <libglademm.h>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "ThreadedSigClientInterface.h"
using Ingen::Client::SigClientInterface;
diff --git a/src/progs/ingenuity/Connection.h b/src/progs/ingenuity/Connection.h
index 08e37e57..1681c061 100644
--- a/src/progs/ingenuity/Connection.h
+++ b/src/progs/ingenuity/Connection.h
@@ -21,7 +21,7 @@
#include <string>
#include <flowcanvas/Connection.h>
#include "ConnectionModel.h"
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
using Ingen::Client::ConnectionModel;
namespace Ingenuity {
@@ -44,10 +44,10 @@ public:
virtual ~Connection() {}
- CountedPtr<ConnectionModel> model() const { return m_connection_model; }
+ SharedPtr<ConnectionModel> model() const { return m_connection_model; }
private:
- CountedPtr<ConnectionModel> m_connection_model;
+ SharedPtr<ConnectionModel> m_connection_model;
};
diff --git a/src/progs/ingenuity/ControlGroups.cpp b/src/progs/ingenuity/ControlGroups.cpp
index 9b809cff..c2cc25a0 100644
--- a/src/progs/ingenuity/ControlGroups.cpp
+++ b/src/progs/ingenuity/ControlGroups.cpp
@@ -31,7 +31,7 @@ namespace Ingenuity {
// ////////////////////// ControlGroup ///////////////////////////////// //
-ControlGroup::ControlGroup(ControlPanel* panel, CountedPtr<PortModel> pm, bool separator)
+ControlGroup::ControlGroup(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator)
: Gtk::VBox(false, 0),
m_control_panel(panel),
m_port_model(pm),
@@ -64,7 +64,7 @@ ControlGroup::metadata_update(const string& key, const Atom& value)
// ////////////////// SliderControlGroup ////////////////////// //
-SliderControlGroup::SliderControlGroup(ControlPanel* panel, CountedPtr<PortModel> pm, bool separator)
+SliderControlGroup::SliderControlGroup(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator)
: ControlGroup(panel, pm, separator),
m_enabled(true),
m_enable_signal(false),
@@ -303,7 +303,7 @@ SliderControlGroup::slider_pressed(GdkEvent* ev)
// ///////////// IntegerControlGroup ////////////// //
-IntegerControlGroup::IntegerControlGroup(ControlPanel* panel, CountedPtr<PortModel> pm, bool separator)
+IntegerControlGroup::IntegerControlGroup(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator)
: ControlGroup(panel, pm, separator),
m_enable_signal(false),
m_alignment(0.5, 0.5, 0.0, 0.0),
@@ -377,7 +377,7 @@ IntegerControlGroup::update_value()
// ///////////// ToggleControlGroup ////////////// //
-ToggleControlGroup::ToggleControlGroup(ControlPanel* panel, CountedPtr<PortModel> pm, bool separator)
+ToggleControlGroup::ToggleControlGroup(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator)
: ControlGroup(panel, pm, separator),
m_enable_signal(false),
m_alignment(0.5, 0.5, 0.0, 0.0),
diff --git a/src/progs/ingenuity/ControlGroups.h b/src/progs/ingenuity/ControlGroups.h
index 3193fa71..48c638d3 100644
--- a/src/progs/ingenuity/ControlGroups.h
+++ b/src/progs/ingenuity/ControlGroups.h
@@ -22,7 +22,7 @@
#include <libglademm/xml.h>
#include <libglademm.h>
#include "PortModel.h"
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
namespace Ingen { namespace Client { class PortModel; } }
using namespace Ingen::Client;
@@ -39,11 +39,11 @@ class ControlPanel;
class ControlGroup : public Gtk::VBox
{
public:
- ControlGroup(ControlPanel* panel, CountedPtr<PortModel> pm, bool separator);
+ ControlGroup(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator);
~ControlGroup() { delete m_separator; }
- inline const CountedPtr<PortModel> port_model() const { return m_port_model; }
+ inline const SharedPtr<PortModel> port_model() const { return m_port_model; }
void remove_separator() {
assert(m_has_separator); remove(*m_separator); delete m_separator;
@@ -61,7 +61,7 @@ protected:
virtual void metadata_update(const string& key, const Atom& value);
ControlPanel* m_control_panel;
- CountedPtr<PortModel> m_port_model;
+ SharedPtr<PortModel> m_port_model;
bool m_has_separator;
Gtk::HSeparator* m_separator;
};
@@ -74,7 +74,7 @@ protected:
class SliderControlGroup : public ControlGroup
{
public:
- SliderControlGroup(ControlPanel* panel, CountedPtr<PortModel> pm, bool separator);
+ SliderControlGroup(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator);
void enable();
void disable();
@@ -133,7 +133,7 @@ SliderControlGroup::set_value(const float val)
class IntegerControlGroup : public ControlGroup
{
public:
- IntegerControlGroup(ControlPanel* panel, CountedPtr<PortModel> pm, bool separator);
+ IntegerControlGroup(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator);
void enable();
void disable();
@@ -158,7 +158,7 @@ private:
class ToggleControlGroup : public ControlGroup
{
public:
- ToggleControlGroup(ControlPanel* panel, CountedPtr<PortModel> pm, bool separator);
+ ToggleControlGroup(ControlPanel* panel, SharedPtr<PortModel> pm, bool separator);
void enable();
void disable();
diff --git a/src/progs/ingenuity/ControlPanel.cpp b/src/progs/ingenuity/ControlPanel.cpp
index 94945e28..73317bd9 100644
--- a/src/progs/ingenuity/ControlPanel.cpp
+++ b/src/progs/ingenuity/ControlPanel.cpp
@@ -51,7 +51,7 @@ ControlPanel::~ControlPanel()
void
-ControlPanel::init(CountedPtr<NodeModel> node, size_t poly)
+ControlPanel::init(SharedPtr<NodeModel> node, size_t poly)
{
assert(node != NULL);
assert(poly > 0);
@@ -84,7 +84,7 @@ ControlPanel::find_port(const Path& path) const
/** Add a control to the panel for the given port.
*/
void
-ControlPanel::add_port(CountedPtr<PortModel> pm)
+ControlPanel::add_port(SharedPtr<PortModel> pm)
{
assert(pm);
diff --git a/src/progs/ingenuity/ControlPanel.h b/src/progs/ingenuity/ControlPanel.h
index e1ace50a..623ac347 100644
--- a/src/progs/ingenuity/ControlPanel.h
+++ b/src/progs/ingenuity/ControlPanel.h
@@ -26,7 +26,7 @@
#include <iostream>
#include <utility> // for pair<>
#include "ControlGroups.h"
-#include "util/Path.h"
+#include "raul/Path.h"
using std::vector; using std::string; using std::pair;
using std::cerr; using std::cout; using std::endl;
@@ -51,11 +51,11 @@ public:
ControlPanel(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml);
virtual ~ControlPanel();
- void init(CountedPtr<NodeModel> node, size_t poly);
+ void init(SharedPtr<NodeModel> node, size_t poly);
ControlGroup* find_port(const Path& path) const;
- void add_port(CountedPtr<PortModel> port);
+ void add_port(SharedPtr<PortModel> port);
void remove_port(const Path& path);
//void rename_port(const Path& old_path, const Path& new_path);
diff --git a/src/progs/ingenuity/DSSIController.cpp b/src/progs/ingenuity/DSSIController.cpp
index a5075470..c7b84b57 100644
--- a/src/progs/ingenuity/DSSIController.cpp
+++ b/src/progs/ingenuity/DSSIController.cpp
@@ -28,7 +28,7 @@
namespace Ingenuity {
-DSSIController::DSSIController(CountedPtr<NodeModel> model)
+DSSIController::DSSIController(SharedPtr<NodeModel> model)
: m_banks_dirty(true)
{
#if 0
diff --git a/src/progs/ingenuity/DSSIController.h b/src/progs/ingenuity/DSSIController.h
index 7b8c6fb6..71c1f536 100644
--- a/src/progs/ingenuity/DSSIController.h
+++ b/src/progs/ingenuity/DSSIController.h
@@ -19,7 +19,7 @@
#include <string>
#include <gtkmm.h>
-#include "util/Path.h"
+#include "raul/Path.h"
#include "NodeModel.h"
using std::string;
@@ -46,7 +46,7 @@ class NodePropertiesWindow;
class DSSIController
{
public:
- DSSIController(CountedPtr<NodeModel> model);
+ DSSIController(SharedPtr<NodeModel> model);
virtual ~DSSIController() {}
diff --git a/src/progs/ingenuity/DSSIModule.cpp b/src/progs/ingenuity/DSSIModule.cpp
index 9506897d..350c72aa 100644
--- a/src/progs/ingenuity/DSSIModule.cpp
+++ b/src/progs/ingenuity/DSSIModule.cpp
@@ -20,7 +20,7 @@
namespace Ingenuity {
-DSSIModule::DSSIModule(boost::shared_ptr<PatchCanvas> canvas, CountedPtr<NodeModel> node)
+DSSIModule::DSSIModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node)
: NodeModule(canvas, node)
{
}
diff --git a/src/progs/ingenuity/DSSIModule.h b/src/progs/ingenuity/DSSIModule.h
index 342d5f7b..0244a495 100644
--- a/src/progs/ingenuity/DSSIModule.h
+++ b/src/progs/ingenuity/DSSIModule.h
@@ -30,7 +30,7 @@ class DSSIController;
class DSSIModule : public Ingenuity::NodeModule
{
public:
- DSSIModule(boost::shared_ptr<PatchCanvas> canvas, CountedPtr<NodeModel> node);
+ DSSIModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node);
virtual ~DSSIModule() {}
void on_double_click(GdkEventButton* ev);
diff --git a/src/progs/ingenuity/LoadPatchWindow.cpp b/src/progs/ingenuity/LoadPatchWindow.cpp
index 1fa5c2ba..7605f0f0 100644
--- a/src/progs/ingenuity/LoadPatchWindow.cpp
+++ b/src/progs/ingenuity/LoadPatchWindow.cpp
@@ -60,7 +60,7 @@ LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gno
void
-LoadPatchWindow::present(CountedPtr<PatchModel> patch, MetadataMap data)
+LoadPatchWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
{
set_patch(patch);
m_initial_data = data;
@@ -73,7 +73,7 @@ LoadPatchWindow::present(CountedPtr<PatchModel> patch, MetadataMap data)
* This function MUST be called before using the window in any way!
*/
void
-LoadPatchWindow::set_patch(CountedPtr<PatchModel> patch)
+LoadPatchWindow::set_patch(SharedPtr<PatchModel> patch)
{
m_patch = patch;
}
@@ -119,7 +119,7 @@ LoadPatchWindow::ok_clicked()
App::instance().engine()->clear_patch(m_patch->path());
cerr << "FIXME: load patch" << endl;
- //CountedPtr<PatchModel> pm(new PatchModel(m_patch->path(), poly));
+ //SharedPtr<PatchModel> pm(new PatchModel(m_patch->path(), poly));
//pm->filename(get_filename());
//pm->set_metadata("filename", Atom(get_filename().c_str()));
// FIXME: necessary?
diff --git a/src/progs/ingenuity/LoadPatchWindow.h b/src/progs/ingenuity/LoadPatchWindow.h
index 2c6035c8..b70552b1 100644
--- a/src/progs/ingenuity/LoadPatchWindow.h
+++ b/src/progs/ingenuity/LoadPatchWindow.h
@@ -21,7 +21,7 @@
#include <libglademm/xml.h>
#include <gtkmm.h>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "PatchModel.h"
using Ingen::Client::PatchModel;
using Ingen::Client::MetadataMap;
@@ -44,12 +44,12 @@ class LoadPatchWindow : public Gtk::FileChooserDialog
public:
LoadPatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml);
- void set_patch(CountedPtr<PatchModel> patch);
+ void set_patch(SharedPtr<PatchModel> patch);
void set_replace() { m_replace = true; }
void set_merge() { m_replace = false; }
- void present(CountedPtr<PatchModel> patch, MetadataMap data);
+ void present(SharedPtr<PatchModel> patch, MetadataMap data);
protected:
void on_show();
@@ -62,7 +62,7 @@ private:
MetadataMap m_initial_data;
- CountedPtr<PatchModel> m_patch;
+ SharedPtr<PatchModel> m_patch;
bool m_replace;
Gtk::RadioButton* m_poly_from_current_radio;
diff --git a/src/progs/ingenuity/LoadPluginWindow.cpp b/src/progs/ingenuity/LoadPluginWindow.cpp
index 01a2accd..b4707274 100644
--- a/src/progs/ingenuity/LoadPluginWindow.cpp
+++ b/src/progs/ingenuity/LoadPluginWindow.cpp
@@ -104,7 +104,7 @@ LoadPluginWindow::LoadPluginWindow(BaseObjectType* cobject, const Glib::RefPtr<G
void
-LoadPluginWindow::present(CountedPtr<PatchModel> patch, MetadataMap data)
+LoadPluginWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
{
set_patch(patch);
m_initial_data = data;
@@ -140,7 +140,7 @@ LoadPluginWindow::name_changed()
* This function MUST be called before using the window in any way!
*/
void
-LoadPluginWindow::set_patch(CountedPtr<PatchModel> patch)
+LoadPluginWindow::set_patch(SharedPtr<PatchModel> patch)
{
m_patch = patch;
@@ -182,12 +182,12 @@ LoadPluginWindow::on_show()
void
-LoadPluginWindow::set_plugin_list(const std::map<string, CountedPtr<PluginModel> >& m)
+LoadPluginWindow::set_plugin_list(const std::map<string, SharedPtr<PluginModel> >& m)
{
m_plugins_liststore->clear();
- for (std::map<string, CountedPtr<PluginModel> >::const_iterator i = m.begin(); i != m.end(); ++i) {
- CountedPtr<PluginModel> plugin = (*i).second;
+ for (std::map<string, SharedPtr<PluginModel> >::const_iterator i = m.begin(); i != m.end(); ++i) {
+ SharedPtr<PluginModel> plugin = (*i).second;
Gtk::TreeModel::iterator iter = m_plugins_liststore->append();
Gtk::TreeModel::Row row = *iter;
@@ -206,7 +206,7 @@ LoadPluginWindow::set_plugin_list(const std::map<string, CountedPtr<PluginModel>
void
-LoadPluginWindow::add_plugin(CountedPtr<PluginModel> plugin)
+LoadPluginWindow::add_plugin(SharedPtr<PluginModel> plugin)
{
Gtk::TreeModel::iterator iter = m_plugins_liststore->append();
Gtk::TreeModel::Row row = *iter;
@@ -260,7 +260,7 @@ LoadPluginWindow::generate_module_name(int offset)
if (iter) {
Gtk::TreeModel::Row row = *iter;
- CountedPtr<PluginModel> plugin = row.get_value(m_plugins_columns.m_col_plugin_model);
+ SharedPtr<PluginModel> plugin = row.get_value(m_plugins_columns.m_col_plugin_model);
char num_buf[3];
for (uint i=0; i < 99; ++i) {
name = plugin->default_node_name();
@@ -290,7 +290,7 @@ LoadPluginWindow::add_clicked()
if (iter) { // If anything is selected
Gtk::TreeModel::Row row = *iter;
- CountedPtr<PluginModel> plugin = row.get_value(m_plugins_columns.m_col_plugin_model);
+ SharedPtr<PluginModel> plugin = row.get_value(m_plugins_columns.m_col_plugin_model);
string name = m_node_name_entry->get_text();
if (name == "") {
name = generate_module_name();
@@ -351,10 +351,10 @@ LoadPluginWindow::filter_changed()
size_t num_visible = 0;
- for (std::map<string, CountedPtr<PluginModel> >::const_iterator i = App::instance().store()->plugins().begin();
+ for (std::map<string, SharedPtr<PluginModel> >::const_iterator i = App::instance().store()->plugins().begin();
i != App::instance().store()->plugins().end(); ++i) {
- const CountedPtr<PluginModel> plugin = (*i).second;
+ const SharedPtr<PluginModel> plugin = (*i).second;
switch (criteria) {
case CriteriaColumns::NAME:
diff --git a/src/progs/ingenuity/LoadPluginWindow.h b/src/progs/ingenuity/LoadPluginWindow.h
index 08433d37..afa3be85 100644
--- a/src/progs/ingenuity/LoadPluginWindow.h
+++ b/src/progs/ingenuity/LoadPluginWindow.h
@@ -23,7 +23,7 @@
#include <libglademm/xml.h>
#include <libglademm.h>
#include <gtkmm.h>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "PatchModel.h"
using Ingen::Client::PluginModel;
using Ingen::Client::PatchModel;
@@ -57,7 +57,7 @@ public:
// Not displayed:
Gtk::TreeModelColumn<Glib::ustring> m_col_label;
- Gtk::TreeModelColumn<CountedPtr<PluginModel> > m_col_plugin_model;
+ Gtk::TreeModelColumn<SharedPtr<PluginModel> > m_col_plugin_model;
};
@@ -88,13 +88,13 @@ class LoadPluginWindow : public Gtk::Window
public:
LoadPluginWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml);
- void set_patch(CountedPtr<PatchModel> patch);
- void set_plugin_list(const std::map<string, CountedPtr<PluginModel> >& m);
+ void set_patch(SharedPtr<PatchModel> patch);
+ void set_plugin_list(const std::map<string, SharedPtr<PluginModel> >& m);
- void add_plugin(CountedPtr<PluginModel> plugin);
+ void add_plugin(SharedPtr<PluginModel> plugin);
bool has_shown() const { return m_has_shown; }
- void present(CountedPtr<PatchModel> patch, MetadataMap data);
+ void present(SharedPtr<PatchModel> patch, MetadataMap data);
protected:
void on_show();
@@ -114,7 +114,7 @@ private:
MetadataMap m_initial_data;
- CountedPtr<PatchModel> m_patch;
+ SharedPtr<PatchModel> m_patch;
bool m_has_shown; // plugin list only populated on show to speed patch window creation
diff --git a/src/progs/ingenuity/LoadSubpatchWindow.cpp b/src/progs/ingenuity/LoadSubpatchWindow.cpp
index 453d874e..9aea1bd6 100644
--- a/src/progs/ingenuity/LoadSubpatchWindow.cpp
+++ b/src/progs/ingenuity/LoadSubpatchWindow.cpp
@@ -65,7 +65,7 @@ LoadSubpatchWindow::LoadSubpatchWindow(BaseObjectType* cobject, const Glib::RefP
void
-LoadSubpatchWindow::present(CountedPtr<PatchModel> patch, MetadataMap data)
+LoadSubpatchWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
{
set_patch(patch);
m_initial_data = data;
@@ -78,7 +78,7 @@ LoadSubpatchWindow::present(CountedPtr<PatchModel> patch, MetadataMap data)
* This function MUST be called before using the window in any way!
*/
void
-LoadSubpatchWindow::set_patch(CountedPtr<PatchModel> patch)
+LoadSubpatchWindow::set_patch(SharedPtr<PatchModel> patch)
{
m_patch = patch;
diff --git a/src/progs/ingenuity/LoadSubpatchWindow.h b/src/progs/ingenuity/LoadSubpatchWindow.h
index 81e4f4d7..db178091 100644
--- a/src/progs/ingenuity/LoadSubpatchWindow.h
+++ b/src/progs/ingenuity/LoadSubpatchWindow.h
@@ -20,7 +20,7 @@
#include "PluginModel.h"
#include <libglademm/xml.h>
#include <gtkmm.h>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "PatchModel.h"
using Ingen::Client::PatchModel;
using Ingen::Client::MetadataMap;
@@ -39,9 +39,9 @@ class LoadSubpatchWindow : public Gtk::FileChooserDialog
public:
LoadSubpatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml);
- void set_patch(CountedPtr<PatchModel> patch);
+ void set_patch(SharedPtr<PatchModel> patch);
- void present(CountedPtr<PatchModel> patch, MetadataMap data);
+ void present(SharedPtr<PatchModel> patch, MetadataMap data);
protected:
void on_show();
@@ -57,7 +57,7 @@ private:
MetadataMap m_initial_data;
- CountedPtr<PatchModel> m_patch;
+ SharedPtr<PatchModel> m_patch;
Gtk::RadioButton* m_name_from_file_radio;
Gtk::RadioButton* m_name_from_user_radio;
diff --git a/src/progs/ingenuity/Loader.cpp b/src/progs/ingenuity/Loader.cpp
index b22669ec..98f88e55 100644
--- a/src/progs/ingenuity/Loader.cpp
+++ b/src/progs/ingenuity/Loader.cpp
@@ -25,7 +25,7 @@ using std::cout; using std::endl;
namespace Ingenuity {
-Loader::Loader(CountedPtr<ModelEngineInterface> engine)
+Loader::Loader(SharedPtr<ModelEngineInterface> engine)
: _serializer(new Serializer(engine))
{
assert(_serializer != NULL);
@@ -76,7 +76,7 @@ Loader::load_patch(const string& filename,
void
-Loader::save_patch(CountedPtr<PatchModel> model, const string& filename, bool recursive)
+Loader::save_patch(SharedPtr<PatchModel> model, const string& filename, bool recursive)
{
_mutex.lock();
@@ -91,7 +91,7 @@ Loader::save_patch(CountedPtr<PatchModel> model, const string& filename, bool re
void
-Loader::save_patch_event(CountedPtr<PatchModel> model, const string& filename, bool recursive)
+Loader::save_patch_event(SharedPtr<PatchModel> model, const string& filename, bool recursive)
{
if (recursive)
cerr << "FIXME: Recursive save." << endl;
diff --git a/src/progs/ingenuity/Loader.h b/src/progs/ingenuity/Loader.h
index 3a043c59..65d1fcfe 100644
--- a/src/progs/ingenuity/Loader.h
+++ b/src/progs/ingenuity/Loader.h
@@ -20,10 +20,10 @@
#include <string>
#include <list>
#include <cassert>
-#include "util/Thread.h"
-#include "util/Slave.h"
-#include "util/Mutex.h"
-#include "util/Condition.h"
+#include "raul/Thread.h"
+#include "raul/Slave.h"
+#include "raul/Mutex.h"
+#include "raul/Condition.h"
#include "ModelEngineInterface.h"
#include "ObjectModel.h"
using std::string;
@@ -52,7 +52,7 @@ namespace Ingenuity {
class Loader : public Slave
{
public:
- Loader(CountedPtr<ModelEngineInterface> engine);
+ Loader(SharedPtr<ModelEngineInterface> engine);
~Loader();
Serializer& serializer() const { return *_serializer; }
@@ -64,12 +64,12 @@ public:
const MetadataMap& initial_data,
bool merge = false);
- void save_patch(CountedPtr<PatchModel> model, const string& filename, bool recursive);
+ void save_patch(SharedPtr<PatchModel> model, const string& filename, bool recursive);
private:
- void save_patch_event(CountedPtr<PatchModel> model, const string& filename, bool recursive);
+ void save_patch_event(SharedPtr<PatchModel> model, const string& filename, bool recursive);
/** Returns nothing and takes no parameters (because they have all been bound) */
typedef sigc::slot<void> Closure;
diff --git a/src/progs/ingenuity/NewSubpatchWindow.cpp b/src/progs/ingenuity/NewSubpatchWindow.cpp
index a74dc2b0..ae609744 100644
--- a/src/progs/ingenuity/NewSubpatchWindow.cpp
+++ b/src/progs/ingenuity/NewSubpatchWindow.cpp
@@ -41,7 +41,7 @@ NewSubpatchWindow::NewSubpatchWindow(BaseObjectType* cobject, const Glib::RefPtr
}
void
-NewSubpatchWindow::present(CountedPtr<PatchModel> patch, MetadataMap data)
+NewSubpatchWindow::present(SharedPtr<PatchModel> patch, MetadataMap data)
{
set_patch(patch);
m_initial_data = data;
@@ -53,7 +53,7 @@ NewSubpatchWindow::present(CountedPtr<PatchModel> patch, MetadataMap data)
* This function MUST be called before using the window in any way!
*/
void
-NewSubpatchWindow::set_patch(CountedPtr<PatchModel> patch)
+NewSubpatchWindow::set_patch(SharedPtr<PatchModel> patch)
{
m_patch = patch;
}
diff --git a/src/progs/ingenuity/NewSubpatchWindow.h b/src/progs/ingenuity/NewSubpatchWindow.h
index 57c6c7ee..031fa9fd 100644
--- a/src/progs/ingenuity/NewSubpatchWindow.h
+++ b/src/progs/ingenuity/NewSubpatchWindow.h
@@ -20,7 +20,7 @@
#include "PluginModel.h"
#include <libglademm/xml.h>
#include <gtkmm.h>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "PatchModel.h"
using Ingen::Client::PatchModel;
using Ingen::Client::MetadataMap;
@@ -39,9 +39,9 @@ class NewSubpatchWindow : public Gtk::Window
public:
NewSubpatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml);
- void set_patch(CountedPtr<PatchModel> patch);
+ void set_patch(SharedPtr<PatchModel> patch);
- void present(CountedPtr<PatchModel> patch, MetadataMap data);
+ void present(SharedPtr<PatchModel> patch, MetadataMap data);
private:
void name_changed();
@@ -49,7 +49,7 @@ private:
void cancel_clicked();
MetadataMap m_initial_data;
- CountedPtr<PatchModel> m_patch;
+ SharedPtr<PatchModel> m_patch;
Gtk::Entry* m_name_entry;
Gtk::Label* m_message_label;
diff --git a/src/progs/ingenuity/NodeControlWindow.cpp b/src/progs/ingenuity/NodeControlWindow.cpp
index bc362eb5..bd93e749 100644
--- a/src/progs/ingenuity/NodeControlWindow.cpp
+++ b/src/progs/ingenuity/NodeControlWindow.cpp
@@ -29,7 +29,7 @@ namespace Ingenuity {
/** Create a node control window and load a new ControlPanel for it.
*/
-NodeControlWindow::NodeControlWindow(CountedPtr<NodeModel> node, size_t poly)
+NodeControlWindow::NodeControlWindow(SharedPtr<NodeModel> node, size_t poly)
: m_node(node),
m_position_stored(false),
m_x(0), m_y(0)
@@ -59,7 +59,7 @@ NodeControlWindow::NodeControlWindow(CountedPtr<NodeModel> node, size_t poly)
/** Create a node control window and with an existing ControlPanel.
*/
-NodeControlWindow::NodeControlWindow(CountedPtr<NodeModel> node, ControlPanel* panel)
+NodeControlWindow::NodeControlWindow(SharedPtr<NodeModel> node, ControlPanel* panel)
: m_node(node),
m_control_panel(panel)
{
diff --git a/src/progs/ingenuity/NodeControlWindow.h b/src/progs/ingenuity/NodeControlWindow.h
index 91ccbc49..f975f8c8 100644
--- a/src/progs/ingenuity/NodeControlWindow.h
+++ b/src/progs/ingenuity/NodeControlWindow.h
@@ -22,7 +22,7 @@
#include <gtkmm.h>
#include <libglademm.h>
#include <sigc++/sigc++.h>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
using std::string; using std::vector;
namespace Ingen { namespace Client {
@@ -43,11 +43,11 @@ class ControlPanel;
class NodeControlWindow : public Gtk::Window
{
public:
- NodeControlWindow(CountedPtr<NodeModel> node, size_t poly);
- NodeControlWindow(CountedPtr<NodeModel> node, ControlPanel* panel);
+ NodeControlWindow(SharedPtr<NodeModel> node, size_t poly);
+ NodeControlWindow(SharedPtr<NodeModel> node, ControlPanel* panel);
virtual ~NodeControlWindow();
- CountedPtr<NodeModel> node() { return m_node; }
+ SharedPtr<NodeModel> node() { return m_node; }
ControlPanel* control_panel() const { return m_control_panel; }
@@ -58,7 +58,7 @@ protected:
void on_hide();
private:
- CountedPtr<NodeModel> m_node;
+ SharedPtr<NodeModel> m_node;
ControlPanel* m_control_panel;
bool m_callback_enabled;
diff --git a/src/progs/ingenuity/NodeMenu.cpp b/src/progs/ingenuity/NodeMenu.cpp
index 9f2a9ea5..e559dc3d 100644
--- a/src/progs/ingenuity/NodeMenu.cpp
+++ b/src/progs/ingenuity/NodeMenu.cpp
@@ -27,7 +27,7 @@ using std::cerr; using std::endl;
namespace Ingenuity {
-NodeMenu::NodeMenu(CountedPtr<NodeModel> node)
+NodeMenu::NodeMenu(SharedPtr<NodeModel> node)
: _node(node)
, _controls_menuitem(NULL)
{
@@ -88,7 +88,7 @@ void
NodeMenu::destroy()
{
cerr << "FIXME: NODE DESTROYED\n";
- //CountedPtr<ObjectModel> model = m_model;
+ //SharedPtr<ObjectModel> model = m_model;
//m_model.reset();
}
#endif
@@ -143,7 +143,7 @@ NodeMenu::destroy()
#if 0
void
-NodeMenu::add_port(CountedPtr<PortModel> pm)
+NodeMenu::add_port(SharedPtr<PortModel> pm)
{
assert(pm->parent().get() == _node.get());
assert(pm->parent() == _node);
diff --git a/src/progs/ingenuity/NodeMenu.h b/src/progs/ingenuity/NodeMenu.h
index 1846ed56..46b4d2b3 100644
--- a/src/progs/ingenuity/NodeMenu.h
+++ b/src/progs/ingenuity/NodeMenu.h
@@ -19,8 +19,8 @@
#include <string>
#include <gtkmm.h>
-#include "util/Path.h"
-#include "util/CountedPtr.h"
+#include "raul/Path.h"
+#include "raul/SharedPtr.h"
#include "NodeModel.h"
using Ingen::Client::NodeModel;
@@ -40,7 +40,7 @@ class PatchCanvas;
class NodeMenu : public Gtk::Menu
{
public:
- NodeMenu(CountedPtr<NodeModel> node);
+ NodeMenu(SharedPtr<NodeModel> node);
void set_path(const Path& new_path);
@@ -57,7 +57,7 @@ protected:
virtual void enable_controls_menuitem();
virtual void disable_controls_menuitem();
- //virtual void add_port(CountedPtr<PortModel> pm);
+ //virtual void add_port(SharedPtr<PortModel> pm);
void on_menu_destroy();
void on_menu_clone();
@@ -65,7 +65,7 @@ protected:
void on_menu_disconnect_all();
//Gtk::Menu m_menu;
- CountedPtr<NodeModel> _node;
+ SharedPtr<NodeModel> _node;
Glib::RefPtr<Gtk::MenuItem> _controls_menuitem;
};
diff --git a/src/progs/ingenuity/NodeModule.cpp b/src/progs/ingenuity/NodeModule.cpp
index d9d91193..73b87b5b 100644
--- a/src/progs/ingenuity/NodeModule.cpp
+++ b/src/progs/ingenuity/NodeModule.cpp
@@ -16,7 +16,7 @@
#include "NodeModule.h"
#include <cassert>
-#include "util/Atom.h"
+#include "raul/Atom.h"
#include "App.h"
#include "ModelEngineInterface.h"
#include "PatchCanvas.h"
@@ -31,7 +31,7 @@
namespace Ingenuity {
-NodeModule::NodeModule(boost::shared_ptr<PatchCanvas> canvas, CountedPtr<NodeModel> node)
+NodeModule::NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node)
: LibFlowCanvas::Module(canvas, node->path().name()),
m_node(node),
m_menu(node)
@@ -49,7 +49,7 @@ NodeModule::NodeModule(boost::shared_ptr<PatchCanvas> canvas, CountedPtr<NodeMod
boost::shared_ptr<NodeModule>
-NodeModule::create(boost::shared_ptr<PatchCanvas> canvas, CountedPtr<NodeModel> node)
+NodeModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node)
{
boost::shared_ptr<NodeModule> ret = boost::shared_ptr<NodeModule>(
new NodeModule(canvas, node));
@@ -67,7 +67,7 @@ NodeModule::create(boost::shared_ptr<PatchCanvas> canvas, CountedPtr<NodeModel>
void
-NodeModule::add_port(CountedPtr<PortModel> port, bool resize_to_fit)
+NodeModule::add_port(SharedPtr<PortModel> port, bool resize_to_fit)
{
Module::add_port(boost::shared_ptr<Port>(new Port(shared_from_this(), port)));
if (resize_to_fit)
diff --git a/src/progs/ingenuity/NodeModule.h b/src/progs/ingenuity/NodeModule.h
index cbdfc6d2..6b973f2b 100644
--- a/src/progs/ingenuity/NodeModule.h
+++ b/src/progs/ingenuity/NodeModule.h
@@ -21,7 +21,7 @@
#include <boost/enable_shared_from_this.hpp>
#include <libgnomecanvasmm.h>
#include <flowcanvas/Module.h>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "Port.h"
#include "NodeMenu.h"
using std::string;
@@ -51,7 +51,7 @@ class Port;
class NodeModule : public boost::enable_shared_from_this<NodeModule>, public LibFlowCanvas::Module
{
public:
- static boost::shared_ptr<NodeModule> create (boost::shared_ptr<PatchCanvas> canvas, CountedPtr<NodeModel> node);
+ static boost::shared_ptr<NodeModule> create (boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node);
virtual ~NodeModule() {}
@@ -66,20 +66,20 @@ public:
void show_control_window();
- CountedPtr<NodeModel> node() const { return m_node; }
+ SharedPtr<NodeModel> node() const { return m_node; }
protected:
- NodeModule(boost::shared_ptr<PatchCanvas> canvas, CountedPtr<NodeModel> node);
+ NodeModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<NodeModel> node);
virtual void on_double_click(GdkEventButton* ev) { show_control_window(); }
virtual void on_middle_click(GdkEventButton* ev) { show_control_window(); }
void metadata_update(const string& key, const Atom& value);
- void add_port(CountedPtr<PortModel> port, bool resize=true);
- void remove_port(CountedPtr<PortModel> port) { Module::remove_port(port->path().name()); }
+ void add_port(SharedPtr<PortModel> port, bool resize=true);
+ void remove_port(SharedPtr<PortModel> port) { Module::remove_port(port->path().name()); }
- CountedPtr<NodeModel> m_node;
+ SharedPtr<NodeModel> m_node;
NodeMenu m_menu;
};
diff --git a/src/progs/ingenuity/NodePropertiesWindow.cpp b/src/progs/ingenuity/NodePropertiesWindow.cpp
index a6bdfce1..46eb9d27 100644
--- a/src/progs/ingenuity/NodePropertiesWindow.cpp
+++ b/src/progs/ingenuity/NodePropertiesWindow.cpp
@@ -39,7 +39,7 @@ NodePropertiesWindow::NodePropertiesWindow(BaseObjectType* cobject, const Glib::
* This function MUST be called before using this object in any way.
*/
void
-NodePropertiesWindow::set_node(CountedPtr<NodeModel> node_model)
+NodePropertiesWindow::set_node(SharedPtr<NodeModel> node_model)
{
assert(node_model);
@@ -50,7 +50,7 @@ NodePropertiesWindow::set_node(CountedPtr<NodeModel> node_model)
m_node_path_label->set_text(node_model->path());
m_node_polyphonic_toggle->set_active(node_model->polyphonic());
- CountedPtr<PluginModel> pm = node_model->plugin();
+ SharedPtr<PluginModel> pm = node_model->plugin();
if (pm) {
m_plugin_type_label->set_text(pm->type_string());
diff --git a/src/progs/ingenuity/NodePropertiesWindow.h b/src/progs/ingenuity/NodePropertiesWindow.h
index 62934f0a..3c9322e7 100644
--- a/src/progs/ingenuity/NodePropertiesWindow.h
+++ b/src/progs/ingenuity/NodePropertiesWindow.h
@@ -19,7 +19,7 @@
#include <gtkmm.h>
#include <libglademm.h>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "NodeModel.h"
using namespace Ingen::Client;
@@ -37,12 +37,12 @@ class NodePropertiesWindow : public Gtk::Window
public:
NodePropertiesWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade);
- void present(CountedPtr<NodeModel> node_model) { set_node(node_model); Gtk::Window::present(); }
- void set_node(CountedPtr<NodeModel> node_model);
+ void present(SharedPtr<NodeModel> node_model) { set_node(node_model); Gtk::Window::present(); }
+ void set_node(SharedPtr<NodeModel> node_model);
private:
- CountedPtr<NodeModel> m_node_model;
+ SharedPtr<NodeModel> m_node_model;
Gtk::Label* m_node_path_label;
Gtk::CheckButton* m_node_polyphonic_toggle;
Gtk::Label* m_plugin_type_label;
diff --git a/src/progs/ingenuity/PatchCanvas.cpp b/src/progs/ingenuity/PatchCanvas.cpp
index 289150de..c8f49623 100644
--- a/src/progs/ingenuity/PatchCanvas.cpp
+++ b/src/progs/ingenuity/PatchCanvas.cpp
@@ -38,7 +38,7 @@ using Ingen::Client::Serializer;
namespace Ingenuity {
-PatchCanvas::PatchCanvas(CountedPtr<PatchModel> patch, int width, int height)
+PatchCanvas::PatchCanvas(SharedPtr<PatchModel> patch, int width, int height)
: FlowCanvas(width, height),
m_patch(patch),
m_last_click_x(0),
@@ -111,7 +111,7 @@ PatchCanvas::build()
}
// Create connections
- for (list<CountedPtr<ConnectionModel> >::const_iterator i = m_patch->connections().begin();
+ for (list<SharedPtr<ConnectionModel> >::const_iterator i = m_patch->connections().begin();
i != m_patch->connections().end(); ++i) {
connection(*i);
}
@@ -119,12 +119,12 @@ PatchCanvas::build()
void
-PatchCanvas::add_node(CountedPtr<NodeModel> nm)
+PatchCanvas::add_node(SharedPtr<NodeModel> nm)
{
boost::shared_ptr<PatchCanvas> shared_this =
boost::dynamic_pointer_cast<PatchCanvas>(shared_from_this());
- CountedPtr<PatchModel> pm = PtrCast<PatchModel>(nm);
+ SharedPtr<PatchModel> pm = PtrCast<PatchModel>(nm);
if (pm)
add_module(SubpatchModule::create(shared_this, pm));
else
@@ -133,14 +133,14 @@ PatchCanvas::add_node(CountedPtr<NodeModel> nm)
void
-PatchCanvas::remove_node(CountedPtr<NodeModel> nm)
+PatchCanvas::remove_node(SharedPtr<NodeModel> nm)
{
remove_module(nm->path().name()); // should cut all references
}
void
-PatchCanvas::add_port(CountedPtr<PortModel> pm)
+PatchCanvas::add_port(SharedPtr<PortModel> pm)
{
boost::shared_ptr<PatchCanvas> shared_this =
boost::dynamic_pointer_cast<PatchCanvas>(shared_from_this());
@@ -150,7 +150,7 @@ PatchCanvas::add_port(CountedPtr<PortModel> pm)
void
-PatchCanvas::remove_port(CountedPtr<PortModel> pm)
+PatchCanvas::remove_port(SharedPtr<PortModel> pm)
{
cerr << "FIXME: PORT REMOVE" << endl;
//LibFlowCanvas::Module* module = get_module(pm->path().name());
@@ -159,7 +159,7 @@ PatchCanvas::remove_port(CountedPtr<PortModel> pm)
void
-PatchCanvas::connection(CountedPtr<ConnectionModel> cm)
+PatchCanvas::connection(SharedPtr<ConnectionModel> cm)
{
// Deal with port "anonymous nodes" for this patch's own ports...
const Path& src_parent_path = cm->src_port_path().parent();
@@ -229,8 +229,8 @@ PatchCanvas::connect(boost::shared_ptr<LibFlowCanvas::Port> src_port, boost::sha
{
cerr << "FIXME: MIDI binding" << endl;
#if 0
- CountedPtr<PluginModel> pm(new PluginModel(PluginModel::Internal, "", "midi_control_in", ""));
- CountedPtr<NodeModel> nm(new NodeModel(pm, m_patch->path().base()
+ SharedPtr<PluginModel> pm(new PluginModel(PluginModel::Internal, "", "midi_control_in", ""));
+ SharedPtr<NodeModel> nm(new NodeModel(pm, m_patch->path().base()
+ src->name() + "-" + dst->name(), false));
nm->set_metadata("canvas-x", Atom((float)
(dst->module()->property_x() - dst->module()->width() - 20)));
diff --git a/src/progs/ingenuity/PatchCanvas.h b/src/progs/ingenuity/PatchCanvas.h
index 7074c785..c91bb6ec 100644
--- a/src/progs/ingenuity/PatchCanvas.h
+++ b/src/progs/ingenuity/PatchCanvas.h
@@ -21,8 +21,8 @@
#include <boost/shared_ptr.hpp>
#include <flowcanvas/FlowCanvas.h>
#include <flowcanvas/Module.h>
-#include "util/CountedPtr.h"
-#include "util/Path.h"
+#include "raul/SharedPtr.h"
+#include "raul/Path.h"
#include "ConnectionModel.h"
#include "PatchModel.h"
#include "NodeModule.h"
@@ -49,7 +49,7 @@ class NodeModule;
class PatchCanvas : public LibFlowCanvas::FlowCanvas
{
public:
- PatchCanvas(CountedPtr<PatchModel> patch, int width, int height);
+ PatchCanvas(SharedPtr<PatchModel> patch, int width, int height);
virtual ~PatchCanvas() {}
@@ -60,11 +60,11 @@ public:
void build();
- void add_node(CountedPtr<NodeModel> nm);
- void remove_node(CountedPtr<NodeModel> nm);
- void add_port(CountedPtr<PortModel> pm);
- void remove_port(CountedPtr<PortModel> pm);
- void connection(CountedPtr<ConnectionModel> cm);
+ void add_node(SharedPtr<NodeModel> nm);
+ void remove_node(SharedPtr<NodeModel> nm);
+ void add_port(SharedPtr<PortModel> pm);
+ void remove_port(SharedPtr<PortModel> pm);
+ void connection(SharedPtr<ConnectionModel> cm);
void disconnection(const Path& src_port_path, const Path& dst_port_path);
void get_new_module_location(double& x, double& y);
@@ -92,7 +92,7 @@ private:
void disconnect(boost::shared_ptr<LibFlowCanvas::Port> src,
boost::shared_ptr<LibFlowCanvas::Port> dst);
- CountedPtr<PatchModel> m_patch;
+ SharedPtr<PatchModel> m_patch;
int m_last_click_x;
int m_last_click_y;
diff --git a/src/progs/ingenuity/PatchPortModule.cpp b/src/progs/ingenuity/PatchPortModule.cpp
index 2804a6a6..6da63805 100644
--- a/src/progs/ingenuity/PatchPortModule.cpp
+++ b/src/progs/ingenuity/PatchPortModule.cpp
@@ -29,7 +29,7 @@
namespace Ingenuity {
-PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, CountedPtr<PortModel> port)
+PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortModel> port)
: LibFlowCanvas::Module(canvas, "", 0, 0), // FIXME: coords?
m_port(port)
{
@@ -64,7 +64,7 @@ PatchPortModule::PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, CountedP
boost::shared_ptr<PatchPortModule>
-PatchPortModule::create(boost::shared_ptr<PatchCanvas> canvas, CountedPtr<PortModel> port)
+PatchPortModule::create(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortModel> port)
{
boost::shared_ptr<PatchPortModule> ret = boost::shared_ptr<PatchPortModule>(
new PatchPortModule(canvas, port));
diff --git a/src/progs/ingenuity/PatchPortModule.h b/src/progs/ingenuity/PatchPortModule.h
index 3cf55192..89a9ce68 100644
--- a/src/progs/ingenuity/PatchPortModule.h
+++ b/src/progs/ingenuity/PatchPortModule.h
@@ -21,7 +21,7 @@
#include <boost/enable_shared_from_this.hpp>
#include <libgnomecanvasmm.h>
#include <flowcanvas/Module.h>
-#include "util/Atom.h"
+#include "raul/Atom.h"
#include "Port.h"
using std::string;
@@ -48,7 +48,7 @@ class PatchPortModule : public LibFlowCanvas::Module//, public boost::enable_sha
{
public:
static boost::shared_ptr<PatchPortModule> create (boost::shared_ptr<PatchCanvas> canvas,
- CountedPtr<PortModel> port);
+ SharedPtr<PortModel> port);
virtual ~PatchPortModule() {}
@@ -56,17 +56,17 @@ public:
//void on_right_click(GdkEventButton* event) { m_port->show_menu(event); }
- CountedPtr<PortModel> port() const { return m_port; }
+ SharedPtr<PortModel> port() const { return m_port; }
protected:
- PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, CountedPtr<PortModel> port);
+ PatchPortModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PortModel> port);
//virtual void on_double_click(GdkEventButton* ev) { show_control_window(); }
//virtual void on_middle_click(GdkEventButton* ev) { show_control_window(); }
void metadata_update(const string& key, const Atom& value);
- CountedPtr<PortModel> m_port;
+ SharedPtr<PortModel> m_port;
boost::shared_ptr<Port> m_patch_port; ///< Port on this 'anonymous' module
};
diff --git a/src/progs/ingenuity/PatchPropertiesWindow.cpp b/src/progs/ingenuity/PatchPropertiesWindow.cpp
index 51912fe9..86d7ccd3 100644
--- a/src/progs/ingenuity/PatchPropertiesWindow.cpp
+++ b/src/progs/ingenuity/PatchPropertiesWindow.cpp
@@ -41,7 +41,7 @@ PatchPropertiesWindow::PatchPropertiesWindow(BaseObjectType* cobject, const Glib
* the window in any way.
*/
void
-PatchPropertiesWindow::set_patch(CountedPtr<PatchModel> patch_model)
+PatchPropertiesWindow::set_patch(SharedPtr<PatchModel> patch_model)
{
property_title() = patch_model->path() + " Properties";
m_patch_model = patch_model;
diff --git a/src/progs/ingenuity/PatchPropertiesWindow.h b/src/progs/ingenuity/PatchPropertiesWindow.h
index 4f5da674..54e8391a 100644
--- a/src/progs/ingenuity/PatchPropertiesWindow.h
+++ b/src/progs/ingenuity/PatchPropertiesWindow.h
@@ -20,7 +20,7 @@
#include <string>
#include <gtkmm.h>
#include <libglademm/xml.h>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
using std::string;
namespace Ingen { namespace Client { class PatchModel; } }
@@ -40,14 +40,14 @@ class PatchPropertiesWindow : public Gtk::Window
public:
PatchPropertiesWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade);
- void present(CountedPtr<PatchModel> patch_model) { set_patch(patch_model); Gtk::Window::present(); }
- void set_patch(CountedPtr<PatchModel> patch_model);
+ void present(SharedPtr<PatchModel> patch_model) { set_patch(patch_model); Gtk::Window::present(); }
+ void set_patch(SharedPtr<PatchModel> patch_model);
void cancel_clicked();
void ok_clicked();
private:
- CountedPtr<PatchModel> m_patch_model;
+ SharedPtr<PatchModel> m_patch_model;
Gtk::Entry* m_author_entry;
Gtk::TextView* m_textview;
diff --git a/src/progs/ingenuity/PatchTreeWindow.cpp b/src/progs/ingenuity/PatchTreeWindow.cpp
index 00aa324f..5fd17abd 100644
--- a/src/progs/ingenuity/PatchTreeWindow.cpp
+++ b/src/progs/ingenuity/PatchTreeWindow.cpp
@@ -23,7 +23,7 @@
#include "SubpatchModule.h"
#include "PatchModel.h"
#include "WindowFactory.h"
-#include "util/Path.h"
+#include "raul/Path.h"
namespace Ingenuity {
@@ -72,22 +72,22 @@ PatchTreeWindow::init(Store& store)
void
-PatchTreeWindow::new_object(CountedPtr<ObjectModel> object)
+PatchTreeWindow::new_object(SharedPtr<ObjectModel> object)
{
- CountedPtr<PatchModel> patch = PtrCast<PatchModel>(object);
+ SharedPtr<PatchModel> patch = PtrCast<PatchModel>(object);
if (patch)
add_patch(patch);
}
void
-PatchTreeWindow::add_patch(CountedPtr<PatchModel> pm)
+PatchTreeWindow::add_patch(SharedPtr<PatchModel> pm)
{
if (!pm->parent()) {
Gtk::TreeModel::iterator iter = m_patch_treestore->append();
Gtk::TreeModel::Row row = *iter;
if (pm->path() == "/") {
- CountedPtr<OSCEngineSender> osc_sender = PtrCast<OSCEngineSender>(App::instance().engine());
+ SharedPtr<OSCEngineSender> osc_sender = PtrCast<OSCEngineSender>(App::instance().engine());
string root_name = osc_sender ? osc_sender->engine_url() : "Internal";
// Hack off trailing '/' if it's there (ugly)
//if (root_name.substr(root_name.length()-1,1) == "/")
@@ -132,7 +132,7 @@ Gtk::TreeModel::iterator
PatchTreeWindow::find_patch(Gtk::TreeModel::Children root, const Path& path)
{
for (Gtk::TreeModel::iterator c = root.begin(); c != root.end(); ++c) {
- CountedPtr<PatchModel> pm = (*c)[m_patch_tree_columns.patch_model_col];
+ SharedPtr<PatchModel> pm = (*c)[m_patch_tree_columns.patch_model_col];
if (pm->path() == path) {
return c;
} else if ((*c)->children().size() > 0) {
@@ -151,7 +151,7 @@ PatchTreeWindow::event_patch_selected()
Gtk::TreeModel::iterator active = m_patch_tree_selection->get_selected();
if (active) {
Gtk::TreeModel::Row row = *active;
- CountedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
+ SharedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
}
}
*/
@@ -165,7 +165,7 @@ PatchTreeWindow::show_patch_menu(GdkEventButton* ev)
Gtk::TreeModel::iterator active = m_patch_tree_selection->get_selected();
if (active) {
Gtk::TreeModel::Row row = *active;
- CountedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
+ SharedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
if (pm)
cerr << "FIXME: patch menu\n";
//pm->show_menu(ev);
@@ -178,7 +178,7 @@ PatchTreeWindow::event_patch_activated(const Gtk::TreeModel::Path& path, Gtk::Tr
{
Gtk::TreeModel::iterator active = m_patch_treestore->get_iter(path);
Gtk::TreeModel::Row row = *active;
- CountedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
+ SharedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
App::instance().window_factory()->present_patch(pm);
}
@@ -191,7 +191,7 @@ PatchTreeWindow::event_patch_enabled_toggled(const Glib::ustring& path_str)
Gtk::TreeModel::iterator active = m_patch_treestore->get_iter(path);
Gtk::TreeModel::Row row = *active;
- CountedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
+ SharedPtr<PatchModel> pm = row[m_patch_tree_columns.patch_model_col];
Glib::ustring patch_path = pm->path();
assert(pm);
diff --git a/src/progs/ingenuity/PatchTreeWindow.h b/src/progs/ingenuity/PatchTreeWindow.h
index 91e68bf1..ab18d526 100644
--- a/src/progs/ingenuity/PatchTreeWindow.h
+++ b/src/progs/ingenuity/PatchTreeWindow.h
@@ -19,7 +19,7 @@
#include <gtkmm.h>
#include <libglademm.h>
-#include "util/Path.h"
+#include "raul/Path.h"
namespace Ingen { namespace Client {
class Store;
@@ -43,13 +43,13 @@ public:
void init(Store& store);
- void new_object(CountedPtr<ObjectModel> object);
+ void new_object(SharedPtr<ObjectModel> object);
void patch_enabled(const Path& path);
void patch_disabled(const Path& path);
void patch_renamed(const Path& old_path, const Path& new_path);
- void add_patch(CountedPtr<PatchModel> pm);
+ void add_patch(SharedPtr<PatchModel> pm);
void remove_patch(const Path& path);
void show_patch_menu(GdkEventButton* ev);
@@ -69,7 +69,7 @@ protected:
Gtk::TreeModelColumn<Glib::ustring> name_col;
Gtk::TreeModelColumn<bool> enabled_col;
- Gtk::TreeModelColumn<CountedPtr<PatchModel> > patch_model_col;
+ Gtk::TreeModelColumn<SharedPtr<PatchModel> > patch_model_col;
};
bool m_enable_signal;
diff --git a/src/progs/ingenuity/PatchView.cpp b/src/progs/ingenuity/PatchView.cpp
index 69dcf0b8..590838f0 100644
--- a/src/progs/ingenuity/PatchView.cpp
+++ b/src/progs/ingenuity/PatchView.cpp
@@ -54,7 +54,7 @@ PatchView::PatchView(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::X
void
-PatchView::set_patch(CountedPtr<PatchModel> patch)
+PatchView::set_patch(SharedPtr<PatchModel> patch)
{
assert(!_canvas); // FIXME: remove
@@ -63,7 +63,7 @@ PatchView::set_patch(CountedPtr<PatchModel> patch)
assert(_breadcrumb_container); // ensure created
_patch = patch;
- _canvas = CountedPtr<PatchCanvas>(new PatchCanvas(patch, 1600*2, 1200*2));
+ _canvas = SharedPtr<PatchCanvas>(new PatchCanvas(patch, 1600*2, 1200*2));
_canvas->build();
_canvas_scrolledwindow->add(*_canvas);
@@ -95,8 +95,8 @@ PatchView::~PatchView()
}
-CountedPtr<PatchView>
-PatchView::create(CountedPtr<PatchModel> patch)
+SharedPtr<PatchView>
+PatchView::create(SharedPtr<PatchModel> patch)
{
const Glib::RefPtr<Gnome::Glade::Xml>& xml = GladeFactory::new_glade_reference("patch_view_box");
@@ -104,7 +104,7 @@ PatchView::create(CountedPtr<PatchModel> patch)
xml->get_widget_derived("patch_view_box", result);
assert(result);
result->set_patch(patch);
- return CountedPtr<PatchView>(result);
+ return SharedPtr<PatchView>(result);
}
diff --git a/src/progs/ingenuity/PatchView.h b/src/progs/ingenuity/PatchView.h
index 0a445baa..48823064 100644
--- a/src/progs/ingenuity/PatchView.h
+++ b/src/progs/ingenuity/PatchView.h
@@ -21,7 +21,7 @@
#include <gtkmm.h>
#include <libglademm/xml.h>
#include <libglademm.h>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "PatchModel.h"
using std::string;
@@ -57,14 +57,14 @@ public:
PatchView(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml);
~PatchView();
- CountedPtr<PatchCanvas> canvas() const { return _canvas; }
- CountedPtr<PatchModel> patch() const { return _patch; }
+ SharedPtr<PatchCanvas> canvas() const { return _canvas; }
+ SharedPtr<PatchModel> patch() const { return _patch; }
Gtk::Viewport* breadcrumb_container() const { return _breadcrumb_container; }
- static CountedPtr<PatchView> create(CountedPtr<PatchModel> patch);
+ static SharedPtr<PatchView> create(SharedPtr<PatchModel> patch);
private:
- void set_patch(CountedPtr<PatchModel> patch);
+ void set_patch(SharedPtr<PatchModel> patch);
void process_toggled();
void clear_clicked();
@@ -75,8 +75,8 @@ private:
void zoom_full();
- CountedPtr<PatchModel> _patch;
- CountedPtr<PatchCanvas> _canvas;
+ SharedPtr<PatchModel> _patch;
+ SharedPtr<PatchCanvas> _canvas;
Gtk::ScrolledWindow* _canvas_scrolledwindow;
diff --git a/src/progs/ingenuity/PatchWindow.cpp b/src/progs/ingenuity/PatchWindow.cpp
index 2ca3da14..11881e59 100644
--- a/src/progs/ingenuity/PatchWindow.cpp
+++ b/src/progs/ingenuity/PatchWindow.cpp
@@ -139,13 +139,13 @@ PatchWindow::~PatchWindow()
/** Set the patch controller from a Path (for use by eg. BreadCrumbBox)
*/
void
-PatchWindow::set_patch_from_path(const Path& path, CountedPtr<PatchView> view)
+PatchWindow::set_patch_from_path(const Path& path, SharedPtr<PatchView> view)
{
if (view) {
assert(view->patch()->path() == path);
App::instance().window_factory()->present_patch(view->patch(), this, view);
} else {
- CountedPtr<PatchModel> model = PtrCast<PatchModel>(App::instance().store()->object(path));
+ SharedPtr<PatchModel> model = PtrCast<PatchModel>(App::instance().store()->object(path));
if (model)
App::instance().window_factory()->present_patch(model, this);
}
@@ -157,7 +157,7 @@ PatchWindow::set_patch_from_path(const Path& path, CountedPtr<PatchView> view)
* If @a view is NULL, a new view will be created.
*/
void
-PatchWindow::set_patch(CountedPtr<PatchModel> patch, CountedPtr<PatchView> view)
+PatchWindow::set_patch(SharedPtr<PatchModel> patch, SharedPtr<PatchView> view)
{
if (!patch || patch == m_patch)
return;
diff --git a/src/progs/ingenuity/PatchWindow.h b/src/progs/ingenuity/PatchWindow.h
index 3f9331ec..2cfbbb9b 100644
--- a/src/progs/ingenuity/PatchWindow.h
+++ b/src/progs/ingenuity/PatchWindow.h
@@ -22,8 +22,8 @@
#include <gtkmm.h>
#include <libglademm/xml.h>
#include <libglademm.h>
-#include "util/Path.h"
-#include "util/CountedPtr.h"
+#include "raul/Path.h"
+#include "raul/SharedPtr.h"
#include "PatchModel.h"
#include "PatchView.h"
using Ingen::Client::PatchModel;
@@ -65,10 +65,10 @@ public:
PatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& glade_xml);
~PatchWindow();
- void set_patch_from_path(const Path& path, CountedPtr<PatchView> view);
- void set_patch(CountedPtr<PatchModel> pc, CountedPtr<PatchView> view);
+ void set_patch_from_path(const Path& path, SharedPtr<PatchView> view);
+ void set_patch(SharedPtr<PatchModel> pc, SharedPtr<PatchView> view);
- CountedPtr<PatchModel> patch() const { return m_patch; }
+ SharedPtr<PatchModel> patch() const { return m_patch; }
Gtk::MenuItem* menu_view_control_window() { return m_menu_view_control_window; }
@@ -91,8 +91,8 @@ private:
void event_show_controls();
void event_show_engine();
- CountedPtr<PatchModel> m_patch;
- CountedPtr<PatchView> m_view;
+ SharedPtr<PatchModel> m_patch;
+ SharedPtr<PatchView> m_view;
bool m_enable_signal;
bool m_position_stored;
diff --git a/src/progs/ingenuity/Port.cpp b/src/progs/ingenuity/Port.cpp
index 560be981..5d12cffa 100644
--- a/src/progs/ingenuity/Port.cpp
+++ b/src/progs/ingenuity/Port.cpp
@@ -31,7 +31,7 @@ namespace Ingenuity {
/** @param flip Make an input port appear as an output port, and vice versa.
*/
-Port::Port(boost::shared_ptr<LibFlowCanvas::Module> module, CountedPtr<PortModel> pm, bool flip)
+Port::Port(boost::shared_ptr<LibFlowCanvas::Module> module, SharedPtr<PortModel> pm, bool flip)
: LibFlowCanvas::Port(module,
pm->path().name(),
flip ? (!pm->is_input()) : pm->is_input(),
diff --git a/src/progs/ingenuity/Port.h b/src/progs/ingenuity/Port.h
index 84e50e7d..a23cd2c9 100644
--- a/src/progs/ingenuity/Port.h
+++ b/src/progs/ingenuity/Port.h
@@ -20,7 +20,7 @@
#include <cassert>
#include <string>
#include <flowcanvas/Port.h>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
namespace Ingen { namespace Client { class PortModel; } }
using Ingen::Client::PortModel;
@@ -35,14 +35,14 @@ namespace Ingenuity {
class Port : public LibFlowCanvas::Port
{
public:
- Port(boost::shared_ptr<LibFlowCanvas::Module> module, CountedPtr<PortModel> pm, bool flip = false);
+ Port(boost::shared_ptr<LibFlowCanvas::Module> module, SharedPtr<PortModel> pm, bool flip = false);
virtual ~Port() {}
- CountedPtr<PortModel> model() const { return m_port_model; }
+ SharedPtr<PortModel> model() const { return m_port_model; }
private:
- CountedPtr<PortModel> m_port_model;
+ SharedPtr<PortModel> m_port_model;
};
diff --git a/src/progs/ingenuity/RenameWindow.cpp b/src/progs/ingenuity/RenameWindow.cpp
index 37d4fc39..ba08fef6 100644
--- a/src/progs/ingenuity/RenameWindow.cpp
+++ b/src/progs/ingenuity/RenameWindow.cpp
@@ -46,7 +46,7 @@ RenameWindow::RenameWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Gl
* This function MUST be called before using this object in any way.
*/
void
-RenameWindow::set_object(CountedPtr<ObjectModel> object)
+RenameWindow::set_object(SharedPtr<ObjectModel> object)
{
m_object = object;
m_name_entry->set_text(object->path().name());
diff --git a/src/progs/ingenuity/RenameWindow.h b/src/progs/ingenuity/RenameWindow.h
index fe342100..a00e1e73 100644
--- a/src/progs/ingenuity/RenameWindow.h
+++ b/src/progs/ingenuity/RenameWindow.h
@@ -19,7 +19,7 @@
#include <gtkmm.h>
#include <libglademm.h>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "ObjectModel.h"
using Ingen::Client::ObjectModel;
@@ -35,16 +35,16 @@ class RenameWindow : public Gtk::Window
public:
RenameWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& refGlade);
- void present(CountedPtr<ObjectModel> object) { set_object(object); Gtk::Window::present(); }
+ void present(SharedPtr<ObjectModel> object) { set_object(object); Gtk::Window::present(); }
private:
- void set_object(CountedPtr<ObjectModel> object);
+ void set_object(SharedPtr<ObjectModel> object);
void name_changed();
void cancel_clicked();
void ok_clicked();
- CountedPtr<ObjectModel> m_object;
+ SharedPtr<ObjectModel> m_object;
Gtk::Entry* m_name_entry;
Gtk::Label* m_message_label;
diff --git a/src/progs/ingenuity/SubpatchModule.cpp b/src/progs/ingenuity/SubpatchModule.cpp
index 566248f9..d67f7e26 100644
--- a/src/progs/ingenuity/SubpatchModule.cpp
+++ b/src/progs/ingenuity/SubpatchModule.cpp
@@ -31,7 +31,7 @@ using std::cerr; using std::cout; using std::endl;
namespace Ingenuity {
-SubpatchModule::SubpatchModule(boost::shared_ptr<PatchCanvas> canvas, CountedPtr<PatchModel> patch)
+SubpatchModule::SubpatchModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PatchModel> patch)
: NodeModule(canvas, patch),
m_patch(patch)
{
@@ -45,7 +45,7 @@ SubpatchModule::on_double_click(GdkEventButton* event)
{
assert(m_patch);
- CountedPtr<PatchModel> parent = PtrCast<PatchModel>(m_patch->parent());
+ SharedPtr<PatchModel> parent = PtrCast<PatchModel>(m_patch->parent());
PatchWindow* const preferred = ( (parent && (event->state & GDK_SHIFT_MASK))
? NULL
@@ -64,7 +64,7 @@ SubpatchModule::browse_to_patch()
{
assert(m_patch->parent());
- CountedPtr<PatchModel> parent = PtrCast<PatchModel>(m_patch->parent());
+ SharedPtr<PatchModel> parent = PtrCast<PatchModel>(m_patch->parent());
PatchWindow* const preferred = ( (parent)
? App::instance().window_factory()->patch_window(parent)
diff --git a/src/progs/ingenuity/SubpatchModule.h b/src/progs/ingenuity/SubpatchModule.h
index 6d5d3e35..9ae1bea3 100644
--- a/src/progs/ingenuity/SubpatchModule.h
+++ b/src/progs/ingenuity/SubpatchModule.h
@@ -21,7 +21,7 @@
#include <string>
#include <libgnomecanvasmm.h>
#include "NodeModule.h"
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "PatchModel.h"
#include "PatchPortModule.h"
using std::string; using std::list;
@@ -47,7 +47,7 @@ class NodeControlWindow;
class SubpatchModule : public NodeModule
{
public:
- SubpatchModule(boost::shared_ptr<PatchCanvas> canvas, CountedPtr<PatchModel> controller);
+ SubpatchModule(boost::shared_ptr<PatchCanvas> canvas, SharedPtr<PatchModel> controller);
virtual ~SubpatchModule() {}
void on_double_click(GdkEventButton* ev);
@@ -56,10 +56,10 @@ public:
void browse_to_patch();
void menu_remove();
- CountedPtr<PatchModel> patch() { return m_patch; }
+ SharedPtr<PatchModel> patch() { return m_patch; }
protected:
- CountedPtr<PatchModel> m_patch;
+ SharedPtr<PatchModel> m_patch;
};
diff --git a/src/progs/ingenuity/WindowFactory.cpp b/src/progs/ingenuity/WindowFactory.cpp
index 3edbf568..33d545ca 100644
--- a/src/progs/ingenuity/WindowFactory.cpp
+++ b/src/progs/ingenuity/WindowFactory.cpp
@@ -62,7 +62,7 @@ WindowFactory::~WindowFactory()
PatchWindow*
-WindowFactory::patch_window(CountedPtr<PatchModel> patch)
+WindowFactory::patch_window(SharedPtr<PatchModel> patch)
{
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
@@ -71,7 +71,7 @@ WindowFactory::patch_window(CountedPtr<PatchModel> patch)
NodeControlWindow*
-WindowFactory::control_window(CountedPtr<NodeModel> node)
+WindowFactory::control_window(SharedPtr<NodeModel> node)
{
ControlWindowMap::iterator w = _control_windows.find(node->path());
@@ -86,7 +86,7 @@ WindowFactory::control_window(CountedPtr<NodeModel> node)
* @a preferred left unmodified.
*/
void
-WindowFactory::present_patch(CountedPtr<PatchModel> patch, PatchWindow* preferred, CountedPtr<PatchView> view)
+WindowFactory::present_patch(SharedPtr<PatchModel> patch, PatchWindow* preferred, SharedPtr<PatchView> view)
{
assert( !view || view->patch() == patch);
@@ -111,7 +111,7 @@ WindowFactory::present_patch(CountedPtr<PatchModel> patch, PatchWindow* preferre
PatchWindow*
-WindowFactory::new_patch_window(CountedPtr<PatchModel> patch, CountedPtr<PatchView> view)
+WindowFactory::new_patch_window(SharedPtr<PatchModel> patch, SharedPtr<PatchView> view)
{
assert( !view || view->patch() == patch);
@@ -160,7 +160,7 @@ WindowFactory::remove_patch_window(PatchWindow* win, GdkEventAny* ignored)
void
-WindowFactory::present_controls(CountedPtr<NodeModel> node)
+WindowFactory::present_controls(SharedPtr<NodeModel> node)
{
NodeControlWindow* win = control_window(node);
@@ -174,7 +174,7 @@ WindowFactory::present_controls(CountedPtr<NodeModel> node)
NodeControlWindow*
-WindowFactory::new_control_window(CountedPtr<NodeModel> node)
+WindowFactory::new_control_window(SharedPtr<NodeModel> node)
{
size_t poly = 1;
if (node->polyphonic())
@@ -205,7 +205,7 @@ WindowFactory::remove_control_window(NodeControlWindow* win, GdkEventAny* ignore
}
void
-WindowFactory::present_load_plugin(CountedPtr<PatchModel> patch, MetadataMap data)
+WindowFactory::present_load_plugin(SharedPtr<PatchModel> patch, MetadataMap data)
{
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
@@ -217,7 +217,7 @@ WindowFactory::present_load_plugin(CountedPtr<PatchModel> patch, MetadataMap dat
void
-WindowFactory::present_load_patch(CountedPtr<PatchModel> patch, MetadataMap data)
+WindowFactory::present_load_patch(SharedPtr<PatchModel> patch, MetadataMap data)
{
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
@@ -231,7 +231,7 @@ WindowFactory::present_load_patch(CountedPtr<PatchModel> patch, MetadataMap data
void
-WindowFactory::present_new_subpatch(CountedPtr<PatchModel> patch, MetadataMap data)
+WindowFactory::present_new_subpatch(SharedPtr<PatchModel> patch, MetadataMap data)
{
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
@@ -243,7 +243,7 @@ WindowFactory::present_new_subpatch(CountedPtr<PatchModel> patch, MetadataMap da
void
-WindowFactory::present_load_subpatch(CountedPtr<PatchModel> patch, MetadataMap data)
+WindowFactory::present_load_subpatch(SharedPtr<PatchModel> patch, MetadataMap data)
{
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
@@ -255,7 +255,7 @@ WindowFactory::present_load_subpatch(CountedPtr<PatchModel> patch, MetadataMap d
void
-WindowFactory::present_rename(CountedPtr<ObjectModel> object)
+WindowFactory::present_rename(SharedPtr<ObjectModel> object)
{
PatchWindowMap::iterator w = _patch_windows.find(object->path());
@@ -267,9 +267,9 @@ WindowFactory::present_rename(CountedPtr<ObjectModel> object)
void
-WindowFactory::present_properties(CountedPtr<NodeModel> node)
+WindowFactory::present_properties(SharedPtr<NodeModel> node)
{
- CountedPtr<PatchModel> patch = PtrCast<PatchModel>(node);
+ SharedPtr<PatchModel> patch = PtrCast<PatchModel>(node);
if (patch) {
PatchWindowMap::iterator w = _patch_windows.find(patch->path());
diff --git a/src/progs/ingenuity/WindowFactory.h b/src/progs/ingenuity/WindowFactory.h
index 37d218f6..194f7319 100644
--- a/src/progs/ingenuity/WindowFactory.h
+++ b/src/progs/ingenuity/WindowFactory.h
@@ -19,7 +19,7 @@
#include <map>
#include <gtkmm.h>
-#include "util/CountedPtr.h"
+#include "raul/SharedPtr.h"
#include "PatchView.h"
#include "PatchModel.h"
using Ingen::Client::PatchModel;
@@ -45,21 +45,21 @@ public:
WindowFactory();
~WindowFactory();
- PatchWindow* patch_window(CountedPtr<PatchModel> patch);
- NodeControlWindow* control_window(CountedPtr<NodeModel> node);
+ PatchWindow* patch_window(SharedPtr<PatchModel> patch);
+ NodeControlWindow* control_window(SharedPtr<NodeModel> node);
- void present_patch(CountedPtr<PatchModel> patch,
+ void present_patch(SharedPtr<PatchModel> patch,
PatchWindow* preferred = NULL,
- CountedPtr<PatchView> patch = CountedPtr<PatchView>());
+ SharedPtr<PatchView> patch = SharedPtr<PatchView>());
- void present_controls(CountedPtr<NodeModel> node);
+ void present_controls(SharedPtr<NodeModel> node);
- void present_load_plugin(CountedPtr<PatchModel> patch, MetadataMap data = MetadataMap());
- void present_load_patch(CountedPtr<PatchModel> patch, MetadataMap data = MetadataMap());
- void present_new_subpatch(CountedPtr<PatchModel> patch, MetadataMap data = MetadataMap());
- void present_load_subpatch(CountedPtr<PatchModel> patch, MetadataMap data = MetadataMap());
- void present_rename(CountedPtr<ObjectModel> object);
- void present_properties(CountedPtr<NodeModel> node);
+ void present_load_plugin(SharedPtr<PatchModel> patch, MetadataMap data = MetadataMap());
+ void present_load_patch(SharedPtr<PatchModel> patch, MetadataMap data = MetadataMap());
+ void present_new_subpatch(SharedPtr<PatchModel> patch, MetadataMap data = MetadataMap());
+ void present_load_subpatch(SharedPtr<PatchModel> patch, MetadataMap data = MetadataMap());
+ void present_rename(SharedPtr<ObjectModel> object);
+ void present_properties(SharedPtr<NodeModel> node);
bool remove_patch_window(PatchWindow* win, GdkEventAny* ignored = NULL);
@@ -67,10 +67,10 @@ private:
typedef std::map<Path, PatchWindow*> PatchWindowMap;
typedef std::map<Path, NodeControlWindow*> ControlWindowMap;
- PatchWindow* new_patch_window(CountedPtr<PatchModel> patch, CountedPtr<PatchView> view);
+ PatchWindow* new_patch_window(SharedPtr<PatchModel> patch, SharedPtr<PatchView> view);
- NodeControlWindow* new_control_window(CountedPtr<NodeModel> node);
+ NodeControlWindow* new_control_window(SharedPtr<NodeModel> node);
bool remove_control_window(NodeControlWindow* win, GdkEventAny* ignored);
PatchWindowMap _patch_windows;
diff --git a/src/progs/patch_loader/new_patch_loader.cpp b/src/progs/patch_loader/new_patch_loader.cpp
index 5a561f5d..f7abad54 100644
--- a/src/progs/patch_loader/new_patch_loader.cpp
+++ b/src/progs/patch_loader/new_patch_loader.cpp
@@ -17,7 +17,7 @@
#include <iostream>
#include <unistd.h>
#include "cmdline.h" // generated by gengetopt
-#include "util/Path.h"
+#include "raul/Path.h"
#include "OSCEngineInterface.h"
#include "PatchLibrarian.h"
diff --git a/src/progs/patch_loader/patch_loader.cpp b/src/progs/patch_loader/patch_loader.cpp
index b0d8bc94..25fd626f 100644
--- a/src/progs/patch_loader/patch_loader.cpp
+++ b/src/progs/patch_loader/patch_loader.cpp
@@ -18,7 +18,7 @@
#include "OSCModelEngineInterface.h"
#include "Serializer.h"
#include "PatchModel.h"
-#include "util/Path.h"
+#include "raul/Path.h"
#include <iostream>
#include <unistd.h>
#include "cmdline.h" // generated by gengetopt
@@ -52,7 +52,7 @@ int main(int argc, char** argv)
/* **** Mr. Spock.. Engage **** */
- CountedPtr<OSCModelEngineInterface> engine(new OSCModelEngineInterface(engine_url));
+ SharedPtr<OSCModelEngineInterface> engine(new OSCModelEngineInterface(engine_url));
Serializer serializer(engine);
/* Connect to engine */
@@ -72,7 +72,7 @@ int main(int argc, char** argv)
// Load patches
for (uint i=0; i < args_info.inputs_num; ++i) {
cerr << "FIXME: load patch" << endl;
- //CountedPtr<PatchModel> pm(new PatchModel("", 0));
+ //SharedPtr<PatchModel> pm(new PatchModel("", 0));
//pm->filename(args_info.inputs[i]);
//serializer.load_patch(pm, true);
}
diff --git a/src/progs/server/main.cpp b/src/progs/server/main.cpp
index c33014a5..fa3548d3 100644
--- a/src/progs/server/main.cpp
+++ b/src/progs/server/main.cpp
@@ -34,7 +34,7 @@
using std::cout; using std::endl; using std::cerr;
using namespace Ingen;
-CountedPtr<Engine> engine;
+SharedPtr<Engine> engine;
void
@@ -137,7 +137,7 @@ main(int argc, char** argv)
set_denormal_flags();
- engine = CountedPtr<Engine>(new Engine());
+ engine = SharedPtr<Engine>(new Engine());
OSCEngineReceiver* receiver = new OSCEngineReceiver(
engine, pre_processor_queue_size, args_info.port_arg);