diff options
author | David Robillard <d@drobilla.net> | 2012-04-28 01:10:26 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-04-28 01:10:26 +0000 |
commit | 70f4bcdde45e94dbe27300a5069994aebc523cab (patch) | |
tree | 049b88a7adfb4c11d4fb3643024422ce8b20ab32 | |
parent | b08a8a15fd136ab8323e282484a5a96d698dc808 (diff) | |
download | ingen-70f4bcdde45e94dbe27300a5069994aebc523cab.tar.gz ingen-70f4bcdde45e94dbe27300a5069994aebc523cab.tar.bz2 ingen-70f4bcdde45e94dbe27300a5069994aebc523cab.zip |
Remove using declarations from headers.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4288 a436a847-0d15-0410-975c-d299462d15a1
55 files changed, 318 insertions, 311 deletions
diff --git a/src/gui/App.cpp b/src/gui/App.cpp index 38685d5b..9fd2c214 100644 --- a/src/gui/App.cpp +++ b/src/gui/App.cpp @@ -58,9 +58,13 @@ using namespace Ingen::Client; namespace Raul { class Deletable; } -namespace Ingen { namespace Client { class PluginModel; } } - namespace Ingen { + +namespace Client { class PluginModel; } + +using namespace Client; +using namespace Shared; + namespace GUI { class Port; @@ -190,7 +194,7 @@ App::detach() } } -SharedPtr<Serialiser> +SharedPtr<Serialisation::Serialiser> App::serialiser() { if (!_world->serialiser()) diff --git a/src/gui/Configuration.cpp b/src/gui/Configuration.cpp index 58499e26..23246719 100644 --- a/src/gui/Configuration.cpp +++ b/src/gui/Configuration.cpp @@ -80,7 +80,7 @@ Configuration::apply_settings() } uint32_t -Configuration::get_port_color(const PortModel* p) +Configuration::get_port_color(const Client::PortModel* p) { assert(p != NULL); const Shared::URIs& uris = _app.uris(); diff --git a/src/gui/Configuration.hpp b/src/gui/Configuration.hpp index ac95fbe9..0b33016b 100644 --- a/src/gui/Configuration.hpp +++ b/src/gui/Configuration.hpp @@ -24,8 +24,6 @@ #include "raul/SharedPtr.hpp" namespace Ingen { namespace Client { class PortModel; } } -using Ingen::Client::PortModel; -using std::string; namespace Ingen { namespace GUI { @@ -46,15 +44,15 @@ public: Configuration(App& app); ~Configuration(); - void load_settings(string filename = ""); - void save_settings(string filename = ""); + void load_settings(std::string filename = ""); + void save_settings(std::string filename = ""); void apply_settings(); - const string& patch_folder() { return _patch_folder; } - void set_patch_folder(const string& f) { _patch_folder = f; } + const std::string& patch_folder() { return _patch_folder; } + void set_patch_folder(const std::string& f) { _patch_folder = f; } - uint32_t get_port_color(const PortModel* p); + uint32_t get_port_color(const Client::PortModel* p); enum NameStyle { PATH, HUMAN, NONE }; @@ -65,7 +63,7 @@ private: App& _app; /** Most recent patch folder shown in open dialog */ - string _patch_folder; + std::string _patch_folder; NameStyle _name_style; diff --git a/src/gui/Connection.cpp b/src/gui/Connection.cpp index e0376a33..6b29c1d5 100644 --- a/src/gui/Connection.cpp +++ b/src/gui/Connection.cpp @@ -24,11 +24,11 @@ using namespace std; namespace Ingen { namespace GUI { -Connection::Connection(Ganv::Canvas& canvas, - boost::shared_ptr<const ConnectionModel> model, - Ganv::Node* src, - Ganv::Node* dst, - uint32_t color) +Connection::Connection(Ganv::Canvas& canvas, + boost::shared_ptr<const Client::ConnectionModel> model, + Ganv::Node* src, + Ganv::Node* dst, + uint32_t color) : Ganv::Edge(canvas, src, dst, color) , _connection_model(model) { diff --git a/src/gui/Connection.hpp b/src/gui/Connection.hpp index a35968b9..3f2b04a9 100644 --- a/src/gui/Connection.hpp +++ b/src/gui/Connection.hpp @@ -25,7 +25,6 @@ namespace Ingen { namespace Client { class ConnectionModel; } -using Client::ConnectionModel; namespace GUI { @@ -36,16 +35,16 @@ namespace GUI { class Connection : public Ganv::Edge { public: - Connection(Ganv::Canvas& canvas, - boost::shared_ptr<const ConnectionModel> model, - Ganv::Node* src, - Ganv::Node* dst, - uint32_t color); + Connection(Ganv::Canvas& canvas, + boost::shared_ptr<const Client::ConnectionModel> model, + Ganv::Node* src, + Ganv::Node* dst, + uint32_t color); - SharedPtr<const ConnectionModel> model() const { return _connection_model; } + SharedPtr<const Client::ConnectionModel> model() const { return _connection_model; } private: - SharedPtr<const ConnectionModel> _connection_model; + SharedPtr<const Client::ConnectionModel> _connection_model; }; } // namespace GUI diff --git a/src/gui/ControlPanel.cpp b/src/gui/ControlPanel.cpp index 5cbfd38a..ca838e53 100644 --- a/src/gui/ControlPanel.cpp +++ b/src/gui/ControlPanel.cpp @@ -28,6 +28,9 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; + namespace GUI { ControlPanel::ControlPanel(BaseObjectType* cobject, diff --git a/src/gui/ControlPanel.hpp b/src/gui/ControlPanel.hpp index 52d169a4..2c3551e5 100644 --- a/src/gui/ControlPanel.hpp +++ b/src/gui/ControlPanel.hpp @@ -33,7 +33,6 @@ namespace Client { class PortModel; class NodeModel; } -using namespace Ingen::Client; namespace GUI { @@ -51,11 +50,11 @@ public: const Glib::RefPtr<Gtk::Builder>& xml); virtual ~ControlPanel(); - void init(App& app, SharedPtr<const NodeModel> node, uint32_t poly); + void init(App& app, SharedPtr<const Client::NodeModel> node, uint32_t poly); Control* find_port(const Raul::Path& path) const; - void add_port(SharedPtr<const PortModel> port); + void add_port(SharedPtr<const Client::PortModel> port); void remove_port(const Raul::Path& path); void enable_port(const Raul::Path& path); @@ -65,10 +64,11 @@ public: std::pair<int,int> ideal_size() const { return _ideal_size; } // Callback for Control - void value_changed_atom(SharedPtr<const PortModel> port, const Raul::Atom& val); + void value_changed_atom(SharedPtr<const Client::PortModel> port, + const Raul::Atom& val); template <typename T> - void value_changed(SharedPtr<const PortModel> port, T val) { + void value_changed(SharedPtr<const Client::PortModel> port, T val) { this->value_changed_atom(port, _app->forge().make(val)); } diff --git a/src/gui/LoadPatchWindow.cpp b/src/gui/LoadPatchWindow.cpp index c3e937c0..75c0b4d8 100644 --- a/src/gui/LoadPatchWindow.cpp +++ b/src/gui/LoadPatchWindow.cpp @@ -34,6 +34,10 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { LoadPatchWindow::LoadPatchWindow(BaseObjectType* cobject, diff --git a/src/gui/LoadPatchWindow.hpp b/src/gui/LoadPatchWindow.hpp index 5f69eb94..25194309 100644 --- a/src/gui/LoadPatchWindow.hpp +++ b/src/gui/LoadPatchWindow.hpp @@ -23,12 +23,9 @@ #include "ingen/GraphObject.hpp" -using namespace Ingen::Shared; - namespace Ingen { namespace Client { class PatchModel; } -using Ingen::Client::PatchModel; namespace GUI { @@ -46,11 +43,11 @@ public: void init(App& app) { _app = &app; } - void set_patch(SharedPtr<const PatchModel> patch); + void set_patch(SharedPtr<const Client::PatchModel> patch); - void present(SharedPtr<const PatchModel> patch, - bool import, - GraphObject::Properties data); + void present(SharedPtr<const Client::PatchModel> patch, + bool import, + GraphObject::Properties data); protected: void on_show(); @@ -70,7 +67,7 @@ private: GraphObject::Properties _initial_data; - SharedPtr<const PatchModel> _patch; + SharedPtr<const Client::PatchModel> _patch; Gtk::Label* _symbol_label; Gtk::Entry* _symbol_entry; diff --git a/src/gui/LoadPluginWindow.cpp b/src/gui/LoadPluginWindow.cpp index 7cf0cce7..067a706e 100644 --- a/src/gui/LoadPluginWindow.cpp +++ b/src/gui/LoadPluginWindow.cpp @@ -36,6 +36,10 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { LoadPluginWindow::LoadPluginWindow(BaseObjectType* cobject, diff --git a/src/gui/LoadPluginWindow.hpp b/src/gui/LoadPluginWindow.hpp index d580f367..86ec5b2a 100644 --- a/src/gui/LoadPluginWindow.hpp +++ b/src/gui/LoadPluginWindow.hpp @@ -30,13 +30,9 @@ #include "Window.hpp" -using namespace Ingen::Shared; - namespace Ingen { namespace Client { class PatchModel; class PluginModel; } -using Ingen::Client::PluginModel; -using Ingen::Client::PatchModel; namespace GUI { @@ -52,12 +48,13 @@ public: LoadPluginWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& xml); - void set_patch(SharedPtr<const PatchModel> patch); + void set_patch(SharedPtr<const Client::PatchModel> patch); void set_plugins(SharedPtr<const Client::ClientStore::Plugins> plugins); - void add_plugin(SharedPtr<const PluginModel> plugin); + void add_plugin(SharedPtr<const Client::PluginModel> plugin); - void present(SharedPtr<const PatchModel> patch, GraphObject::Properties data); + void present(SharedPtr<const Client::PatchModel> patch, + GraphObject::Properties data); protected: void on_show(); @@ -81,7 +78,7 @@ private: Gtk::TreeModelColumn<Glib::ustring> _col_uri; // Not displayed: - Gtk::TreeModelColumn< SharedPtr<const PluginModel> > _col_plugin; + Gtk::TreeModelColumn< SharedPtr<const Client::PluginModel> > _col_plugin; }; /** Column for the filter criteria combo box. */ @@ -103,8 +100,8 @@ private: void name_cleared(Gtk::EntryIconPosition pos, const GdkEventButton* event); #endif - void set_row(Gtk::TreeModel::Row& row, SharedPtr<const PluginModel> plugin); - void new_plugin(SharedPtr<const PluginModel> plugin); + void set_row(Gtk::TreeModel::Row& row, SharedPtr<const Client::PluginModel> plugin); + void new_plugin(SharedPtr<const Client::PluginModel> plugin); void plugin_property_changed(const Raul::URI& plugin, const Raul::URI& predicate, @@ -113,14 +110,15 @@ private: void plugin_activated(const Gtk::TreeModel::Path& path, Gtk::TreeViewColumn* col); void plugin_selection_changed(); - std::string generate_module_name(SharedPtr<const PluginModel> plugin, - int offset=0); + std::string generate_module_name( + SharedPtr<const Client::PluginModel> plugin, + int offset=0); void load_plugin(const Gtk::TreeModel::iterator& iter); GraphObject::Properties _initial_data; - SharedPtr<const PatchModel> _patch; + SharedPtr<const Client::PatchModel> _patch; typedef std::map<Raul::URI, Gtk::TreeModel::iterator> Rows; Rows _rows; diff --git a/src/gui/NewSubpatchWindow.cpp b/src/gui/NewSubpatchWindow.cpp index 914c9c4f..720f8876 100644 --- a/src/gui/NewSubpatchWindow.cpp +++ b/src/gui/NewSubpatchWindow.cpp @@ -48,8 +48,8 @@ NewSubpatchWindow::NewSubpatchWindow(BaseObjectType* cobject, } void -NewSubpatchWindow::present(SharedPtr<const PatchModel> patch, - GraphObject::Properties data) +NewSubpatchWindow::present(SharedPtr<const Client::PatchModel> patch, + GraphObject::Properties data) { set_patch(patch); _initial_data = data; @@ -61,7 +61,7 @@ NewSubpatchWindow::present(SharedPtr<const PatchModel> patch, * This function MUST be called before using the window in any way! */ void -NewSubpatchWindow::set_patch(SharedPtr<const PatchModel> patch) +NewSubpatchWindow::set_patch(SharedPtr<const Client::PatchModel> patch) { _patch = patch; } diff --git a/src/gui/NewSubpatchWindow.hpp b/src/gui/NewSubpatchWindow.hpp index e0d0cfb3..c74b5fe2 100644 --- a/src/gui/NewSubpatchWindow.hpp +++ b/src/gui/NewSubpatchWindow.hpp @@ -27,10 +27,7 @@ namespace Ingen { -using namespace Shared; - namespace Client { class PatchModel; } -using Ingen::Client::PatchModel; namespace GUI { @@ -46,18 +43,18 @@ public: NewSubpatchWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& xml); - void set_patch(SharedPtr<const PatchModel> patch); + void set_patch(SharedPtr<const Client::PatchModel> patch); - void present(SharedPtr<const PatchModel> patch, - GraphObject::Properties data); + void present(SharedPtr<const Client::PatchModel> patch, + GraphObject::Properties data); private: void name_changed(); void ok_clicked(); void cancel_clicked(); - GraphObject::Properties _initial_data; - SharedPtr<const PatchModel> _patch; + GraphObject::Properties _initial_data; + SharedPtr<const Client::PatchModel> _patch; Gtk::Entry* _name_entry; Gtk::Label* _message_label; diff --git a/src/gui/NodeControlWindow.cpp b/src/gui/NodeControlWindow.cpp index 824c549f..ddc99348 100644 --- a/src/gui/NodeControlWindow.cpp +++ b/src/gui/NodeControlWindow.cpp @@ -28,19 +28,22 @@ using namespace std; namespace Ingen { + +using namespace Client; + namespace GUI { /** Create a node control window and load a new ControlPanel for it. */ -NodeControlWindow::NodeControlWindow(App& app, - SharedPtr<const NodeModel> node, - uint32_t poly) +NodeControlWindow::NodeControlWindow(App& app, + SharedPtr<const Client::NodeModel> node, + uint32_t poly) : _node(node) , _position_stored(false) , _x(0) , _y(0) { - assert(_node != NULL); + assert(_node); property_resizable() = true; set_border_width(5); diff --git a/src/gui/NodeControlWindow.hpp b/src/gui/NodeControlWindow.hpp index c75ca255..a9bc7c5c 100644 --- a/src/gui/NodeControlWindow.hpp +++ b/src/gui/NodeControlWindow.hpp @@ -27,7 +27,6 @@ namespace Ingen { namespace Client { class NodeModel; } } -using Ingen::Client::NodeModel; namespace Ingen { namespace GUI { @@ -42,12 +41,12 @@ class ControlPanel; class NodeControlWindow : public Window { public: - NodeControlWindow(App& app, SharedPtr<const NodeModel> node, uint32_t poly); - NodeControlWindow(App& app, SharedPtr<const NodeModel> node, ControlPanel* panel); + NodeControlWindow(App& app, SharedPtr<const Client::NodeModel> node, uint32_t poly); + NodeControlWindow(App& app, SharedPtr<const Client::NodeModel> node, ControlPanel* panel); virtual ~NodeControlWindow(); - SharedPtr<const NodeModel> node() const { return _node; } + SharedPtr<const Client::NodeModel> node() const { return _node; } ControlPanel* control_panel() const { return _control_panel; } @@ -58,9 +57,9 @@ protected: void on_hide(); private: - SharedPtr<const NodeModel> _node; - ControlPanel* _control_panel; - bool _callback_enabled; + SharedPtr<const Client::NodeModel> _node; + ControlPanel* _control_panel; + bool _callback_enabled; bool _position_stored; int _x; diff --git a/src/gui/NodeMenu.cpp b/src/gui/NodeMenu.cpp index 0d58d40c..e12c1b9f 100644 --- a/src/gui/NodeMenu.cpp +++ b/src/gui/NodeMenu.cpp @@ -28,9 +28,11 @@ #include "WindowFactory.hpp" using namespace std; -using namespace Ingen::Client; namespace Ingen { + +using namespace Client; + namespace GUI { NodeMenu::NodeMenu(BaseObjectType* cobject, @@ -46,7 +48,7 @@ NodeMenu::NodeMenu(BaseObjectType* cobject, } void -NodeMenu::init(App& app, SharedPtr<const NodeModel> node) +NodeMenu::init(App& app, SharedPtr<const Client::NodeModel> node) { ObjectMenu::init(app, node); diff --git a/src/gui/NodeMenu.hpp b/src/gui/NodeMenu.hpp index 55d73f3a..307d2680 100644 --- a/src/gui/NodeMenu.hpp +++ b/src/gui/NodeMenu.hpp @@ -23,8 +23,6 @@ #include "ingen/client/NodeModel.hpp" #include "ObjectMenu.hpp" -using Ingen::Client::NodeModel; - namespace Ingen { namespace GUI { @@ -38,7 +36,7 @@ public: NodeMenu(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& xml); - void init(App& app, SharedPtr<const NodeModel> node); + void init(App& app, SharedPtr<const Client::NodeModel> node); bool has_control_inputs(); diff --git a/src/gui/NodeModule.cpp b/src/gui/NodeModule.cpp index 87b3ba5d..1336c9e9 100644 --- a/src/gui/NodeModule.cpp +++ b/src/gui/NodeModule.cpp @@ -40,6 +40,10 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { NodeModule::NodeModule(PatchCanvas& canvas, diff --git a/src/gui/NodeModule.hpp b/src/gui/NodeModule.hpp index 6d83230a..a887fe3a 100644 --- a/src/gui/NodeModule.hpp +++ b/src/gui/NodeModule.hpp @@ -29,7 +29,6 @@ namespace Ingen { namespace Client { class PluginUI; class PortModel; } } -using namespace Ingen::Client; namespace Ingen { namespace GUI { @@ -48,25 +47,25 @@ class NodeModule : public Ganv::Module { public: static NodeModule* create( - PatchCanvas& canvas, - SharedPtr<const NodeModel> node, - bool human_names); + PatchCanvas& canvas, + SharedPtr<const Client::NodeModel> node, + bool human_names); virtual ~NodeModule(); App& app() const; - Port* port(boost::shared_ptr<const PortModel> model); + Port* port(boost::shared_ptr<const Client::PortModel> model); - void delete_port_view(SharedPtr<const PortModel> port); + void delete_port_view(SharedPtr<const Client::PortModel> port); virtual void store_location(double x, double y); void show_human_names(bool b); - SharedPtr<const NodeModel> node() const { return _node; } + SharedPtr<const Client::NodeModel> node() const { return _node; } protected: - NodeModule(PatchCanvas& canvas, SharedPtr<const NodeModel> node); + NodeModule(PatchCanvas& canvas, SharedPtr<const Client::NodeModel> node); virtual bool on_double_click(GdkEventButton* ev); @@ -82,7 +81,7 @@ protected: void rename(); void property_changed(const Raul::URI& predicate, const Raul::Atom& value); - void new_port_view(SharedPtr<const PortModel> port); + void new_port_view(SharedPtr<const Client::PortModel> port); void value_changed(uint32_t index, const Raul::Atom& value); void plugin_changed(); @@ -90,11 +89,11 @@ protected: bool show_menu(GdkEventButton* ev); - SharedPtr<const NodeModel> _node; - NodeMenu* _menu; - SharedPtr<PluginUI> _plugin_ui; - Gtk::Widget* _gui_widget; - Gtk::Window* _gui_window; ///< iff popped up + SharedPtr<const Client::NodeModel> _node; + NodeMenu* _menu; + SharedPtr<Client::PluginUI> _plugin_ui; + Gtk::Widget* _gui_widget; + Gtk::Window* _gui_window; ///< iff popped up }; } // namespace GUI diff --git a/src/gui/ObjectMenu.cpp b/src/gui/ObjectMenu.cpp index c4b482fd..60b170f7 100644 --- a/src/gui/ObjectMenu.cpp +++ b/src/gui/ObjectMenu.cpp @@ -30,6 +30,10 @@ using namespace Raul; namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { ObjectMenu::ObjectMenu(BaseObjectType* cobject, diff --git a/src/gui/ObjectMenu.hpp b/src/gui/ObjectMenu.hpp index 3ed91e2f..9bab5945 100644 --- a/src/gui/ObjectMenu.hpp +++ b/src/gui/ObjectMenu.hpp @@ -25,8 +25,6 @@ #include "ingen/client/ObjectModel.hpp" -using Ingen::Client::ObjectModel; - namespace Ingen { namespace GUI { @@ -44,7 +42,7 @@ public: ObjectMenu(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& xml); - void init(App& app, SharedPtr<const ObjectModel> object); + void init(App& app, SharedPtr<const Client::ObjectModel> object); protected: void on_menu_learn(); @@ -56,15 +54,15 @@ protected: void property_changed(const Raul::URI& predicate, const Raul::Atom& value); - App* _app; - SharedPtr<const ObjectModel> _object; - Gtk::MenuItem* _learn_menuitem; - Gtk::MenuItem* _unlearn_menuitem; - Gtk::CheckMenuItem* _polyphonic_menuitem; - Gtk::MenuItem* _disconnect_menuitem; - Gtk::MenuItem* _rename_menuitem; - Gtk::MenuItem* _destroy_menuitem; - Gtk::MenuItem* _properties_menuitem; + App* _app; + SharedPtr<const Client::ObjectModel> _object; + Gtk::MenuItem* _learn_menuitem; + Gtk::MenuItem* _unlearn_menuitem; + Gtk::CheckMenuItem* _polyphonic_menuitem; + Gtk::MenuItem* _disconnect_menuitem; + Gtk::MenuItem* _rename_menuitem; + Gtk::MenuItem* _destroy_menuitem; + Gtk::MenuItem* _properties_menuitem; bool _enable_signal; }; diff --git a/src/gui/PatchBox.cpp b/src/gui/PatchBox.cpp index 77428203..a97c4e52 100644 --- a/src/gui/PatchBox.cpp +++ b/src/gui/PatchBox.cpp @@ -51,6 +51,9 @@ using namespace Raul; namespace Ingen { + +using namespace Client; + namespace GUI { static const int STATUS_CONTEXT_ENGINE = 0; @@ -173,11 +176,11 @@ PatchBox::init_box(App& app) { _app = &app; - string engine_name = _app->engine()->uri().str(); + std::string engine_name = _app->engine()->uri().str(); if (engine_name == "http://drobilla.net/ns/ingen#internal") { engine_name = "internal engine"; } - _status_bar->push(string("Connected to ") + engine_name, STATUS_CONTEXT_ENGINE); + _status_bar->push(std::string("Connected to ") + engine_name, STATUS_CONTEXT_ENGINE); _menu_view_messages_window->signal_activate().connect( sigc::mem_fun<void>(_app->messages_dialog(), &MessagesWindow::present)); @@ -367,7 +370,7 @@ PatchBox::show_port_status(const PortModel* port, const Raul::Atom& value) if (parent) { const PluginModel* plugin = dynamic_cast<const PluginModel*>(parent->plugin()); if (plugin) { - const string& human_name = plugin->port_human_name(port->index()); + const std::string& human_name = plugin->port_human_name(port->index()); if (!human_name.empty()) msg << " (" << human_name << ")"; } @@ -487,7 +490,7 @@ PatchBox::event_save_as() std::string filename = dialog.get_filename(); std::string basename = Glib::path_get_basename(filename); - if (basename.find('.') == string::npos) { + if (basename.find('.') == std::string::npos) { filename += ".ingen"; basename += ".ingen"; } else if (filename.substr(filename.length() - 10) != ".ingen") { @@ -573,8 +576,8 @@ PatchBox::event_draw() int result = dialog.run(); if (result == Gtk::RESPONSE_OK) { - string filename = dialog.get_filename(); - if (filename.find(".") == string::npos) + std::string filename = dialog.get_filename(); + if (filename.find(".") == std::string::npos) filename += ".dot"; bool confirm = true; diff --git a/src/gui/PatchBox.hpp b/src/gui/PatchBox.hpp index 17855261..c7d4168a 100644 --- a/src/gui/PatchBox.hpp +++ b/src/gui/PatchBox.hpp @@ -32,7 +32,6 @@ namespace Client { class PortModel; class ObjectModel; } -using namespace Ingen::Client; namespace GUI { @@ -57,29 +56,34 @@ public: const Glib::RefPtr<Gtk::Builder>& xml); ~PatchBox(); - static SharedPtr<PatchBox> create(App& app, SharedPtr<const PatchModel> patch); + static SharedPtr<PatchBox> create( + App& app, SharedPtr<const Client::PatchModel> patch); void init_box(App& app); - void set_patch(SharedPtr<const PatchModel> pc, SharedPtr<PatchView> view); + + void set_patch(SharedPtr<const Client::PatchModel> pc, + SharedPtr<PatchView> view); + void set_window(PatchWindow* win) { _window = win; } void show_documentation(const std::string& doc, bool html); void hide_documentation(); - SharedPtr<const PatchModel> patch() const { return _patch; } - SharedPtr<PatchView> view() const { return _view; } + SharedPtr<const Client::PatchModel> patch() const { return _patch; } + SharedPtr<PatchView> view() const { return _view; } - void show_port_status(const PortModel* model, const Raul::Atom& value); + void show_port_status(const Client::PortModel* model, + const Raul::Atom& value); void set_patch_from_path(const Raul::Path& path, SharedPtr<PatchView> view); - void object_entered(const ObjectModel* model); - void object_left(const ObjectModel* model); + void object_entered(const Client::ObjectModel* model); + void object_left(const Client::ObjectModel* model); private: - void patch_port_added(SharedPtr<const PortModel> port); - void patch_port_removed(SharedPtr<const PortModel> port); - void show_status(const ObjectModel* model); + void patch_port_added(SharedPtr<const Client::PortModel> port); + void patch_port_removed(SharedPtr<const Client::PortModel> port); + void show_status(const Client::ObjectModel* model); int message_dialog(const Glib::ustring& message, const Glib::ustring& secondary_text, @@ -109,10 +113,10 @@ private: void event_show_engine(); void event_clipboard_changed(GdkEventOwnerChange* ev); - App* _app; - SharedPtr<const PatchModel> _patch; - SharedPtr<PatchView> _view; - PatchWindow* _window; + App* _app; + SharedPtr<const Client::PatchModel> _patch; + SharedPtr<PatchView> _view; + PatchWindow* _window; sigc::connection new_port_connection; sigc::connection removed_port_connection; diff --git a/src/gui/PatchCanvas.cpp b/src/gui/PatchCanvas.cpp index bf79e504..589f4214 100644 --- a/src/gui/PatchCanvas.cpp +++ b/src/gui/PatchCanvas.cpp @@ -55,13 +55,14 @@ for (Items::const_iterator (iter) = coll.begin(); \ (iter) != coll.end(); ++(iter)) -using Ingen::Client::ClientStore; -using Ingen::Serialisation::Serialiser; -using Ingen::Client::PluginModel; using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { PatchCanvas::PatchCanvas(App& app, @@ -459,7 +460,7 @@ PatchCanvas::get_port_view(SharedPtr<PortModel> port) } else { module = dynamic_cast<NodeModule*>(_views[port->parent()]); if (module) { - for (Module::iterator p = module->begin(); + for (Ganv::Module::iterator p = module->begin(); p != module->end(); ++p) { GUI::Port* pv = dynamic_cast<GUI::Port*>(*p); if (pv && pv->model() == port) @@ -683,7 +684,7 @@ void PatchCanvas::paste() { Glib::ustring str = Gtk::Clipboard::get()->wait_for_text(); - SharedPtr<Parser> parser = _app.loader()->parser(); + SharedPtr<Serialisation::Parser> parser = _app.loader()->parser(); if (!parser) { LOG(error) << "Unable to load parser, paste unavailable" << endl; return; diff --git a/src/gui/PatchCanvas.hpp b/src/gui/PatchCanvas.hpp index ab29863a..2b97d650 100644 --- a/src/gui/PatchCanvas.hpp +++ b/src/gui/PatchCanvas.hpp @@ -34,19 +34,9 @@ #include "ingen/GraphObject.hpp" #include "NodeModule.hpp" -using namespace Ganv; -using namespace Ingen::Shared; - -using std::string; -using Ganv::Port; -using Ingen::Client::ConnectionModel; -using Ingen::Client::NodeModel; -using Ingen::Client::PortModel; - namespace Ingen { namespace Client { class PatchModel; } -using Ingen::Client::PatchModel; namespace GUI { @@ -59,10 +49,10 @@ class NodeModule; class PatchCanvas : public Ganv::Canvas { public: - PatchCanvas(App& app, - SharedPtr<const PatchModel> patch, - int width, - int height); + PatchCanvas(App& app, + SharedPtr<const Client::PatchModel> patch, + int width, + int height); virtual ~PatchCanvas() {} @@ -73,13 +63,13 @@ public: void show_port_names(bool show); bool show_port_names() const { return _show_port_names; } - void add_plugin(SharedPtr<PluginModel> pm); - void add_node(SharedPtr<const NodeModel> nm); - void remove_node(SharedPtr<const NodeModel> nm); - void add_port(SharedPtr<const PortModel> pm); - void remove_port(SharedPtr<const PortModel> pm); - void connection(SharedPtr<const ConnectionModel> cm); - void disconnection(SharedPtr<const ConnectionModel> cm); + void add_plugin(SharedPtr<Client::PluginModel> pm); + void add_node(SharedPtr<const Client::NodeModel> nm); + void remove_node(SharedPtr<const Client::NodeModel> nm); + void add_port(SharedPtr<const Client::PortModel> pm); + void remove_port(SharedPtr<const Client::PortModel> pm); + void connection(SharedPtr<const Client::ConnectionModel> cm); + void disconnection(SharedPtr<const Client::ConnectionModel> cm); void get_new_module_location(double& x, double& y); @@ -95,17 +85,17 @@ public: private: enum ControlType { NUMBER, BUTTON }; void generate_port_name( - const string& sym_base, string& sym, - const string& name_base, string& name); + const std::string& sym_base, std::string& sym, + const std::string& name_base, std::string& name); void menu_add_port( - const string& sym_base, const string& name_base, + const std::string& sym_base, const std::string& name_base, const Raul::URI& type, bool is_output); void menu_load_plugin(); void menu_new_patch(); void menu_load_patch(); - void load_plugin(WeakPtr<PluginModel> plugin); + void load_plugin(WeakPtr<Client::PluginModel> plugin); void build_menus(); @@ -125,7 +115,7 @@ private: GraphObject::Properties get_initial_data(Resource::Graph ctx=Resource::DEFAULT); - Ganv::Port* get_port_view(SharedPtr<PortModel> port); + Ganv::Port* get_port_view(SharedPtr<Client::PortModel> port); void connect(Ganv::Node* src, Ganv::Node* dst); @@ -133,10 +123,10 @@ private: void disconnect(Ganv::Node* src, Ganv::Node* dst); - App& _app; - SharedPtr<const PatchModel> _patch; + App& _app; + SharedPtr<const Client::PatchModel> _patch; - typedef std::map<SharedPtr<const ObjectModel>, Ganv::Module*> Views; + typedef std::map<SharedPtr<const Client::ObjectModel>, Ganv::Module*> Views; Views _views; int _auto_position_count; diff --git a/src/gui/PatchPortModule.cpp b/src/gui/PatchPortModule.cpp index 49877e5f..16451821 100644 --- a/src/gui/PatchPortModule.cpp +++ b/src/gui/PatchPortModule.cpp @@ -35,10 +35,14 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { -PatchPortModule::PatchPortModule(PatchCanvas& canvas, - SharedPtr<const PortModel> model) +PatchPortModule::PatchPortModule(PatchCanvas& canvas, + SharedPtr<const Client::PortModel> model) : Ganv::Module(canvas, "", 0, 0, false) // FIXME: coords? , _model(model) { diff --git a/src/gui/PatchPortModule.hpp b/src/gui/PatchPortModule.hpp index 267aebca..8e3a320c 100644 --- a/src/gui/PatchPortModule.hpp +++ b/src/gui/PatchPortModule.hpp @@ -29,7 +29,6 @@ namespace Ingen { namespace Client { class PortModel; class NodeModel; } } -using namespace Ingen::Client; namespace Ingen { namespace GUI { @@ -48,9 +47,9 @@ class PatchPortModule : public Ganv::Module { public: static PatchPortModule* create( - PatchCanvas& canvas, - SharedPtr<const PortModel> model, - bool human); + PatchCanvas& canvas, + SharedPtr<const Client::PortModel> model, + bool human); App& app() const; @@ -59,11 +58,11 @@ public: void set_name(const std::string& n); - SharedPtr<const PortModel> port() const { return _model; } + SharedPtr<const Client::PortModel> port() const { return _model; } protected: - PatchPortModule(PatchCanvas& canvas, - SharedPtr<const PortModel> model); + PatchPortModule(PatchCanvas& canvas, + SharedPtr<const Client::PortModel> model); bool show_menu(GdkEventButton* ev); void set_selected(gboolean b); @@ -72,8 +71,8 @@ protected: void property_changed(const Raul::URI& predicate, const Raul::Atom& value); - SharedPtr<const PortModel> _model; - Port* _port; + SharedPtr<const Client::PortModel> _model; + Port* _port; }; } // namespace GUI diff --git a/src/gui/PatchTreeWindow.cpp b/src/gui/PatchTreeWindow.cpp index 578d14e1..638ba7fc 100644 --- a/src/gui/PatchTreeWindow.cpp +++ b/src/gui/PatchTreeWindow.cpp @@ -31,6 +31,10 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { PatchTreeWindow::PatchTreeWindow(BaseObjectType* cobject, diff --git a/src/gui/PatchView.cpp b/src/gui/PatchView.cpp index 07af108b..2fde6ad8 100644 --- a/src/gui/PatchView.cpp +++ b/src/gui/PatchView.cpp @@ -33,6 +33,9 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; + namespace GUI { PatchView::PatchView(BaseObjectType* cobject, diff --git a/src/gui/PatchView.hpp b/src/gui/PatchView.hpp index c9ce938a..39e8bab1 100644 --- a/src/gui/PatchView.hpp +++ b/src/gui/PatchView.hpp @@ -35,7 +35,6 @@ namespace Client { class PatchModel; class ObjectModel; } -using namespace Ingen::Client; namespace GUI { @@ -59,17 +58,18 @@ public: void init(App& app); - SharedPtr<PatchCanvas> canvas() const { return _canvas; } - SharedPtr<const PatchModel> patch() const { return _patch; } - Gtk::ToolItem* breadcrumb_container() const { return _breadcrumb_container; } + SharedPtr<PatchCanvas> canvas() const { return _canvas; } + SharedPtr<const Client::PatchModel> patch() const { return _patch; } + Gtk::ToolItem* breadcrumb_container() const { return _breadcrumb_container; } - static SharedPtr<PatchView> create(App& app, SharedPtr<const PatchModel> patch); + static SharedPtr<PatchView> create(App& app, + SharedPtr<const Client::PatchModel> patch); - sigc::signal<void, const ObjectModel*> signal_object_entered; - sigc::signal<void, const ObjectModel*> signal_object_left; + sigc::signal<void, const Client::ObjectModel*> signal_object_entered; + sigc::signal<void, const Client::ObjectModel*> signal_object_left; private: - void set_patch(SharedPtr<const PatchModel> patch); + void set_patch(SharedPtr<const Client::PatchModel> patch); void process_toggled(); void poly_changed(); @@ -87,8 +87,8 @@ private: App* _app; - SharedPtr<const PatchModel> _patch; - SharedPtr<PatchCanvas> _canvas; + SharedPtr<const Client::PatchModel> _patch; + SharedPtr<PatchCanvas> _canvas; Gtk::ScrolledWindow* _canvas_scrolledwindow; Gtk::Toolbar* _toolbar; diff --git a/src/gui/PatchWindow.hpp b/src/gui/PatchWindow.hpp index 5310af29..c6a73210 100644 --- a/src/gui/PatchWindow.hpp +++ b/src/gui/PatchWindow.hpp @@ -29,7 +29,6 @@ namespace Ingen { namespace Client { class PatchModel; } -using namespace Ingen::Client; namespace GUI { @@ -47,8 +46,8 @@ public: void init_window(App& app); - SharedPtr<const PatchModel> patch() const { return _box->patch(); } - PatchBox* box() const { return _box; } + SharedPtr<const Client::PatchModel> patch() const { return _box->patch(); } + PatchBox* box() const { return _box; } void show_documentation(const std::string& doc, bool html) { _box->show_documentation(doc, html); @@ -58,7 +57,8 @@ public: _box->hide_documentation(); } - void show_port_status(const PortModel* model, const Raul::Atom& value) { + void show_port_status(const Client::PortModel* model, + const Raul::Atom& value) { _box->show_port_status(model, value); } diff --git a/src/gui/Port.hpp b/src/gui/Port.hpp index 0781127f..e8801e5f 100644 --- a/src/gui/Port.hpp +++ b/src/gui/Port.hpp @@ -28,7 +28,6 @@ namespace Raul { class Atom; class URI; } namespace Ingen { namespace Client { class PortModel; } -using Ingen::Client::PortModel; namespace GUI { @@ -43,15 +42,15 @@ class Port : public Ganv::Port { public: static Port* create( - App& app, - Ganv::Module& module, - SharedPtr<const PortModel> pm, - bool human_name, - bool flip = false); + App& app, + Ganv::Module& module, + SharedPtr<const Client::PortModel> pm, + bool human_name, + bool flip = false); ~Port(); - SharedPtr<const PortModel> model() const { return _port_model.lock(); } + SharedPtr<const Client::PortModel> model() const { return _port_model.lock(); } bool show_menu(GdkEventButton* ev); void update_metadata(); @@ -62,11 +61,11 @@ public: void set_selected(gboolean b); private: - Port(App& app, - Ganv::Module& module, - SharedPtr<const PortModel> pm, - const std::string& name, - bool flip = false); + Port(App& app, + Ganv::Module& module, + SharedPtr<const Client::PortModel> pm, + const std::string& name, + bool flip = false); PatchBox* get_patch_box() const; @@ -76,10 +75,10 @@ private: void on_value_changed(GVariant* value); bool on_event(GdkEvent* ev); - App& _app; - WeakPtr<const PortModel> _port_model; - bool _pressed : 1; - bool _flipped : 1; + App& _app; + WeakPtr<const Client::PortModel> _port_model; + bool _pressed : 1; + bool _flipped : 1; }; } // namespace GUI diff --git a/src/gui/PortMenu.cpp b/src/gui/PortMenu.cpp index 6583f36c..df256d15 100644 --- a/src/gui/PortMenu.cpp +++ b/src/gui/PortMenu.cpp @@ -26,6 +26,10 @@ #include "WindowFactory.hpp" namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { PortMenu::PortMenu(BaseObjectType* cobject, diff --git a/src/gui/PortMenu.hpp b/src/gui/PortMenu.hpp index 6c7d2f15..cba9359d 100644 --- a/src/gui/PortMenu.hpp +++ b/src/gui/PortMenu.hpp @@ -23,8 +23,6 @@ #include "ingen/client/PortModel.hpp" #include "ObjectMenu.hpp" -using Ingen::Client::PortModel; - namespace Ingen { namespace GUI { @@ -38,9 +36,9 @@ public: PortMenu(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& xml); - void init(App& app, - SharedPtr<const PortModel> port, - bool patch_port=false); + void init(App& app, + SharedPtr<const Client::PortModel> port, + bool patch_port = false); private: void on_menu_disconnect(); diff --git a/src/gui/PropertiesWindow.cpp b/src/gui/PropertiesWindow.cpp index 0540b7e1..098640ec 100644 --- a/src/gui/PropertiesWindow.cpp +++ b/src/gui/PropertiesWindow.cpp @@ -29,6 +29,10 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; +using namespace Shared; + namespace GUI { PropertiesWindow::PropertiesWindow(BaseObjectType* cobject, diff --git a/src/gui/PropertiesWindow.hpp b/src/gui/PropertiesWindow.hpp index 03babf36..c545be92 100644 --- a/src/gui/PropertiesWindow.hpp +++ b/src/gui/PropertiesWindow.hpp @@ -25,9 +25,10 @@ #include "Window.hpp" -using namespace Ingen::Client; - namespace Ingen { + +namespace Client { class ObjectModel; } + namespace GUI { /** Object properties window. @@ -42,8 +43,8 @@ public: PropertiesWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& xml); - void present(SharedPtr<const ObjectModel> model); - void set_object(SharedPtr<const ObjectModel> model); + void present(SharedPtr<const Client::ObjectModel> model); + void set_object(SharedPtr<const Client::ObjectModel> model); private: /** Record of a property (row in the table) */ @@ -74,14 +75,14 @@ private: typedef std::map<Raul::URI, Record> Records; Records _records; - SharedPtr<const ObjectModel> _model; - sigc::connection _property_connection; - Gtk::VBox* _vbox; - Gtk::ScrolledWindow* _scrolledwindow; - Gtk::Table* _table; - Gtk::Button* _cancel_button; - Gtk::Button* _apply_button; - Gtk::Button* _ok_button; + SharedPtr<const Client::ObjectModel> _model; + sigc::connection _property_connection; + Gtk::VBox* _vbox; + Gtk::ScrolledWindow* _scrolledwindow; + Gtk::Table* _table; + Gtk::Button* _cancel_button; + Gtk::Button* _apply_button; + Gtk::Button* _ok_button; }; } // namespace GUI diff --git a/src/gui/RenameWindow.cpp b/src/gui/RenameWindow.cpp index 3584c12e..5a426eeb 100644 --- a/src/gui/RenameWindow.cpp +++ b/src/gui/RenameWindow.cpp @@ -30,6 +30,9 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; + namespace GUI { RenameWindow::RenameWindow(BaseObjectType* cobject, diff --git a/src/gui/RenameWindow.hpp b/src/gui/RenameWindow.hpp index e56e54bf..2fc782de 100644 --- a/src/gui/RenameWindow.hpp +++ b/src/gui/RenameWindow.hpp @@ -25,8 +25,6 @@ #include "Window.hpp" -using Ingen::Client::ObjectModel; - namespace Ingen { namespace GUI { @@ -40,16 +38,16 @@ public: RenameWindow(BaseObjectType* cobject, const Glib::RefPtr<Gtk::Builder>& xml); - void present(SharedPtr<const ObjectModel> object); + void present(SharedPtr<const Client::ObjectModel> object); private: - void set_object(SharedPtr<const ObjectModel> object); + void set_object(SharedPtr<const Client::ObjectModel> object); void values_changed(); void cancel_clicked(); void ok_clicked(); - SharedPtr<const ObjectModel> _object; + SharedPtr<const Client::ObjectModel> _object; Gtk::Entry* _symbol_entry; Gtk::Entry* _label_entry; diff --git a/src/gui/SubpatchModule.cpp b/src/gui/SubpatchModule.cpp index 3960b4fd..fd3c20bf 100644 --- a/src/gui/SubpatchModule.cpp +++ b/src/gui/SubpatchModule.cpp @@ -35,6 +35,9 @@ using namespace std; using namespace Raul; namespace Ingen { + +using namespace Client; + namespace GUI { SubpatchModule::SubpatchModule(PatchCanvas& canvas, @@ -66,7 +69,7 @@ SubpatchModule::store_location(double ax, double ay) const Atom x(app().forge().make(static_cast<float>(ax))); const Atom y(app().forge().make(static_cast<float>(ay))); - const URIs& uris = app().uris(); + const Shared::URIs& uris = app().uris(); const Atom& existing_x = _node->get_property(uris.ingen_canvasX); const Atom& existing_y = _node->get_property(uris.ingen_canvasY); diff --git a/src/gui/SubpatchModule.hpp b/src/gui/SubpatchModule.hpp index 93a7b647..9caa6331 100644 --- a/src/gui/SubpatchModule.hpp +++ b/src/gui/SubpatchModule.hpp @@ -21,7 +21,6 @@ #include "raul/SharedPtr.hpp" #include "PatchPortModule.hpp" #include "NodeModule.hpp" -using std::string; using std::list; namespace Ingen { namespace Client { class PatchModel; @@ -29,7 +28,6 @@ namespace Ingen { namespace Client { class PortModel; class PatchWindow; } } -using namespace Ingen::Client; namespace Ingen { namespace GUI { @@ -44,8 +42,8 @@ class NodeControlWindow; class SubpatchModule : public NodeModule { public: - SubpatchModule(PatchCanvas& canvas, - SharedPtr<const PatchModel> controller); + SubpatchModule(PatchCanvas& canvas, + SharedPtr<const Client::PatchModel> controller); virtual ~SubpatchModule() {} @@ -56,10 +54,10 @@ public: void browse_to_patch(); void menu_remove(); - SharedPtr<const PatchModel> patch() const { return _patch; } + SharedPtr<const Client::PatchModel> patch() const { return _patch; } protected: - SharedPtr<const PatchModel> _patch; + SharedPtr<const Client::PatchModel> _patch; }; } // namespace GUI diff --git a/src/gui/ThreadedLoader.cpp b/src/gui/ThreadedLoader.cpp index 50758632..4800d003 100644 --- a/src/gui/ThreadedLoader.cpp +++ b/src/gui/ThreadedLoader.cpp @@ -22,8 +22,9 @@ #include "ThreadedLoader.hpp" #include "ingen/client/PatchModel.hpp" -using namespace std; using namespace Raul; +using namespace boost; +using namespace std; namespace Ingen { namespace GUI { @@ -40,7 +41,7 @@ ThreadedLoader::ThreadedLoader(App& app, SharedPtr<Interface> engine) warn << "Failed to load ingen_serialisation module, load disabled." << endl; } -SharedPtr<Parser> +SharedPtr<Serialisation::Parser> ThreadedLoader::parser() { Ingen::Shared::World* world = _app.world(); @@ -100,8 +101,8 @@ ThreadedLoader::load_patch(bool merge, } void -ThreadedLoader::save_patch(SharedPtr<const PatchModel> model, - const string& filename) +ThreadedLoader::save_patch(SharedPtr<const Client::PatchModel> model, + const string& filename) { _mutex.lock(); @@ -115,8 +116,8 @@ ThreadedLoader::save_patch(SharedPtr<const PatchModel> model, } void -ThreadedLoader::save_patch_event(SharedPtr<const PatchModel> model, - const string& filename) +ThreadedLoader::save_patch_event(SharedPtr<const Client::PatchModel> model, + const string& filename) { if (_app.serialiser()) { if (filename.find(".ingen") != string::npos) diff --git a/src/gui/ThreadedLoader.hpp b/src/gui/ThreadedLoader.hpp index be05e6c1..b9b613b8 100644 --- a/src/gui/ThreadedLoader.hpp +++ b/src/gui/ThreadedLoader.hpp @@ -28,15 +28,7 @@ #include "ingen/serialisation/Serialiser.hpp" #include "ingen/serialisation/Parser.hpp" -using std::string; -using std::list; -using boost::optional; - namespace Ingen { -using namespace Shared; -using namespace Client; -using namespace Serialisation; - namespace GUI { /** Thread for loading patch files. @@ -56,18 +48,20 @@ public: ThreadedLoader(App& app, SharedPtr<Interface> engine); - void load_patch(bool merge, - const Glib::ustring& document_uri, - optional<Raul::Path> engine_parent, - optional<Raul::Symbol> engine_symbol, - optional<GraphObject::Properties> engine_data); + void load_patch(bool merge, + const Glib::ustring& document_uri, + boost::optional<Raul::Path> engine_parent, + boost::optional<Raul::Symbol> engine_symbol, + boost::optional<GraphObject::Properties> engine_data); - void save_patch(SharedPtr<const PatchModel> model, const string& filename); + void save_patch(SharedPtr<const Client::PatchModel> model, + const std::string& filename); - SharedPtr<Parser> parser(); + SharedPtr<Serialisation::Parser> parser(); private: - void save_patch_event(SharedPtr<const PatchModel> model, const string& filename); + void save_patch_event(SharedPtr<const Client::PatchModel> model, + const std::string& filename); /** Returns nothing and takes no parameters (because they have all been bound) */ typedef sigc::slot<void> Closure; @@ -77,7 +71,7 @@ private: App& _app; SharedPtr<Interface> _engine; Glib::Mutex _mutex; - list<Closure> _events; + std::list<Closure> _events; }; } // namespace GUI diff --git a/src/gui/WindowFactory.cpp b/src/gui/WindowFactory.cpp index cac4e15a..a8deb459 100644 --- a/src/gui/WindowFactory.cpp +++ b/src/gui/WindowFactory.cpp @@ -32,6 +32,9 @@ using namespace std; namespace Ingen { + +using namespace Client; + namespace GUI { WindowFactory::WindowFactory(App& app) diff --git a/src/gui/WindowFactory.hpp b/src/gui/WindowFactory.hpp index 18117570..69e66e72 100644 --- a/src/gui/WindowFactory.hpp +++ b/src/gui/WindowFactory.hpp @@ -24,16 +24,11 @@ #include "ingen/GraphObject.hpp" #include "raul/SharedPtr.hpp" -using namespace Ingen::Shared; - namespace Raul { class Path; } namespace Ingen { namespace Client { class PatchModel; class NodeModel; class ObjectModel; } -using Ingen::Client::PatchModel; -using Ingen::Client::NodeModel; -using Ingen::Client::ObjectModel; namespace GUI { @@ -62,25 +57,26 @@ public: size_t num_open_patch_windows(); - PatchBox* patch_box(SharedPtr<const PatchModel> patch); - PatchWindow* patch_window(SharedPtr<const PatchModel> patch); - PatchWindow* parent_patch_window(SharedPtr<const NodeModel> node); - NodeControlWindow* control_window(SharedPtr<const NodeModel> node); + PatchBox* patch_box(SharedPtr<const Client::PatchModel> patch); + PatchWindow* patch_window(SharedPtr<const Client::PatchModel> patch); + PatchWindow* parent_patch_window(SharedPtr<const Client::NodeModel> node); + NodeControlWindow* control_window(SharedPtr<const Client::NodeModel> node); - void present_patch(SharedPtr<const PatchModel> model, - PatchWindow* preferred = NULL, - SharedPtr<PatchView> view = SharedPtr<PatchView>()); + void present_patch( + SharedPtr<const Client::PatchModel> model, + PatchWindow* preferred = NULL, + SharedPtr<PatchView> view = SharedPtr<PatchView>()); - void present_controls(SharedPtr<const NodeModel> node); + void present_controls(SharedPtr<const Client::NodeModel> node); typedef GraphObject::Properties Properties; - void present_load_plugin(SharedPtr<const PatchModel> patch, Properties data=Properties()); - void present_load_patch(SharedPtr<const PatchModel> patch, Properties data=Properties()); - void present_load_subpatch(SharedPtr<const PatchModel> patch, Properties data=Properties()); - void present_new_subpatch(SharedPtr<const PatchModel> patch, Properties data=Properties()); - void present_rename(SharedPtr<const ObjectModel> object); - void present_properties(SharedPtr<const ObjectModel> object); + void present_load_plugin(SharedPtr<const Client::PatchModel> patch, Properties data=Properties()); + void present_load_patch(SharedPtr<const Client::PatchModel> patch, Properties data=Properties()); + void present_load_subpatch(SharedPtr<const Client::PatchModel> patch, Properties data=Properties()); + void present_new_subpatch(SharedPtr<const Client::PatchModel> patch, Properties data=Properties()); + void present_rename(SharedPtr<const Client::ObjectModel> object); + void present_properties(SharedPtr<const Client::ObjectModel> object); bool remove_patch_window(PatchWindow* win, GdkEventAny* ignored = NULL); @@ -92,22 +88,22 @@ private: typedef std::map<Raul::Path, PatchWindow*> PatchWindowMap; typedef std::map<Raul::Path, NodeControlWindow*> ControlWindowMap; - PatchWindow* new_patch_window(SharedPtr<const PatchModel> patch, - SharedPtr<PatchView> view); + PatchWindow* new_patch_window(SharedPtr<const Client::PatchModel> patch, + SharedPtr<PatchView> view); - NodeControlWindow* new_control_window(SharedPtr<const NodeModel> node); + NodeControlWindow* new_control_window(SharedPtr<const Client::NodeModel> node); bool remove_control_window(NodeControlWindow* win, GdkEventAny* ignored); - App& _app; - PatchBox* _main_box; - PatchWindowMap _patch_windows; - ControlWindowMap _control_windows; - LoadPluginWindow* _load_plugin_win; - LoadPatchWindow* _load_patch_win; - NewSubpatchWindow* _new_subpatch_win; - PropertiesWindow* _properties_win; - RenameWindow* _rename_win; + App& _app; + PatchBox* _main_box; + PatchWindowMap _patch_windows; + ControlWindowMap _control_windows; + LoadPluginWindow* _load_plugin_win; + LoadPatchWindow* _load_patch_win; + NewSubpatchWindow* _new_subpatch_win; + PropertiesWindow* _properties_win; + RenameWindow* _rename_win; }; } // namespace GUI diff --git a/src/server/AudioBuffer.hpp b/src/server/AudioBuffer.hpp index 1a3cf312..087c799f 100644 --- a/src/server/AudioBuffer.hpp +++ b/src/server/AudioBuffer.hpp @@ -30,8 +30,6 @@ #include "Context.hpp" #include "types.hpp" -using namespace std; - namespace Ingen { namespace Server { diff --git a/src/server/BufferFactory.cpp b/src/server/BufferFactory.cpp index 73b6558d..fcbf1189 100644 --- a/src/server/BufferFactory.cpp +++ b/src/server/BufferFactory.cpp @@ -113,7 +113,7 @@ BufferFactory::get(LV2_URID type, uint32_t capacity, bool force_create) return create(type, capacity); } else { assert(false); - error << "Failed to obtain buffer" << endl; + Raul::error << "Failed to obtain buffer" << std::endl; return BufferRef(); } } diff --git a/src/server/ClientBroadcaster.hpp b/src/server/ClientBroadcaster.hpp index 31e59162..3e9b7d0f 100644 --- a/src/server/ClientBroadcaster.hpp +++ b/src/server/ClientBroadcaster.hpp @@ -29,8 +29,6 @@ #include "NodeFactory.hpp" -using namespace std; - namespace Ingen { namespace Server { diff --git a/src/server/ConnectionImpl.cpp b/src/server/ConnectionImpl.cpp index 2b6a0255..b53f00fe 100644 --- a/src/server/ConnectionImpl.cpp +++ b/src/server/ConnectionImpl.cpp @@ -61,10 +61,11 @@ ConnectionImpl::ConnectionImpl(PortImpl* src_port, PortImpl* dst_port) void ConnectionImpl::dump() const { - debug << _src_port->path() << " -> " << _dst_port->path() - << (must_mix() ? " (MIX) " : " (DIRECT) ") - << (must_queue() ? " (QUEUE)" : " (NOQUEUE) ") - << "POLY: " << _src_port->poly() << " => " << _dst_port->poly() << endl; + Raul::debug << _src_port->path() << " -> " << _dst_port->path() + << (must_mix() ? " (MIX) " : " (DIRECT) ") + << (must_queue() ? " (QUEUE)" : " (NOQUEUE) ") + << "POLY: " << _src_port->poly() << " => " << _dst_port->poly() + << std::endl; } const Raul::Path& @@ -115,7 +116,7 @@ ConnectionImpl::queue(Context& context) boost::intrusive_ptr<Buffer> src_buf = _src_port->buffer(0); if (src_buf->atom()->type != uris.atom_Sequence) { - error << "Queued connection but source is not a Sequence" << endl; + Raul::error << "Queued connection but source is not a Sequence" << std::endl; return; } diff --git a/src/server/ConnectionImpl.hpp b/src/server/ConnectionImpl.hpp index 4d915606..3dc794db 100644 --- a/src/server/ConnectionImpl.hpp +++ b/src/server/ConnectionImpl.hpp @@ -31,8 +31,6 @@ #include "BufferFactory.hpp" #include "Context.hpp" -using namespace std; - namespace Ingen { namespace Server { diff --git a/src/server/InputPort.cpp b/src/server/InputPort.cpp index 3fadd312..30745161 100644 --- a/src/server/InputPort.cpp +++ b/src/server/InputPort.cpp @@ -63,7 +63,7 @@ InputPort::InputPort(BufferFactory& bufs, } bool -InputPort::apply_poly(Maid& maid, uint32_t poly) +InputPort::apply_poly(Raul::Maid& maid, uint32_t poly) { bool ret = PortImpl::apply_poly(maid, poly); if (!ret) @@ -150,7 +150,8 @@ InputPort::remove_connection(ProcessContext& context, const OutputPort* src_port } if (!connection) { - error << "[InputPort::remove_connection] Connection not found!" << endl; + Raul::error << "[InputPort::remove_connection] Connection not found!" + << std::endl; return NULL; } diff --git a/src/server/LV2Info.cpp b/src/server/LV2Info.cpp index eebc1813..9180b421 100644 --- a/src/server/LV2Info.cpp +++ b/src/server/LV2Info.cpp @@ -28,8 +28,6 @@ #include "LV2RequestRunFeature.hpp" #include "LV2ResizeFeature.hpp" -using namespace std; - namespace Ingen { namespace Server { diff --git a/src/server/LV2RequestRunFeature.hpp b/src/server/LV2RequestRunFeature.hpp index 180dfa9d..b15100d2 100644 --- a/src/server/LV2RequestRunFeature.hpp +++ b/src/server/LV2RequestRunFeature.hpp @@ -29,9 +29,6 @@ #include "NodeImpl.hpp" #include "PortImpl.hpp" -using namespace std; -using namespace Raul; - namespace Ingen { namespace Server { diff --git a/src/server/LV2ResizeFeature.hpp b/src/server/LV2ResizeFeature.hpp index e560bf13..915c7442 100644 --- a/src/server/LV2ResizeFeature.hpp +++ b/src/server/LV2ResizeFeature.hpp @@ -23,9 +23,6 @@ #include "NodeImpl.hpp" #include "PortImpl.hpp" -using namespace std; -using namespace Raul; - namespace Ingen { namespace Server { diff --git a/src/server/ingen_lv2.cpp b/src/server/ingen_lv2.cpp index 4b25c24c..dace8087 100644 --- a/src/server/ingen_lv2.cpp +++ b/src/server/ingen_lv2.cpp @@ -355,7 +355,7 @@ find_patches(const Glib::ustring& manifest_uri) new LV2Patch(patch_uri, (const char*)file_path))); free(file_path); } else { - Raul::error << "[Ingen] Patch has no rdfs:seeAlso" << endl; + Raul::error << "[Ingen] Patch has no rdfs:seeAlso" << std::endl; } } @@ -543,7 +543,7 @@ ingen_save(LV2_Handle instance, get_state_features(features, &map_path, &make_path); if (!map_path || !make_path || !plugin->map) { Raul::error << "Missing state:mapPath, state:makePath, or urid:Map." - << endl; + << std::endl; return LV2_STATE_ERR_NO_FEATURE; } @@ -581,7 +581,7 @@ ingen_restore(LV2_Handle instance, LV2_State_Map_Path* map_path = NULL; get_state_features(features, &map_path, NULL); if (!map_path) { - Raul::error << "Missing state:mapPath" << endl; + Raul::error << "Missing state:mapPath" << std::endl; return LV2_STATE_ERR_NO_FEATURE; } @@ -595,7 +595,7 @@ ingen_restore(LV2_Handle instance, &size, &type, &valflags); if (!path) { - Raul::error << "Failed to restore ingen:file" << endl; + Raul::error << "Failed to restore ingen:file" << std::endl; return LV2_STATE_ERR_NO_PROPERTY; } diff --git a/src/server/mix.hpp b/src/server/mix.hpp index 8bd1e5ba..75214093 100644 --- a/src/server/mix.hpp +++ b/src/server/mix.hpp @@ -25,8 +25,6 @@ #include "Buffer.hpp" #include "Context.hpp" -using namespace Raul; - namespace Ingen { namespace Server { |