summaryrefslogtreecommitdiffstats
path: root/src/Resource.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2017-03-09 08:33:21 +0100
committerDavid Robillard <d@drobilla.net>2017-03-09 08:33:21 +0100
commit83d366452af8e93f0722658d730528d699f21e2b (patch)
treedb66b0653d57ca2e2939a1352b3d45aeada4689e /src/Resource.cpp
parente360392489fe62dbae1f0c28b7f5fb839851f5f6 (diff)
downloadingen-83d366452af8e93f0722658d730528d699f21e2b.tar.gz
ingen-83d366452af8e93f0722658d730528d699f21e2b.tar.bz2
ingen-83d366452af8e93f0722658d730528d699f21e2b.zip
Preliminary port groups workgroups
Diffstat (limited to 'src/Resource.cpp')
-rw-r--r--src/Resource.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/src/Resource.cpp b/src/Resource.cpp
index 623f601a..a9b9514a 100644
--- a/src/Resource.cpp
+++ b/src/Resource.cpp
@@ -152,12 +152,13 @@ Resource::type(const URIs& uris,
bool& graph,
bool& block,
bool& port,
- bool& is_output)
+ bool& is_output,
+ bool& group)
{
typedef Properties::const_iterator iterator;
const std::pair<iterator, iterator> types_range = properties.equal_range(uris.rdf_type);
- graph = block = port = is_output = false;
+ graph = block = port = is_output = group = false;
for (iterator i = types_range.first; i != types_range.second; ++i) {
const Atom& atom = i->second;
if (atom.type() != uris.forge.URI && atom.type() != uris.forge.URID) {
@@ -174,6 +175,12 @@ Resource::type(const URIs& uris,
} else if (uris.lv2_OutputPort == atom) {
port = true;
is_output = true;
+ } else if (uris.pg_InputGroup == atom) {
+ group = true;
+ is_output = false;
+ } else if (uris.pg_OutputGroup == atom) {
+ group = true;
+ is_output = true;
}
}
@@ -183,7 +190,7 @@ Resource::type(const URIs& uris,
} else if (port && (graph || block)) { // nonsense
port = false;
return false;
- } else if (graph || block || port) { // recognized type
+ } else if (graph || block || port || group) { // recognized type
return true;
} else { // unknown
return false;