From 79fceb7b387cf45deab770a12f116493a24e5350 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 8 Jan 2011 05:20:34 +0000 Subject: Support "request run" feature from contexts extension. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2791 a436a847-0d15-0410-975c-d299462d15a1 --- src/shared/LV2Features.cpp | 4 ++-- src/shared/LV2Features.hpp | 6 ++++-- src/shared/LV2URIMap.hpp | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) (limited to 'src/shared') 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) SharedPtr -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 fptr = f->second->feature(node); + SharedPtr 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 feature(Node* node) = 0; + virtual SharedPtr feature(Shared::World* world, Node* node) = 0; }; class FeatureArray { @@ -70,7 +72,7 @@ public: void add_feature(const std::string& uri, SharedPtr feature); - SharedPtr lv2_features(Node* node) const; + SharedPtr lv2_features(Shared::World* world, Node* node) const; private: typedef std::map< std::string, SharedPtr > 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 feature(Node*) { + SharedPtr feature(Shared::World*, Node*) { return SharedPtr(&uri_map_feature, NullDeleter); } struct UnmapFeature : public LV2Features::Feature { UnmapFeature(const LV2URIMap& map) : _feature(map.uri_unmap_feature) {} - SharedPtr feature(Node*) { + SharedPtr feature(Shared::World*, Node*) { return SharedPtr(&_feature, NullDeleter); } -- cgit v1.2.1