summaryrefslogtreecommitdiffstats
path: root/ingen
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
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')
-rw-r--r--ingen/Plugin.hpp7
-rw-r--r--ingen/Resource.hpp19
-rw-r--r--ingen/URIs.hpp11
-rw-r--r--ingen/ingen.h46
4 files changed, 63 insertions, 20 deletions
diff --git a/ingen/Plugin.hpp b/ingen/Plugin.hpp
index bc8220da..b69c17c4 100644
--- a/ingen/Plugin.hpp
+++ b/ingen/Plugin.hpp
@@ -20,6 +20,7 @@
#include "raul/URI.hpp"
#include "ingen/Resource.hpp"
+#include "ingen/ingen.h"
#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
@@ -41,10 +42,10 @@ public:
static inline const Raul::URI& type_uri(Type type) {
static const Raul::URI uris[] = {
- Raul::URI("http://drobilla.net/ns/ingen#nil"),
+ Raul::URI("http://www.w3.org/2002/07/owl#Nothing"),
Raul::URI(LV2_CORE__Plugin),
- Raul::URI("http://drobilla.net/ns/ingen#Internal"),
- Raul::URI("http://drobilla.net/ns/ingen#Graph")
+ Raul::URI(INGEN__Internal),
+ Raul::URI(INGEN__Graph)
};
return uris[type];
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).
diff --git a/ingen/URIs.hpp b/ingen/URIs.hpp
index 05bfc3e1..c0e7f79f 100644
--- a/ingen/URIs.hpp
+++ b/ingen/URIs.hpp
@@ -84,18 +84,13 @@ public:
const Quark ingen_broadcast;
const Quark ingen_canvasX;
const Quark ingen_canvasY;
- const Quark ingen_controlBinding;
- const Quark ingen_document;
const Quark ingen_enabled;
- const Quark ingen_engine;
+ const Quark ingen_file;
const Quark ingen_head;
const Quark ingen_incidentTo;
- const Quark ingen_nil;
const Quark ingen_polyphonic;
const Quark ingen_polyphony;
const Quark ingen_prototype;
- const Quark ingen_sampleRate;
- const Quark ingen_status;
const Quark ingen_tail;
const Quark ingen_uiEmbedded;
const Quark ingen_value;
@@ -130,9 +125,11 @@ public:
const Quark midi_Controller;
const Quark midi_MidiEvent;
const Quark midi_NoteOn;
+ const Quark midi_binding;
const Quark midi_controllerNumber;
const Quark midi_noteNumber;
const Quark morph_currentType;
+ const Quark param_sampleRate;
const Quark patch_Delete;
const Quark patch_Get;
const Quark patch_Move;
@@ -148,6 +145,7 @@ public:
const Quark patch_request;
const Quark patch_subject;
const Quark patch_value;
+ const Quark patch_wildcard;
const Quark pprops_logarithmic;
const Quark rdf_type;
const Quark rdfs_seeAlso;
@@ -160,7 +158,6 @@ public:
const Quark time_beatsPerMinute;
const Quark time_frame;
const Quark time_speed;
- const Quark wildcard;
};
} // namespace Ingen
diff --git a/ingen/ingen.h b/ingen/ingen.h
new file mode 100644
index 00000000..c3662c18
--- /dev/null
+++ b/ingen/ingen.h
@@ -0,0 +1,46 @@
+/*
+ This file is part of Ingen.
+ Copyright 2014 David Robillard <http://drobilla.net/>
+
+ Ingen is free software: you can redistribute it and/or modify it under the
+ terms of the GNU Affero General Public License as published by the Free
+ Software Foundation, either version 3 of the License, or any later version.
+
+ Ingen is distributed in the hope that it will be useful, but WITHOUT ANY
+ WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
+ A PARTICULAR PURPOSE. See the GNU Affero General Public License for details.
+
+ You should have received a copy of the GNU Affero General Public License
+ along with Ingen. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#ifndef INGEN_H
+#define INGEN_H
+
+#define INGEN_NS "http://drobilla.net/ns/ingen#"
+
+#define INGEN__Arc INGEN_NS "Arc"
+#define INGEN__Block INGEN_NS "Block"
+#define INGEN__Graph INGEN_NS "Graph"
+#define INGEN__GraphPrototype INGEN_NS "GraphPrototype"
+#define INGEN__Internal INGEN_NS "Internal"
+#define INGEN__Node INGEN_NS "Node"
+#define INGEN__Plugin INGEN_NS "Plugin"
+#define INGEN__activity INGEN_NS "activity"
+#define INGEN__arc INGEN_NS "arc"
+#define INGEN__block INGEN_NS "block"
+#define INGEN__broadcast INGEN_NS "broadcast"
+#define INGEN__canvasX INGEN_NS "canvasX"
+#define INGEN__canvasY INGEN_NS "canvasY"
+#define INGEN__enabled INGEN_NS "enabled"
+#define INGEN__file INGEN_NS "file"
+#define INGEN__head INGEN_NS "head"
+#define INGEN__incidentTo INGEN_NS "incidentTo"
+#define INGEN__polyphonic INGEN_NS "polyphonic"
+#define INGEN__polyphony INGEN_NS "polyphony"
+#define INGEN__prototype INGEN_NS "prototype"
+#define INGEN__tail INGEN_NS "tail"
+#define INGEN__uiEmbedded INGEN_NS "uiEmbedded"
+#define INGEN__value INGEN_NS "value"
+
+#endif // INGEN_H