From de25ae35ccb0613290ba20bfcf0ea15476c26ed5 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Wed, 28 Feb 2007 02:48:54 +0000 Subject: Added python script to convert RDF files to dot graphs. git-svn-id: http://svn.drobilla.net/lad/machina@340 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/Machine.cpp | 12 +++++++++--- src/engine/Node.cpp | 4 ++-- 2 files changed, 11 insertions(+), 5 deletions(-) (limited to 'src/engine') diff --git a/src/engine/Machine.cpp b/src/engine/Machine.cpp index 41335bc..6cade39 100644 --- a/src/engine/Machine.cpp +++ b/src/engine/Machine.cpp @@ -221,9 +221,15 @@ Machine::write_state(Raul::RDFWriter& writer) (*n)->write_state(writer); - writer.write(RdfId(RdfId::RESOURCE, ""), - RdfId(RdfId::RESOURCE, "machina:node"), - (*n)->id()); + if ((*n)->is_initial()) { + writer.write(RdfId(RdfId::RESOURCE, ""), + RdfId(RdfId::RESOURCE, "machina:initialNode"), + (*n)->id()); + } else { + writer.write(RdfId(RdfId::RESOURCE, ""), + RdfId(RdfId::RESOURCE, "machina:node"), + (*n)->id()); + } for (Node::Edges::const_iterator e = (*n)->outgoing_edges().begin(); e != (*n)->outgoing_edges().end(); ++e) { diff --git a/src/engine/Node.cpp b/src/engine/Node.cpp index ecb7a22..47eee35 100644 --- a/src/engine/Node.cpp +++ b/src/engine/Node.cpp @@ -131,9 +131,9 @@ Node::write_state(Raul::RDFWriter& writer) RdfId(RdfId::RESOURCE, "machina:duration"), Raul::Atom((float)_duration)); - for (Node::Edges::const_iterator e = _outgoing_edges.begin(); + /*for (Node::Edges::const_iterator e = _outgoing_edges.begin(); e != _outgoing_edges.end(); ++e) - (*e)->write_state(writer); + (*e)->write_state(writer);*/ } -- cgit v1.2.1