summaryrefslogtreecommitdiffstats
path: root/src/gui/RDFS.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2013-01-08 04:05:01 +0000
committerDavid Robillard <d@drobilla.net>2013-01-08 04:05:01 +0000
commitac408e8d4ce77389e65d69e9a1ff30fd54a25ada (patch)
tree27d3f568c8a8040c345dd61a890dabd08549cd5c /src/gui/RDFS.hpp
parent63d21b23d262b0c5169d54822aa5723b6200c764 (diff)
downloadingen-ac408e8d4ce77389e65d69e9a1ff30fd54a25ada.tar.gz
ingen-ac408e8d4ce77389e65d69e9a1ff30fd54a25ada.tar.bz2
ingen-ac408e8d4ce77389e65d69e9a1ff30fd54a25ada.zip
Add support for URID ports.
Fix glib errors when resetting properties dialog. Move RDFS domain/range/classes/etc code to reusable location. Add preliminary "mesp" (message processing) plugin package. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4903 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/RDFS.hpp')
-rw-r--r--src/gui/RDFS.hpp67
1 files changed, 67 insertions, 0 deletions
diff --git a/src/gui/RDFS.hpp b/src/gui/RDFS.hpp
new file mode 100644
index 00000000..bdc0a7a1
--- /dev/null
+++ b/src/gui/RDFS.hpp
@@ -0,0 +1,67 @@
+/*
+ This file is part of Ingen.
+ Copyright 2012 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_GUI_RDF_HPP
+#define INGEN_GUI_RDF_HPP
+
+#include <map>
+#include <set>
+
+#include <glibmm/ustring.h>
+
+#include "raul/URI.hpp"
+#include "raul/SharedPtr.hpp"
+
+namespace Ingen {
+
+class World;
+
+namespace Client { class ObjectModel; }
+
+namespace GUI {
+
+namespace RDFS {
+
+/** Set of URIs. */
+typedef std::set<Raul::URI> URISet;
+
+/** Map of object labels, keyed by object URI. */
+typedef std::map<Raul::URI, Glib::ustring> Objects;
+
+/** Return the label of @p node. */
+Glib::ustring
+label(World* world, const LilvNode* node);
+
+/** Set @p types to its super/sub class closure.
+ * @param super If true, find all superclasses, otherwise all subclasses
+ */
+void classes(World* world, URISet& types, bool super);
+
+/** Get all instances of any class in @p types. */
+Objects
+instances(World* world, const URISet& types);
+
+/** Get all the types which @p model is an instance of. */
+URISet types(World* world, SharedPtr<const Client::ObjectModel> model);
+
+/** Get all the properties with domains appropriate for @p model. */
+URISet properties(World* world, SharedPtr<const Client::ObjectModel> model);
+
+} // namespace RDFS
+} // namespace GUI
+} // namespace Ingen
+
+#endif // INGEN_GUI_RDF_HPP