diff options
Diffstat (limited to 'src/engine')
-rw-r--r-- | src/engine/Action.cpp | 6 | ||||
-rw-r--r-- | src/engine/Edge.cpp | 6 | ||||
-rw-r--r-- | src/engine/Loader.cpp | 8 | ||||
-rw-r--r-- | src/engine/Machine.cpp | 12 | ||||
-rw-r--r-- | src/engine/Makefile.am | 4 | ||||
-rw-r--r-- | src/engine/MidiAction.cpp | 11 | ||||
-rw-r--r-- | src/engine/Node.cpp | 8 | ||||
-rw-r--r-- | src/engine/machina/Action.hpp | 2 | ||||
-rw-r--r-- | src/engine/machina/Edge.hpp | 2 | ||||
-rw-r--r-- | src/engine/machina/Engine.hpp | 6 | ||||
-rw-r--r-- | src/engine/machina/Loader.hpp | 4 | ||||
-rw-r--r-- | src/engine/machina/Machine.hpp | 2 | ||||
-rw-r--r-- | src/engine/machina/MidiAction.hpp | 2 | ||||
-rw-r--r-- | src/engine/machina/Node.hpp | 2 |
14 files changed, 38 insertions, 37 deletions
diff --git a/src/engine/Action.cpp b/src/engine/Action.cpp index 312bff6..7be3687 100644 --- a/src/engine/Action.cpp +++ b/src/engine/Action.cpp @@ -22,7 +22,7 @@ namespace Machina { void -Action::write_state(Raul::RDF::Model& model) +Action::write_state(Redland::Model& model) { using namespace Raul; @@ -30,8 +30,8 @@ Action::write_state(Raul::RDF::Model& model) set_id(model.world().blank_id()); model.add_statement(_id, - RDF::Node(model.world(), RDF::Node::RESOURCE, "rdf:type"), - RDF::Node(model.world(), RDF::Node::RESOURCE, "machina:Action")); + Redland::Node(model.world(), Redland::Node::RESOURCE, "rdf:type"), + Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:Action")); } diff --git a/src/engine/Edge.cpp b/src/engine/Edge.cpp index 430c746..08e45c0 100644 --- a/src/engine/Edge.cpp +++ b/src/engine/Edge.cpp @@ -24,7 +24,7 @@ namespace Machina { void -Edge::write_state(Raul::RDF::Model& model) +Edge::write_state(Redland::Model& model) { using namespace Raul; @@ -33,7 +33,7 @@ Edge::write_state(Raul::RDF::Model& model) model.add_statement(_id, "rdf:type", - RDF::Node(model.world(), RDF::Node::RESOURCE, "machina:Edge")); + Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:Edge")); SharedPtr<Node> tail = _tail.lock(); SharedPtr<Node> head = _head; @@ -53,7 +53,7 @@ Edge::write_state(Raul::RDF::Model& model) model.add_statement(_id, "machina:probability", - _probability.get()); + Atom(_probability.get()).to_rdf_node(model.world())); } diff --git a/src/engine/Loader.cpp b/src/engine/Loader.cpp index 015accf..7180061 100644 --- a/src/engine/Loader.cpp +++ b/src/engine/Loader.cpp @@ -19,7 +19,7 @@ #include <map> #include <cmath> #include <glibmm/ustring.h> -#include <raul/RDFQuery.hpp> +#include <redlandmm/Query.hpp> #include "machina/Loader.hpp" #include "machina/Node.hpp" #include "machina/Edge.hpp" @@ -32,7 +32,7 @@ using std::cerr; using std::cout; using std::endl; namespace Machina { -Loader::Loader(Raul::RDF::World& rdf_world) +Loader::Loader(Redland::World& rdf_world) : _rdf_world(rdf_world) { _rdf_world.add_prefix("xsd", "http://www.w3.org/2001/XMLSchema#"); @@ -48,7 +48,7 @@ Loader::Loader(Raul::RDF::World& rdf_world) SharedPtr<Machine> Loader::load(const Glib::ustring& uri) { - using Raul::RDF::Query; + using Redland::Query; SharedPtr<Machine> machine; Glib::ustring document_uri = uri; @@ -77,7 +77,7 @@ Loader::load(const Glib::ustring& uri) typedef std::map<string, SharedPtr<Node> > Created; Created created; - Raul::RDF::Model model(_rdf_world, document_uri); + Redland::Model model(_rdf_world, document_uri); /* Get initial nodes */ diff --git a/src/engine/Machine.cpp b/src/engine/Machine.cpp index 0ddf61c..11d894c 100644 --- a/src/engine/Machine.cpp +++ b/src/engine/Machine.cpp @@ -299,15 +299,15 @@ Machine::learn(SharedPtr<LearnRequest> learn) void -Machine::write_state(Raul::RDF::Model& model) +Machine::write_state(Redland::Model& model) { using namespace Raul; model.world().add_prefix("machina", "http://drobilla.net/ns/machina#"); model.add_statement(model.base_uri(), - RDF::Node(model.world(), RDF::Node::RESOURCE, "rdf:type"), - RDF::Node(model.world(), RDF::Node::RESOURCE, "machina:Machine")); + Redland::Node(model.world(), Redland::Node::RESOURCE, "rdf:type"), + Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:Machine")); size_t count = 0; @@ -317,11 +317,11 @@ Machine::write_state(Raul::RDF::Model& model) if ((*n)->is_initial()) { model.add_statement(model.base_uri(), - RDF::Node(model.world(), RDF::Node::RESOURCE, "machina:initialNode"), + Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:initialNode"), (*n)->id()); } else { model.add_statement(model.base_uri(), - RDF::Node(model.world(), RDF::Node::RESOURCE, "machina:node"), + Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:node"), (*n)->id()); } } @@ -336,7 +336,7 @@ Machine::write_state(Raul::RDF::Model& model) (*e)->write_state(model); model.add_statement(model.base_uri(), - RDF::Node(model.world(), RDF::Node::RESOURCE, "machina:edge"), + Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:edge"), (*e)->id()); } diff --git a/src/engine/Makefile.am b/src/engine/Makefile.am index dad7425..5e291c7 100644 --- a/src/engine/Makefile.am +++ b/src/engine/Makefile.am @@ -2,8 +2,8 @@ SUBDIRS = machina lib_LTLIBRARIES = libmachina.la -libmachina_la_CXXFLAGS = -I$(top_srcdir)/raul @JACK_CFLAGS@ @GLIBMM_CFLAGS@ -libmachina_la_LIBADD = @RAUL_LIBS@ @JACK_LIBS@ @GLIBMM_LIBS@ +libmachina_la_CXXFLAGS = @REDLANDMM_CFLAGS@ @RAUL_CFLAGS@ @JACK_CFLAGS@ @GLIBMM_CFLAGS@ +libmachina_la_LIBADD = @REDLANDMM_LIBS@ @RAUL_LIBS@ @JACK_LIBS@ @GLIBMM_LIBS@ libmachina_la_SOURCES = \ Node.cpp \ diff --git a/src/engine/MidiAction.cpp b/src/engine/MidiAction.cpp index f811924..ac96211 100644 --- a/src/engine/MidiAction.cpp +++ b/src/engine/MidiAction.cpp @@ -18,6 +18,7 @@ #include <iostream> #include <raul/SharedPtr.hpp> #include <raul/MIDISink.hpp> +#include <raul/Atom.hpp> #include "machina/MidiAction.hpp" namespace Machina { @@ -91,20 +92,20 @@ MidiAction::execute(SharedPtr<Raul::MIDISink> sink, Raul::BeatTime time) void -MidiAction::write_state(Raul::RDF::Model& model) +MidiAction::write_state(Redland::Model& model) { using namespace Raul; Action::write_state(model); model.add_statement(_id, - RDF::Node(model.world(), RDF::Node::RESOURCE, "rdf:type"), - RDF::Node(model.world(), RDF::Node::RESOURCE, "machina:MidiAction")); + Redland::Node(model.world(), Redland::Node::RESOURCE, "rdf:type"), + Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:MidiAction")); // FIXME: Assumes note on/note off model.add_statement(_id, - RDF::Node(model.world(), RDF::Node::RESOURCE, "machina:midiNote"), - (int)(_event.get()[1])); + Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:midiNote"), + Atom((int)(_event.get()[1])).to_rdf_node(model.world())); } diff --git a/src/engine/Node.cpp b/src/engine/Node.cpp index 6869798..cb1a8eb 100644 --- a/src/engine/Node.cpp +++ b/src/engine/Node.cpp @@ -135,7 +135,7 @@ Node::remove_outgoing_edges_to(SharedPtr<Node> node) void -Node::write_state(Raul::RDF::Model& model) +Node::write_state(Redland::Model& model) { using namespace Raul; @@ -145,15 +145,15 @@ Node::write_state(Raul::RDF::Model& model) if (_is_selector) model.add_statement(_id, "rdf:type", - RDF::Node(model.world(), RDF::Node::RESOURCE, "machina:SelectorNode")); + Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:SelectorNode")); else model.add_statement(_id, "rdf:type", - RDF::Node(model.world(), RDF::Node::RESOURCE, "machina:Node")); + Redland::Node(model.world(), Redland::Node::RESOURCE, "machina:Node")); model.add_statement(_id, "machina:duration", - Raul::Atom((float)_duration)); + Raul::Atom((float)_duration).to_rdf_node(model.world())); if (_enter_action) { _enter_action->write_state(model); diff --git a/src/engine/machina/Action.hpp b/src/engine/machina/Action.hpp index cf6bf58..3cab3ee 100644 --- a/src/engine/machina/Action.hpp +++ b/src/engine/machina/Action.hpp @@ -34,7 +34,7 @@ namespace Machina { struct Action : public Raul::Deletable, public Raul::Stateful { virtual void execute(SharedPtr<Raul::MIDISink> sink, Raul::BeatTime time) = 0; - virtual void write_state(Raul::RDF::Model& model); + virtual void write_state(Redland::Model& model); }; diff --git a/src/engine/machina/Edge.hpp b/src/engine/machina/Edge.hpp index f82f1ae..3f564ef 100644 --- a/src/engine/machina/Edge.hpp +++ b/src/engine/machina/Edge.hpp @@ -40,7 +40,7 @@ public: , _head(head) {} - void write_state(Raul::RDF::Model& model); + void write_state(Redland::Model& model); WeakPtr<Node> tail() { return _tail; } SharedPtr<Node> head() { return _head; } diff --git a/src/engine/machina/Engine.hpp b/src/engine/machina/Engine.hpp index d429df2..d8d16d9 100644 --- a/src/engine/machina/Engine.hpp +++ b/src/engine/machina/Engine.hpp @@ -31,13 +31,13 @@ class Machine; class Engine { public: - Engine(SharedPtr<Driver> driver, Raul::RDF::World& rdf_world) + Engine(SharedPtr<Driver> driver, Redland::World& rdf_world) : _driver(driver) , _rdf_world(rdf_world) , _loader(_rdf_world) { } - Raul::RDF::World& rdf_world() { return _rdf_world; } + Redland::World& rdf_world() { return _rdf_world; } SharedPtr<Driver> driver() { return _driver; } SharedPtr<Machine> machine() { return _driver->machine(); } @@ -51,7 +51,7 @@ public: private: SharedPtr<Driver> _driver; - Raul::RDF::World& _rdf_world; + Redland::World& _rdf_world; Loader _loader; }; diff --git a/src/engine/machina/Loader.hpp b/src/engine/machina/Loader.hpp index 9c351a0..914df24 100644 --- a/src/engine/machina/Loader.hpp +++ b/src/engine/machina/Loader.hpp @@ -32,12 +32,12 @@ class Machine; class Loader { public: - Loader(Raul::RDF::World& rdf_world); + Loader(Redland::World& rdf_world); SharedPtr<Machine> load(const Glib::ustring& filename); private: - Raul::RDF::World& _rdf_world; + Redland::World& _rdf_world; }; diff --git a/src/engine/machina/Machine.hpp b/src/engine/machina/Machine.hpp index 946eaca..c6f8796 100644 --- a/src/engine/machina/Machine.hpp +++ b/src/engine/machina/Machine.hpp @@ -47,7 +47,7 @@ public: void remove_node(SharedPtr<Node> node); void learn(SharedPtr<LearnRequest> learn); - void write_state(Raul::RDF::Model& model); + void write_state(Redland::Model& model); // Audio context void reset(); diff --git a/src/engine/machina/MidiAction.hpp b/src/engine/machina/MidiAction.hpp index 09986fd..5639532 100644 --- a/src/engine/machina/MidiAction.hpp +++ b/src/engine/machina/MidiAction.hpp @@ -53,7 +53,7 @@ public: void execute(SharedPtr<Raul::MIDISink> driver, Raul::BeatTime time); - virtual void write_state(Raul::RDF::Model& model); + virtual void write_state(Redland::Model& model); private: diff --git a/src/engine/machina/Node.hpp b/src/engine/machina/Node.hpp index 1834207..2e26f0a 100644 --- a/src/engine/machina/Node.hpp +++ b/src/engine/machina/Node.hpp @@ -62,7 +62,7 @@ public: void remove_outgoing_edge(SharedPtr<Edge> edge); void remove_outgoing_edges_to(SharedPtr<Node> node); - void write_state(Raul::RDF::Model& model); + void write_state(Redland::Model& model); bool is_initial() const { return _is_initial; } void set_initial(bool i) { _is_initial = i; } |