[Devel] URI define convention
David Robillard
d at drobilla.net
Sat Feb 18 14:26:32 PST 2012
Hi kids,
Not having URIs defined in C makes code typo-prone. To avoid this, I am
going to establish the following convention:
* All URIs defined by an extension are defined in C with a symbol like
LV2_EXTNAME__LOCALNAME
So, for example, if the "foo" extension defined foo:Thingie and
foo:name, foo.h would contain:
#define LV2_FOO_URI "http://lv2plug.in/ns/ext/foo"
#define LV2_FOO__Thingie LV2_FOO_URI "#Thingie"
#define LV2_FOO__name LV2_FOO_URI "#name"
The double underscore is to avoid a clash with any other symbols the
extension might define as part of its API, so e.g. LV2_FOO__ is an
unrestricted namespace.
-dr
More information about the Devel
mailing list