From cfce5f86e3ce1572299bd62e7047e0cb985a4358 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Tue, 1 May 2007 04:01:04 +0000 Subject: Converted Raul (and thus Ingen and Machina) to use Redland over Raptor/Rasqal independently. Fixed patch loading for Ingen (local only, still something wrong with remote...). git-svn-id: http://svn.drobilla.net/lad/machina@486 a436a847-0d15-0410-975c-d299462d15a1 --- src/engine/machina/Action.hpp | 2 +- src/engine/machina/Edge.hpp | 2 +- src/engine/machina/Engine.hpp | 11 +++++++++-- src/engine/machina/Loader.hpp | 10 +++++----- src/engine/machina/Machine.hpp | 4 ++-- src/engine/machina/MidiAction.hpp | 2 +- src/engine/machina/Node.hpp | 2 +- 7 files changed, 20 insertions(+), 13 deletions(-) (limited to 'src/engine/machina') diff --git a/src/engine/machina/Action.hpp b/src/engine/machina/Action.hpp index 888f639..d3c47cb 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 sink, Raul::BeatTime time) = 0; - virtual void write_state(Raul::RDFWriter& writer); + virtual void write_state(Raul::RDF::Model& model); }; diff --git a/src/engine/machina/Edge.hpp b/src/engine/machina/Edge.hpp index 51314c4..4681b38 100644 --- a/src/engine/machina/Edge.hpp +++ b/src/engine/machina/Edge.hpp @@ -40,7 +40,7 @@ public: , _head(head) {} - void write_state(Raul::RDFWriter& writer); + void write_state(Raul::RDF::Model& model); WeakPtr tail() { return _tail; } SharedPtr head() { return _head; } diff --git a/src/engine/machina/Engine.hpp b/src/engine/machina/Engine.hpp index 4263ef3..2cae36d 100644 --- a/src/engine/machina/Engine.hpp +++ b/src/engine/machina/Engine.hpp @@ -21,7 +21,8 @@ #include #include #include -#include "machina/Driver.hpp" +#include "machina/Driver.hpp" +#include "machina/Loader.hpp" namespace Machina { @@ -30,10 +31,14 @@ class Machine; class Engine { public: - Engine(SharedPtr driver) + Engine(SharedPtr driver, Raul::RDF::World& rdf_world) : _driver(driver) + , _rdf_world(rdf_world) + , _loader(_rdf_world) { } + Raul::RDF::World& rdf_world() { return _rdf_world; } + SharedPtr driver() { return _driver; } SharedPtr machine() { return _driver->machine(); } @@ -46,6 +51,8 @@ public: private: SharedPtr _driver; + Raul::RDF::World& _rdf_world; + Loader _loader; }; diff --git a/src/engine/machina/Loader.hpp b/src/engine/machina/Loader.hpp index af35c56..eb7deac 100644 --- a/src/engine/machina/Loader.hpp +++ b/src/engine/machina/Loader.hpp @@ -19,9 +19,9 @@ #define MACHINA_LOADER_HPP #include -#include "raul/SharedPtr.h" -#include "raul/Path.h" -#include "raul/Namespaces.h" +#include +#include +#include using Raul::Namespaces; @@ -32,12 +32,12 @@ class Machine; class Loader { public: - Loader(SharedPtr = SharedPtr()); + Loader(Raul::RDF::World& rdf_world); SharedPtr load(const Glib::ustring& filename); private: - SharedPtr _namespaces; + Raul::RDF::World& _rdf_world; }; diff --git a/src/engine/machina/Machine.hpp b/src/engine/machina/Machine.hpp index c2f081d..ff32930 100644 --- a/src/engine/machina/Machine.hpp +++ b/src/engine/machina/Machine.hpp @@ -21,7 +21,7 @@ #include #include #include -#include +#include #include #include "types.hpp" #include "LearnRequest.hpp" @@ -47,7 +47,7 @@ public: void remove_node(SharedPtr node); void learn(SharedPtr learn); - void write_state(Raul::RDFWriter& writer); + void write_state(Raul::RDF::Model& model); // Audio context void reset(); diff --git a/src/engine/machina/MidiAction.hpp b/src/engine/machina/MidiAction.hpp index 510c0d0..c019ca9 100644 --- a/src/engine/machina/MidiAction.hpp +++ b/src/engine/machina/MidiAction.hpp @@ -53,7 +53,7 @@ public: void execute(SharedPtr driver, Raul::BeatTime time); - virtual void write_state(Raul::RDFWriter& writer); + virtual void write_state(Raul::RDF::Model& model); private: diff --git a/src/engine/machina/Node.hpp b/src/engine/machina/Node.hpp index 23fb4ec..6c275a8 100644 --- a/src/engine/machina/Node.hpp +++ b/src/engine/machina/Node.hpp @@ -62,7 +62,7 @@ public: void remove_outgoing_edge(SharedPtr edge); void remove_outgoing_edges_to(SharedPtr node); - void write_state(Raul::RDFWriter& writer); + void write_state(Raul::RDF::Model& model); bool is_initial() const { return _is_initial; } void set_initial(bool i) { _is_initial = i; } -- cgit v1.2.1