From fa9837f95a2d3be3f5eb94fcbf8222bb208d87db Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 11 Oct 2008 21:50:38 +0000 Subject: Remove duplicated code for getting various hints, add generic hint accessor. Cleanup namespace pollution. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@1650 a436a847-0d15-0410-975c-d299462d15a1 --- src/client/NodeModel.hpp | 16 ++++++---------- 1 file changed, 6 insertions(+), 10 deletions(-) (limited to 'src/client/NodeModel.hpp') diff --git a/src/client/NodeModel.hpp b/src/client/NodeModel.hpp index 9b6efde8..b7bbb5af 100644 --- a/src/client/NodeModel.hpp +++ b/src/client/NodeModel.hpp @@ -22,7 +22,6 @@ #include #include #include -#include #include #include #include "interface/Node.hpp" @@ -31,9 +30,6 @@ #include "PortModel.hpp" #include "PluginModel.hpp" -using std::string; -using Raul::Table; - namespace Ingen { namespace Client { @@ -51,13 +47,13 @@ public: NodeModel(const NodeModel& copy); virtual ~NodeModel(); - typedef vector > Ports; + typedef std::vector< SharedPtr > Ports; - SharedPtr get_port(const string& port_name) const; + SharedPtr get_port(const std::string& port_name) const; Shared::Port* port(uint32_t index) const; - const string& plugin_uri() const { return _plugin_uri; } + const std::string& plugin_uri() const { return _plugin_uri; } const Shared::Plugin* plugin() const { return _plugin.get(); } uint32_t num_ports() const { return _ports.size(); } const Ports& ports() const { return _ports; } @@ -71,7 +67,7 @@ public: protected: friend class ClientStore; - NodeModel(const string& plugin_uri, const Path& path); + NodeModel(const std::string& plugin_uri, const Path& path); NodeModel(SharedPtr plugin, const Path& path); NodeModel(const Path& path); @@ -80,14 +76,14 @@ protected: void add_port(SharedPtr pm); void remove_port(SharedPtr pm); void remove_port(const Path& port_path); - void add_program(int bank, int program, const string& name); + void add_program(int bank, int program, const std::string& name); void remove_program(int bank, int program); void set(SharedPtr model); virtual void clear(); Ports _ports; ///< Vector of ports (not a Table to preserve order) - string _plugin_uri; ///< Plugin URI (if PluginModel is unknown) + std::string _plugin_uri; ///< Plugin URI (if PluginModel is unknown) SharedPtr _plugin; ///< The plugin this node is an instance of private: -- cgit v1.2.1