From 6c72abfc6d6649f07d85f70b25ce4393dc775a39 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Sat, 30 Apr 2011 02:07:42 +0000 Subject: Tidy. git-svn-id: http://svn.drobilla.net/lad/trunk/lilv@3241 a436a847-0d15-0410-975c-d299462d15a1 --- lilv/lilv.h | 9 +++++---- lilv/lilvmm.hpp | 20 ++++++++++++-------- 2 files changed, 17 insertions(+), 12 deletions(-) (limited to 'lilv') diff --git a/lilv/lilv.h b/lilv/lilv.h index a9c2992..fbb7207 100644 --- a/lilv/lilv.h +++ b/lilv/lilv.h @@ -49,6 +49,7 @@ extern "C" { #endif #define LILV_NS_DOAP "http://usefulinc.com/ns/doap#" +#define LILV_NS_FOAF "http://xmlns.com/foaf/0.1/" #define LILV_NS_LILV "http://drobilla.net/ns/lilv#" #define LILV_NS_LV2 "http://lv2plug.in/ns/lv2core#" #define LILV_NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#" @@ -66,9 +67,9 @@ extern "C" { typedef struct LilvPluginImpl LilvPlugin; /**< LV2 Plugin. */ typedef struct LilvPluginClassImpl LilvPluginClass; /**< Plugin Class. */ typedef struct LilvPortImpl LilvPort; /**< Port. */ -typedef struct LilvScalePointImpl LilvScalePoint; /**< Scale Point (Notch). */ +typedef struct LilvScalePointImpl LilvScalePoint; /**< Scale Point. */ typedef struct LilvUIImpl LilvUI; /**< Plugin UI. */ -typedef struct LilvNodeImpl LilvNode; /**< Typed Value. */ +typedef struct LilvNodeImpl LilvNode; /**< Typed Value. */ typedef struct LilvWorldImpl LilvWorld; /**< Lilv World. */ typedef struct LilvInstanceImpl LilvInstance; /**< Plugin instance. */ @@ -354,7 +355,7 @@ lilv_plugin_classes_is_end(const LilvPluginClasses* collection, LilvIter* i); LILV_API const LilvPluginClass* lilv_plugin_classes_get_by_uri(const LilvPluginClasses* classes, - const LilvNode* uri); + const LilvNode* uri); /* ScalePoints */ @@ -416,7 +417,7 @@ lilv_uis_is_end(const LilvUIs* collection, LilvIter* i); */ LILV_API const LilvUI* -lilv_uis_get_by_uri(const LilvUIs* uis, +lilv_uis_get_by_uri(const LilvUIs* uis, const LilvNode* uri); /* Values */ diff --git a/lilv/lilvmm.hpp b/lilv/lilvmm.hpp index 9a256b0..d0bd1cd 100644 --- a/lilv/lilvmm.hpp +++ b/lilv/lilvmm.hpp @@ -24,22 +24,24 @@ namespace Lilv { const char* uri_to_path(const char* uri) { return lilv_uri_to_path(uri); } #define LILV_WRAP0(RT, prefix, name) \ - inline RT name () { return lilv_ ## prefix ## _ ## name (me); } + inline RT name() { return lilv_ ## prefix ## _ ## name (me); } #define LILV_WRAP0_VOID(prefix, name) \ - inline void name () { lilv_ ## prefix ## _ ## name (me); } + inline void name() { lilv_ ## prefix ## _ ## name(me); } #define LILV_WRAP1(RT, prefix, name, T1, a1) \ - inline RT name (T1 a1) { return lilv_ ## prefix ## _ ## name (me, a1); } + inline RT name(T1 a1) { return lilv_ ## prefix ## _ ## name (me, a1); } #define LILV_WRAP1_VOID(prefix, name, T1, a1) \ - inline void name (T1 a1) { lilv_ ## prefix ## _ ## name (me, a1); } + inline void name(T1 a1) { lilv_ ## prefix ## _ ## name(me, a1); } #define LILV_WRAP2(RT, prefix, name, T1, a1, T2, a2) \ - inline RT name (T1 a1, T2 a2) { return lilv_ ## prefix ## _ ## name (me, a1, a2); } + inline RT name(T1 a1, T2 a2) { \ + return lilv_ ## prefix ## _ ## name(me, a1, a2); \ + } #define LILV_WRAP2_VOID(prefix, name, T1, a1, T2, a2) \ - inline void name (T1 a1, T2 a2) { lilv_ ## prefix ## _ ## name (me, a1, a2); } + inline void name(T1 a1, T2 a2) { lilv_ ## prefix ## _ ## name(me, a1, a2); } #ifndef SWIG #define LILV_WRAP_CONVERSION(CT) \ @@ -152,13 +154,15 @@ struct World { LILV_WRAP0(const LilvPluginClass*, world, get_plugin_class); LILV_WRAP0(const LilvPluginClasses*, world, get_plugin_classes); LILV_WRAP0(Plugins, world, get_all_plugins); - //LILV_WRAP1(Plugin, world, get_plugin_by_uri_string, const char*, uri); LilvWorld* me; }; struct Port { - inline Port(const LilvPlugin* p, const LilvPort* c_obj) : parent(p), me(c_obj) {} + inline Port(const LilvPlugin* p, const LilvPort* c_obj) + : parent(p), me(c_obj) + {} + LILV_WRAP_CONVERSION(const LilvPort); #define LILV_PORT_WRAP0(RT, name) \ -- cgit v1.2.1