summaryrefslogtreecommitdiffstats
path: root/lilv
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2011-05-04 18:35:25 +0000
committerDavid Robillard <d@drobilla.net>2011-05-04 18:35:25 +0000
commit5233941417f053a8d2e55b7720860e3778a21762 (patch)
tree4ee951691b41cba74c44883490348936ef8dd429 /lilv
parentb264f9c122f03bc2fd97ef15c24aef8148dcc757 (diff)
downloadlilv-5233941417f053a8d2e55b7720860e3778a21762.tar.gz
lilv-5233941417f053a8d2e55b7720860e3778a21762.tar.bz2
lilv-5233941417f053a8d2e55b7720860e3778a21762.zip
Wrap get_by_uri collection methods.
Fix lv2_apply.py up until run point. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3251 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'lilv')
-rw-r--r--lilv/lilvmm.hpp43
1 files changed, 27 insertions, 16 deletions
diff --git a/lilv/lilvmm.hpp b/lilv/lilvmm.hpp
index 027d4c3..5123a42 100644
--- a/lilv/lilvmm.hpp
+++ b/lilv/lilvmm.hpp
@@ -105,21 +105,29 @@ struct PluginClass {
};
#define LILV_WRAP_COLL(CT, ET, prefix) \
- struct CT { \
- inline CT(const Lilv ## CT* c_obj) : me(c_obj) {} \
- LILV_WRAP_CONVERSION(const Lilv ## CT); \
- LILV_WRAP0(unsigned, prefix, size); \
- LILV_WRAP1(const ET, prefix, get, LilvIter*, i); \
- LILV_WRAP0(LilvIter*, prefix, begin); \
- LILV_WRAP1(LilvIter*, prefix, next, LilvIter*, i); \
- LILV_WRAP1(bool, prefix, is_end, LilvIter*, i); \
- const Lilv ## CT* me; \
- }; \
-
-LILV_WRAP_COLL(PluginClasses, PluginClass, plugin_classes);
-LILV_WRAP_COLL(ScalePoints, ScalePoint, scale_points);
-LILV_WRAP_COLL(Nodes, Node, nodes);
+ inline CT(const Lilv ## CT* c_obj) : me(c_obj) {} \
+ LILV_WRAP_CONVERSION(const Lilv ## CT); \
+ LILV_WRAP0(unsigned, prefix, size); \
+ LILV_WRAP1(const ET, prefix, get, LilvIter*, i); \
+ LILV_WRAP0(LilvIter*, prefix, begin); \
+ LILV_WRAP1(LilvIter*, prefix, next, LilvIter*, i); \
+ LILV_WRAP1(bool, prefix, is_end, LilvIter*, i); \
+ const Lilv ## CT* me; \
+
+struct PluginClasses {
+ LILV_WRAP_COLL(PluginClasses, PluginClass, plugin_classes);
+ LILV_WRAP1(const PluginClass, plugin_classes, get_by_uri, const LilvNode*, uri);
+};
+
+struct ScalePoints {
+ LILV_WRAP_COLL(ScalePoints, ScalePoint, scale_points);
+};
+struct Nodes {
+ LILV_WRAP_COLL(Nodes, Node, nodes);
+ LILV_WRAP1(bool, nodes, contains, const Node, node);
+};
+
struct Port {
inline Port(const LilvPlugin* p, const LilvPort* c_obj)
: parent(p), me(c_obj)
@@ -197,7 +205,10 @@ struct Plugin {
const LilvPlugin* me;
};
-LILV_WRAP_COLL(Plugins, Plugin, plugins);
+struct Plugins {
+ LILV_WRAP_COLL(Plugins, Plugin, plugins);
+ LILV_WRAP1(const Plugin, plugins, get_by_uri, const LilvNode*, uri);
+};
struct Instance {
inline Instance(Plugin plugin, double sample_rate) {
@@ -254,7 +265,7 @@ struct World {
LILV_WRAP1_VOID(world, load_bundle, LilvNode*, bundle_uri);
LILV_WRAP0(const LilvPluginClass*, world, get_plugin_class);
LILV_WRAP0(const LilvPluginClasses*, world, get_plugin_classes);
- LILV_WRAP0(Plugins, world, get_all_plugins);
+ LILV_WRAP0(const Plugins, world, get_all_plugins);
LilvWorld* me;
};