From f7368e7850307de97b024238a4f520afe1150c8b Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 26 Jul 2007 09:32:49 +0000 Subject: Add const find interface to Raul::Table, fix bugs. Use Raul::Table on Ingen client side instead of std::map for objects, plugins. Work on renaming (still broken). git-svn-id: http://svn.drobilla.net/lad/ingen@634 a436a847-0d15-0410-975c-d299462d15a1 --- src/libs/client/NodeModel.hpp | 23 ++++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'src/libs/client/NodeModel.hpp') diff --git a/src/libs/client/NodeModel.hpp b/src/libs/client/NodeModel.hpp index 68027526..ccf2f1fb 100644 --- a/src/libs/client/NodeModel.hpp +++ b/src/libs/client/NodeModel.hpp @@ -19,18 +19,18 @@ #define NODEMODEL_H #include -#include #include #include #include +#include #include "ObjectModel.hpp" #include "PortModel.hpp" #include #include #include "PluginModel.hpp" -using std::string; using std::map; using std::find; -using std::cout; using std::cerr; using std::endl; +using std::string; +using Raul::Table; namespace Ingen { namespace Client { @@ -50,7 +50,8 @@ public: SharedPtr get_port(const string& port_name) const; - const map >& get_programs() const { return _banks; } + const Table >& get_programs() const { return _banks; } + const string& plugin_uri() const { return _plugin_uri; } SharedPtr plugin() const { return _plugin; } int num_ports() const { return _ports.size(); } @@ -69,7 +70,7 @@ protected: NodeModel(const Path& path); void add_child(SharedPtr c); - void remove_child(SharedPtr c); + bool remove_child(SharedPtr c); void add_port(SharedPtr pm); void remove_port(SharedPtr pm); void remove_port(const Path& port_path); @@ -81,15 +82,15 @@ protected: friend class PatchModel; void set_path(const Path& p); - bool _polyphonic; - PortModelList _ports; ///< List of ports (not a map to preserve order) - string _plugin_uri; ///< Plugin URI (if PluginModel is unknown) - SharedPtr _plugin; ///< The plugin this node is an instance of - map > _banks; ///< DSSI banks + bool _polyphonic; + PortModelList _ports; ///< List of ports (not a Table to preserve order) + string _plugin_uri; ///< Plugin URI (if PluginModel is unknown) + SharedPtr _plugin; ///< The plugin this node is an instance of + Table > _banks; ///< DSSI banks }; -typedef map > NodeModelMap; +typedef Table > NodeModelMap; } // namespace Client -- cgit v1.2.1