diff options
author | David Robillard <d@drobilla.net> | 2010-02-25 20:40:13 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2010-02-25 20:40:13 +0000 |
commit | 77a9beca75debd2d87d735fc4fe847694eee6f13 (patch) | |
tree | ae03699b999e84bc4c283abfd215c8037ecddaf6 /src/serialisation | |
parent | e22984efe9b82ab006494aea93814a592cd44ece (diff) | |
download | ingen-77a9beca75debd2d87d735fc4fe847694eee6f13.tar.gz ingen-77a9beca75debd2d87d735fc4fe847694eee6f13.tar.bz2 ingen-77a9beca75debd2d87d735fc4fe847694eee6f13.zip |
Work on contexts and polymorphic ports.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2492 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/serialisation')
-rw-r--r-- | src/serialisation/Serialiser.cpp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/serialisation/Serialiser.cpp b/src/serialisation/Serialiser.cpp index 1469afaf..8d88a21c 100644 --- a/src/serialisation/Serialiser.cpp +++ b/src/serialisation/Serialiser.cpp @@ -417,8 +417,10 @@ Serialiser::serialise_port(const Port* port, const Redland::Node& port_id) _model->add_statement(port_id, "rdf:type", Redland::Resource(_model->world(), "lv2:OutputPort")); - _model->add_statement(port_id, "rdf:type", - Redland::Resource(_model->world(), port->type().uri().str())); + for (Port::PortTypes::const_iterator i = port->types().begin(); + i != port->types().end(); ++i) + _model->add_statement(port_id, "rdf:type", + Redland::Resource(_model->world(), i->uri().str())); if (dynamic_cast<Patch*>(port->graph_parent())) _model->add_statement(port_id, "rdf:instanceOf", @@ -439,8 +441,10 @@ Serialiser::serialise_port_meta(const Port* port, const Redland::Node& port_id) _model->add_statement(port_id, "rdf:type", Redland::Resource(_model->world(), "lv2:OutputPort")); - _model->add_statement(port_id, "rdf:type", - Redland::Resource(_model->world(), port->type().uri().str())); + for (Port::PortTypes::const_iterator i = port->types().begin(); + i != port->types().end(); ++i) + _model->add_statement(port_id, "rdf:type", + Redland::Resource(_model->world(), i->uri().str())); _model->add_statement(port_id, "lv2:index", AtomRDF::atom_to_node(*_model, Atom((int)port->index()))); @@ -450,7 +454,7 @@ Serialiser::serialise_port_meta(const Port* port, const Redland::Node& port_id) if (port->value().is_valid()) { _model->add_statement(port_id, "lv2:default", AtomRDF::atom_to_node(*_model, Atom(port->value()))); - } else if (port->type() == PortType::CONTROL) { + } else if (port->is_a(PortType::CONTROL)) { LOG(warn) << "Port " << port->path() << " has no lv2:default" << endl; } } |