aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/engine/Edge.cpp3
-rw-r--r--src/engine/MidiAction.cpp3
-rw-r--r--src/engine/Node.cpp11
3 files changed, 11 insertions, 6 deletions
diff --git a/src/engine/Edge.cpp b/src/engine/Edge.cpp
index 511d38e..70539e0 100644
--- a/src/engine/Edge.cpp
+++ b/src/engine/Edge.cpp
@@ -16,6 +16,7 @@
*/
#include <raul/Atom.hpp>
+#include <raul/AtomRDF.hpp>
#include <redlandmm/World.hpp>
#include <redlandmm/Model.hpp>
#include "machina/Node.hpp"
@@ -54,7 +55,7 @@ Edge::write_state(Redland::Model& model)
model.add_statement(_id,
"machina:probability",
- Atom(_probability.get()).to_rdf_node(model.world()));
+ AtomRDF::atom_to_node(model.world(), Atom(_probability.get())));
}
diff --git a/src/engine/MidiAction.cpp b/src/engine/MidiAction.cpp
index 46985ce..b17c5b9 100644
--- a/src/engine/MidiAction.cpp
+++ b/src/engine/MidiAction.cpp
@@ -19,6 +19,7 @@
#include <raul/SharedPtr.hpp>
#include <raul/MIDISink.hpp>
#include <raul/Atom.hpp>
+#include <raul/AtomRDF.hpp>
#include "machina/MidiAction.hpp"
namespace Machina {
@@ -104,7 +105,7 @@ MidiAction::write_state(Redland::Model& model)
// FIXME: Assumes note on/note off
model.add_statement(_id,
Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:midiNote"),
- Atom((int)(_event.get()[1])).to_rdf_node(model.world()));
+ AtomRDF::atom_to_node(model.world(), Atom((int)(_event.get()[1]))));
}
diff --git a/src/engine/Node.cpp b/src/engine/Node.cpp
index 486bc95..56bfac5 100644
--- a/src/engine/Node.cpp
+++ b/src/engine/Node.cpp
@@ -17,12 +17,15 @@
#include <cassert>
#include <raul/Atom.hpp>
+#include <raul/AtomRDF.hpp>
#include <redlandmm/World.hpp>
#include <redlandmm/Model.hpp>
#include <machina/Node.hpp>
#include <machina/Edge.hpp>
#include <machina/ActionFactory.hpp>
+using namespace Raul;
+
namespace Machina {
@@ -37,7 +40,7 @@ Node::Node(BeatCount duration, bool initial)
Node::Node(const Node& copy)
- : Raul::Stateful() // don't copy RDF ID
+ : Stateful() // don't copy RDF ID
, _is_initial(copy._is_initial)
, _is_selector(copy._is_selector)
, _is_active(false)
@@ -123,7 +126,7 @@ Node::set_exit_action(SharedPtr<Action> action)
void
-Node::enter(SharedPtr<Raul::MIDISink> sink, BeatTime time)
+Node::enter(SharedPtr<MIDISink> sink, BeatTime time)
{
assert(!_is_active);
@@ -137,7 +140,7 @@ Node::enter(SharedPtr<Raul::MIDISink> sink, BeatTime time)
void
-Node::exit(SharedPtr<Raul::MIDISink> sink, BeatTime time)
+Node::exit(SharedPtr<MIDISink> sink, BeatTime time)
{
assert(_is_active);
@@ -218,7 +221,7 @@ Node::write_state(Redland::Model& model)
model.add_statement(_id,
"machina:duration",
- Raul::Atom((float)_duration).to_rdf_node(model.world()));
+ AtomRDF::atom_to_node(model.world(), Atom((float)_duration)));
if (_enter_action) {
_enter_action->write_state(model);