summaryrefslogtreecommitdiffstats
path: root/ingen/Resource.hpp
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 /ingen/Resource.hpp
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 'ingen/Resource.hpp')
-rw-r--r--ingen/Resource.hpp19
1 files changed, 9 insertions, 10 deletions
diff --git a/ingen/Resource.hpp b/ingen/Resource.hpp
index 3c937463..4bf3a22e 100644
--- a/ingen/Resource.hpp
+++ b/ingen/Resource.hpp
@@ -22,11 +22,10 @@
#include "ingen/Atom.hpp"
#include "ingen/URIs.hpp"
+#include "ingen/ingen.h"
#include "raul/Deletable.hpp"
#include "raul/URI.hpp"
-#define NS_INGEN "http://drobilla.net/ns/ingen#"
-
namespace Ingen {
/** An object with a URI described by properties.
@@ -48,15 +47,15 @@ public:
static Raul::URI graph_to_uri(Graph g) {
switch (g) {
- case Graph::DEFAULT: return Raul::URI(NS_INGEN "defaultContext");
- case Graph::EXTERNAL: return Raul::URI(NS_INGEN "externalContext");
- case Graph::INTERNAL: return Raul::URI(NS_INGEN "internalContext");
+ case Graph::DEFAULT: return Raul::URI(INGEN_NS "defaultContext");
+ case Graph::EXTERNAL: return Raul::URI(INGEN_NS "externalContext");
+ case Graph::INTERNAL: return Raul::URI(INGEN_NS "internalContext");
}
}
static Graph uri_to_graph(const char* uri) {
- const char* suffix = uri + sizeof(NS_INGEN) - 1;
- if (strncmp(uri, NS_INGEN, sizeof(NS_INGEN) - 1)) {
+ const char* suffix = uri + sizeof(INGEN_NS) - 1;
+ if (strncmp(uri, INGEN_NS, sizeof(INGEN_NS) - 1)) {
return Graph::DEFAULT;
} else if (!strcmp(suffix, "defaultContext")) {
return Graph::DEFAULT;
@@ -117,7 +116,7 @@ public:
/** Remove a property.
*
- * If @p value is ingen:wildcard then any property with @p uri for a
+ * If @p value is patch:wildcard then any property with @p uri for a
* predicate will be removed.
*/
virtual void remove_property(const Raul::URI& uri,
@@ -141,7 +140,7 @@ public:
/** Remove several properties at once.
*
* This removes all matching properties (both key and value), or all
- * properties with a matching key if the value in @p is ingen:wildcard.
+ * properties with a matching key if the value in @p is patch:wildcard.
*/
void remove_properties(const Properties& p);
@@ -154,7 +153,7 @@ public:
/** Hook called whenever a property value is removed.
*
- * If all values of a given key are removed, then value will be the wildcard.
+ * If all values for a key are removed, then value will be the wildcard.
*
* This can be used by derived classes to implement special behaviour for
* particular properties (e.g. ingen:value for ports).