diff options
author | David Robillard <d@drobilla.net> | 2015-03-28 09:47:19 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2015-03-28 09:47:19 +0000 |
commit | c0da1cf368b7d43c9c886b81768b4a62a07fae3f (patch) | |
tree | 83b651a2b680e32b990dd1e1909156aee475a181 /src/gui/RDFS.hpp | |
parent | d0b4376df39e95cb9389f5c42fc1c2333e8c0c97 (diff) | |
download | ingen-c0da1cf368b7d43c9c886b81768b4a62a07fae3f.tar.gz ingen-c0da1cf368b7d43c9c886b81768b4a62a07fae3f.tar.bz2 ingen-c0da1cf368b7d43c9c886b81768b4a62a07fae3f.zip |
Unify value widgets in properties dialog.
This shows the fancy URI selector for URI properties, and can show
numeric controls for the property-to-add. The ontologies need some
work, along with smarter widget creation, before the latter will
actually be useful.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@5648 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/gui/RDFS.hpp')
-rw-r--r-- | src/gui/RDFS.hpp | 25 |
1 files changed, 15 insertions, 10 deletions
diff --git a/src/gui/RDFS.hpp b/src/gui/RDFS.hpp index d9506dbc..52931aaf 100644 --- a/src/gui/RDFS.hpp +++ b/src/gui/RDFS.hpp @@ -19,10 +19,10 @@ #include <map> #include <set> - -#include <glibmm/ustring.h> +#include <string> #include "ingen/types.hpp" +#include "lilv/lilv.h" #include "raul/URI.hpp" namespace Ingen { @@ -38,16 +38,14 @@ 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; +/** Label => Resource map. */ +typedef std::map<std::string, Raul::URI> Objects; /** Return the label of `node`. */ -Glib::ustring -label(World* world, const LilvNode* node); +std::string label(World* world, const LilvNode* node); /** Return the comment of `node`. */ -Glib::ustring -comment(World* world, const LilvNode* node); +std::string comment(World* world, const LilvNode* node); /** Set `types` to its super/sub class closure. * @param super If true, find all superclasses, otherwise all subclasses @@ -55,8 +53,7 @@ comment(World* world, const LilvNode* node); void classes(World* world, URISet& types, bool super); /** Get all instances of any class in `types`. */ -Objects -instances(World* world, const URISet& types); +Objects instances(World* world, const URISet& types); /** Get all the types which `model` is an instance of. */ URISet types(World* world, SPtr<const Client::ObjectModel> model); @@ -64,6 +61,14 @@ URISet types(World* world, SPtr<const Client::ObjectModel> model); /** Get all the properties with domains appropriate for `model`. */ URISet properties(World* world, SPtr<const Client::ObjectModel> model); +/** Return the range (value types) of `prop`. + * @param recursive If true, include all subclasses. + */ +URISet range(World* world, const LilvNode* prop, bool recursive); + +/** Return true iff `inst` is-a `klass`. */ +bool is_a(World* world, const LilvNode* inst, const LilvNode* klass); + } // namespace RDFS } // namespace GUI } // namespace Ingen |