diff options
Diffstat (limited to 'src/progs')
58 files changed, 262 insertions, 262 deletions
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); |