diff options
author | David Robillard <d@drobilla.net> | 2011-01-08 05:20:34 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2011-01-08 05:20:34 +0000 |
commit | 79fceb7b387cf45deab770a12f116493a24e5350 (patch) | |
tree | 7c12f6103b4772622cf10d18039b08655d0986b3 /src/shared | |
parent | e1f6dcf7dca9363f901cd96fc389e03f4cf75e12 (diff) | |
download | ingen-79fceb7b387cf45deab770a12f116493a24e5350.tar.gz ingen-79fceb7b387cf45deab770a12f116493a24e5350.tar.bz2 ingen-79fceb7b387cf45deab770a12f116493a24e5350.zip |
Support "request run" feature from contexts extension.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2791 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/LV2Features.cpp | 4 | ||||
-rw-r--r-- | src/shared/LV2Features.hpp | 6 | ||||
-rw-r--r-- | src/shared/LV2URIMap.hpp | 4 |
3 files changed, 8 insertions, 6 deletions
diff --git a/src/shared/LV2Features.cpp b/src/shared/LV2Features.cpp index 21e6ce35..4b8fa1c5 100644 --- a/src/shared/LV2Features.cpp +++ b/src/shared/LV2Features.cpp @@ -50,11 +50,11 @@ LV2Features::add_feature(const std::string& uri, SharedPtr<Feature> feature) SharedPtr<LV2Features::FeatureArray> -LV2Features::lv2_features(Node* node) const +LV2Features::lv2_features(Shared::World* world, Node* node) const { FeatureArray::FeatureVector vec; for (Features::const_iterator f = _features.begin(); f != _features.end(); ++f) { - SharedPtr<LV2_Feature> fptr = f->second->feature(node); + SharedPtr<LV2_Feature> fptr = f->second->feature(world, node); if (fptr) vec.push_back(fptr); } diff --git a/src/shared/LV2Features.hpp b/src/shared/LV2Features.hpp index 20b17628..386e4ea8 100644 --- a/src/shared/LV2Features.hpp +++ b/src/shared/LV2Features.hpp @@ -26,9 +26,11 @@ #include "ingen-config.h" namespace Ingen { + namespace Shared { class Node; +class World; /** Stuff that may need to be passed to an LV2 plugin (i.e. LV2 features). */ @@ -39,7 +41,7 @@ public: class Feature { public: virtual ~Feature() {} - virtual SharedPtr<LV2_Feature> feature(Node* node) = 0; + virtual SharedPtr<LV2_Feature> feature(Shared::World* world, Node* node) = 0; }; class FeatureArray { @@ -70,7 +72,7 @@ public: void add_feature(const std::string& uri, SharedPtr<Feature> feature); - SharedPtr<LV2Features::FeatureArray> lv2_features(Node* node) const; + SharedPtr<LV2Features::FeatureArray> lv2_features(Shared::World* world, Node* node) const; private: typedef std::map< std::string, SharedPtr<Feature> > Features; diff --git a/src/shared/LV2URIMap.hpp b/src/shared/LV2URIMap.hpp index a4bdb2d8..c8607426 100644 --- a/src/shared/LV2URIMap.hpp +++ b/src/shared/LV2URIMap.hpp @@ -40,14 +40,14 @@ class LV2URIMap : public boost::noncopyable, public LV2Features::Feature { public: LV2URIMap(); - SharedPtr<LV2_Feature> feature(Node*) { + SharedPtr<LV2_Feature> feature(Shared::World*, Node*) { return SharedPtr<LV2_Feature>(&uri_map_feature, NullDeleter<LV2_Feature>); } struct UnmapFeature : public LV2Features::Feature { UnmapFeature(const LV2URIMap& map) : _feature(map.uri_unmap_feature) {} - SharedPtr<LV2_Feature> feature(Node*) { + SharedPtr<LV2_Feature> feature(Shared::World*, Node*) { return SharedPtr<LV2_Feature>(&_feature, NullDeleter<LV2_Feature>); } |