diff options
author | David Robillard <d@drobilla.net> | 2011-04-29 02:03:23 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-04-29 02:03:23 +0000 |
commit | 8bc9aca63644d63de3ccccbb4752e79d3d3c7854 (patch) | |
tree | 7f8e4be2eab57edc3d422ad5a8d34c6ed6473b9d /src/client/PluginModel.hpp | |
parent | 77d22f06129e91f51e37c09c71c0917a0136dd7d (diff) | |
download | ingen-8bc9aca63644d63de3ccccbb4752e79d3d3c7854.tar.gz ingen-8bc9aca63644d63de3ccccbb4752e79d3d3c7854.tar.bz2 ingen-8bc9aca63644d63de3ccccbb4752e79d3d3c7854.zip |
Don't hide pointers behind typedefs.
Use const appropriately in API (makes it clear from the type whether objects should be freed or not).
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@3222 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/client/PluginModel.hpp')
-rw-r--r-- | src/client/PluginModel.hpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/client/PluginModel.hpp b/src/client/PluginModel.hpp index e7076ff2..faba8c8b 100644 --- a/src/client/PluginModel.hpp +++ b/src/client/PluginModel.hpp @@ -68,14 +68,14 @@ public: std::string port_human_name(uint32_t index) const; #ifdef HAVE_LILV - static LilvWorld lilv_world() { return _lilv_world; } - LilvPlugin lilv_plugin() const { return _lilv_plugin; } + static LilvWorld* lilv_world() { return _lilv_world; } + const LilvPlugin* lilv_plugin() const { return _lilv_plugin; } - LilvPort lilv_port(uint32_t index) { + const LilvPort* lilv_port(uint32_t index) { return lilv_plugin_get_port_by_index(_lilv_plugin, index); } - static void set_lilv_world(LilvWorld world) { + static void set_lilv_world(LilvWorld* world) { _lilv_world = world; _lilv_plugins = lilv_world_get_all_plugins(_lilv_world); } @@ -86,7 +86,7 @@ public: SharedPtr<NodeModel> node) const; const std::string& icon_path() const; - static std::string get_lv2_icon_path(LilvPlugin plugin); + static std::string get_lv2_icon_path(const LilvPlugin* plugin); #endif std::string documentation() const; @@ -110,10 +110,10 @@ private: Type _type; #ifdef HAVE_LILV - static LilvWorld _lilv_world; - static LilvPlugins _lilv_plugins; + static LilvWorld* _lilv_world; + static const LilvPlugins* _lilv_plugins; - LilvPlugin _lilv_plugin; + const LilvPlugin* _lilv_plugin; mutable std::string _icon_path; #endif |