diff options
author | David Robillard <d@drobilla.net> | 2012-04-12 23:47:14 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2012-04-12 23:47:14 +0000 |
commit | f74b7279cf959a3b8f943e89db350af432ae78a8 (patch) | |
tree | 607d19ca9015dd7c02b5b9d00b0ea7c4becb1fe4 /src/serialisation | |
parent | b9ee86cf97f9ba8f6139c83f57b8d5848e7f90e4 (diff) | |
download | ingen-f74b7279cf959a3b8f943e89db350af432ae78a8.tar.gz ingen-f74b7279cf959a3b8f943e89db350af432ae78a8.tar.bz2 ingen-f74b7279cf959a3b8f943e89db350af432ae78a8.zip |
Use URI defines from LV2 headers where possible.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4175 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/serialisation')
-rw-r--r-- | src/serialisation/Parser.cpp | 9 | ||||
-rw-r--r-- | src/serialisation/Serialiser.cpp | 8 |
2 files changed, 7 insertions, 10 deletions
diff --git a/src/serialisation/Parser.cpp b/src/serialisation/Parser.cpp index 1ce1410b..edc0e534 100644 --- a/src/serialisation/Parser.cpp +++ b/src/serialisation/Parser.cpp @@ -34,7 +34,6 @@ #define LOG(s) s << "[Parser] " -#define NS_LV2 "http://lv2plug.in/ns/lv2core#" #define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#" #define NS_RDFS "http://www.w3.org/2000/01/rdf-schema#" @@ -285,7 +284,7 @@ parse_patch(Ingen::Shared::World* world, { const Sord::URI ingen_node(*world->rdf_world(), NS_INGEN "node"); const Sord::URI ingen_polyphony(*world->rdf_world(), NS_INGEN "polyphony"); - const Sord::URI lv2_port(*world->rdf_world(), NS_LV2 "port"); + const Sord::URI lv2_port(*world->rdf_world(), LV2_CORE__port); const URIs& uris = *world->uris().get(); const Sord::Node& patch = subject_node; @@ -475,9 +474,9 @@ parse(Ingen::Shared::World* world, const Sord::URI node_class (*world->rdf_world(), NS_INGEN "Node"); const Sord::URI port_class (*world->rdf_world(), NS_INGEN "Port"); const Sord::URI internal_class(*world->rdf_world(), NS_INGEN "Internal"); - const Sord::URI in_port_class (*world->rdf_world(), NS_LV2 "InputPort"); - const Sord::URI out_port_class(*world->rdf_world(), NS_LV2 "OutputPort"); - const Sord::URI lv2_class (*world->rdf_world(), NS_LV2 "Plugin"); + const Sord::URI in_port_class (*world->rdf_world(), LV2_CORE__InputPort); + const Sord::URI out_port_class(*world->rdf_world(), LV2_CORE__OutputPort); + const Sord::URI lv2_class (*world->rdf_world(), LV2_CORE__Plugin); const Sord::URI rdf_type (*world->rdf_world(), NS_RDF "type"); Sord::Node subject = model.base_uri(); diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp index c7e487c4..38c47dc3 100644 --- a/src/serialisation/Serialiser.cpp +++ b/src/serialisation/Serialiser.cpp @@ -48,8 +48,6 @@ #define LOG(s) s << "[Serialiser] " -#define NS_LV2 "http://lv2plug.in/ns/lv2core#" - using namespace std; using namespace Raul; using namespace Sord; @@ -431,12 +429,12 @@ Serialiser::Impl::serialise_patch(SharedPtr<const Patch> patch, const Sord::Node port_id = path_rdf_node(p->path()); // Ensure lv2:name always exists so Patch is a valid LV2 plugin - if (p->properties().find(NS_LV2 "name") == p->properties().end()) - p->set_property(NS_LV2 "name", + if (p->properties().find(LV2_CORE__name) == p->properties().end()) + p->set_property(LV2_CORE__name, _world.forge().alloc(p->symbol().c_str())); _model->add_statement(patch_id, - Sord::URI(world, NS_LV2 "port"), + Sord::URI(world, LV2_CORE__port), port_id); serialise_port(p, Resource::INTERNAL, port_id); } |