summaryrefslogtreecommitdiffstats
path: root/src/libs/client/NodeModel.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-07-26 09:32:49 +0000
committerDavid Robillard <d@drobilla.net>2007-07-26 09:32:49 +0000
commitf7368e7850307de97b024238a4f520afe1150c8b (patch)
treebcc3cb7099c57cb4b3206f68c41e8b828175b18a /src/libs/client/NodeModel.hpp
parent397667bfaffdb622dfcf5bbbf64c49fd6a729f7e (diff)
downloadingen-f7368e7850307de97b024238a4f520afe1150c8b.tar.gz
ingen-f7368e7850307de97b024238a4f520afe1150c8b.tar.bz2
ingen-f7368e7850307de97b024238a4f520afe1150c8b.zip
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
Diffstat (limited to 'src/libs/client/NodeModel.hpp')
-rw-r--r--src/libs/client/NodeModel.hpp23
1 files changed, 12 insertions, 11 deletions
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 <cstdlib>
-#include <map>
#include <iostream>
#include <string>
#include <sigc++/sigc++.h>
+#include <raul/Table.hpp>
#include "ObjectModel.hpp"
#include "PortModel.hpp"
#include <raul/Path.hpp>
#include <raul/SharedPtr.hpp>
#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<PortModel> get_port(const string& port_name) const;
- const map<int, map<int, string> >& get_programs() const { return _banks; }
+ const Table<int,Table<int,string> >& get_programs() const { return _banks; }
+
const string& plugin_uri() const { return _plugin_uri; }
SharedPtr<PluginModel> plugin() const { return _plugin; }
int num_ports() const { return _ports.size(); }
@@ -69,7 +70,7 @@ protected:
NodeModel(const Path& path);
void add_child(SharedPtr<ObjectModel> c);
- void remove_child(SharedPtr<ObjectModel> c);
+ bool remove_child(SharedPtr<ObjectModel> c);
void add_port(SharedPtr<PortModel> pm);
void remove_port(SharedPtr<PortModel> 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<PluginModel> _plugin; ///< The plugin this node is an instance of
- map<int, map<int, string> > _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<PluginModel> _plugin; ///< The plugin this node is an instance of
+ Table<int, Table<int, string> > _banks; ///< DSSI banks
};
-typedef map<string, SharedPtr<NodeModel> > NodeModelMap;
+typedef Table<string, SharedPtr<NodeModel> > NodeModelMap;
} // namespace Client