diff options
author | David Robillard <d@drobilla.net> | 2017-03-26 15:24:20 +0200 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2017-03-26 18:13:33 +0200 |
commit | ba3e956f5be02730368b75fbec704e75b3f036da (patch) | |
tree | 1163df60cc7f3279cf940ccd17d9290e7f0da317 /src/Serialiser.cpp | |
parent | 6268bb2accfdc0dcad6cb8b54ba56ec64609d474 (diff) | |
download | ingen-ba3e956f5be02730368b75fbec704e75b3f036da.tar.gz ingen-ba3e956f5be02730368b75fbec704e75b3f036da.tar.bz2 ingen-ba3e956f5be02730368b75fbec704e75b3f036da.zip |
Remove Node::graph_type() method and GraphType enum
Diffstat (limited to 'src/Serialiser.cpp')
-rw-r--r-- | src/Serialiser.cpp | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/src/Serialiser.cpp b/src/Serialiser.cpp index 6c70ca8b..518f0bea 100644 --- a/src/Serialiser.cpp +++ b/src/Serialiser.cpp @@ -303,12 +303,14 @@ Serialiser::serialise(SPtr<const Node> object) throw (std::logic_error) if (!me->_model) throw std::logic_error("serialise called without serialisation in progress"); - if (object->graph_type() == Node::GraphType::GRAPH) { + const URIs& uris = me->_world.uris(); + if (object->has_property(uris.rdf_type, uris.ingen_Graph)) { me->serialise_graph(object, me->path_rdf_node(object->path())); - } else if (object->graph_type() == Node::GraphType::BLOCK) { + } else if (object->has_property(uris.rdf_type, uris.ingen_Block)) { const Sord::URI plugin_id(me->_model->world(), object->plugin()->uri()); me->serialise_block(object, plugin_id, me->path_rdf_node(object->path())); - } else if (object->graph_type() == Node::GraphType::PORT) { + } else if (object->has_property(uris.rdf_type, uris.lv2_InputPort) || + object->has_property(uris.rdf_type, uris.lv2_OutputPort)) { me->serialise_port(object.get(), Resource::Graph::DEFAULT, me->path_rdf_node(object->path())); @@ -359,7 +361,7 @@ Serialiser::Impl::serialise_graph(SPtr<const Node> graph, if (n->first.parent() != graph->path()) continue; - if (n->second->graph_type() == Node::GraphType::GRAPH) { + if (n->second->has_property(uris.rdf_type, uris.ingen_Graph)) { SPtr<Node> subgraph = n->second; SerdURI base_uri; @@ -392,7 +394,7 @@ Serialiser::Impl::serialise_graph(SPtr<const Node> graph, Sord::URI(world, uris.ingen_block), block_id); serialise_block(subgraph, subgraph_id, block_id); - } else if (n->second->graph_type() == Node::GraphType::BLOCK) { + } else if (n->second->has_property(uris.rdf_type, uris.ingen_Block)) { SPtr<const Node> block = n->second; const Sord::URI class_id(world, block->plugin()->uri()); |