summaryrefslogtreecommitdiffstats
path: root/src/Configuration.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2014-01-18 06:25:36 +0000
committerDavid Robillard <d@drobilla.net>2014-01-18 06:25:36 +0000
commitec8939dd7ef5267b43bd8ae3590e783495f0cfc9 (patch)
treece151c34851e8a275f35aedb67ea6b4a25676baf /src/Configuration.cpp
parent59492c673f5de893e8b91ca50a945a697ddfa404 (diff)
downloadingen-ec8939dd7ef5267b43bd8ae3590e783495f0cfc9.tar.gz
ingen-ec8939dd7ef5267b43bd8ae3590e783495f0cfc9.tar.bz2
ingen-ec8939dd7ef5267b43bd8ae3590e783495f0cfc9.zip
Consolidate URIs.
Add missing definition to ontology. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5317 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/Configuration.cpp')
-rw-r--r--src/Configuration.cpp9
1 files changed, 4 insertions, 5 deletions
diff --git a/src/Configuration.cpp b/src/Configuration.cpp
index ad4ab09a..67899d9a 100644
--- a/src/Configuration.cpp
+++ b/src/Configuration.cpp
@@ -25,11 +25,10 @@
#include "ingen/Configuration.hpp"
#include "ingen/Log.hpp"
+#include "ingen/ingen.h"
#include "sord/sordmm.hpp"
#include "sratom/sratom.h"
-#define NS_INGEN "http://drobilla.net/ns/ingen#"
-
namespace Ingen {
Configuration::Configuration(Forge& forge)
@@ -209,8 +208,8 @@ Configuration::load(const std::string& path)
for (Sord::Iter i = model.find(nodemm, nil, nil); !i.end(); ++i) {
const Sord::Node& pred = i.get_predicate();
const Sord::Node& obj = i.get_object();
- if (pred.to_string().substr(0, sizeof(NS_INGEN) - 1) == NS_INGEN) {
- const std::string key = pred.to_string().substr(sizeof(NS_INGEN) - 1);
+ if (pred.to_string().substr(0, sizeof(INGEN_NS) - 1) == INGEN_NS) {
+ const std::string key = pred.to_string().substr(sizeof(INGEN_NS) - 1);
const Keys::iterator k = _keys.find(key);
if (k != _keys.end() && obj.type() == Sord::Node::LITERAL) {
set_value_from_string(_options.find(k->second)->second,
@@ -259,7 +258,7 @@ Configuration::save(URIMap& uri_map,
// Create environment with ingen prefix
SerdEnv* env = serd_env_new(&base);
serd_env_set_prefix_from_strings(
- env, (const uint8_t*)"ingen", (const uint8_t*)NS_INGEN);
+ env, (const uint8_t*)"ingen", (const uint8_t*)INGEN_NS);
// Create Turtle writer
SerdWriter* writer = serd_writer_new(