summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity
diff options
context:
space:
mode:
Diffstat (limited to 'src/progs/ingenuity')
-rw-r--r--src/progs/ingenuity/App.cpp12
-rw-r--r--src/progs/ingenuity/App.h35
-rw-r--r--src/progs/ingenuity/BreadCrumb.h4
-rw-r--r--src/progs/ingenuity/BreadCrumbBox.h4
-rw-r--r--src/progs/ingenuity/ConfigWindow.cpp7
-rw-r--r--src/progs/ingenuity/ConfigWindow.h5
-rw-r--r--src/progs/ingenuity/Configuration.cpp8
-rw-r--r--src/progs/ingenuity/ConnectWindow.cpp94
-rw-r--r--src/progs/ingenuity/ConnectWindow.h10
-rw-r--r--src/progs/ingenuity/Connection.h4
-rw-r--r--src/progs/ingenuity/ControlGroups.cpp8
-rw-r--r--src/progs/ingenuity/ControlGroups.h4
-rw-r--r--src/progs/ingenuity/ControlPanel.cpp10
-rw-r--r--src/progs/ingenuity/ControlPanel.h11
-rw-r--r--src/progs/ingenuity/DSSIController.cpp4
-rw-r--r--src/progs/ingenuity/DSSIController.h4
-rw-r--r--src/progs/ingenuity/LoadPatchWindow.cpp4
-rw-r--r--src/progs/ingenuity/LoadPatchWindow.h7
-rw-r--r--src/progs/ingenuity/LoadPluginWindow.cpp14
-rw-r--r--src/progs/ingenuity/LoadPluginWindow.h6
-rw-r--r--src/progs/ingenuity/LoadRemotePatchWindow.cpp6
-rw-r--r--src/progs/ingenuity/LoadRemotePatchWindow.h7
-rw-r--r--src/progs/ingenuity/LoadSubpatchWindow.cpp8
-rw-r--r--src/progs/ingenuity/LoadSubpatchWindow.h6
-rw-r--r--src/progs/ingenuity/Makefile.am15
-rw-r--r--src/progs/ingenuity/NewSubpatchWindow.cpp11
-rw-r--r--src/progs/ingenuity/NewSubpatchWindow.h6
-rw-r--r--src/progs/ingenuity/NodeControlWindow.cpp11
-rw-r--r--src/progs/ingenuity/NodeControlWindow.h2
-rw-r--r--src/progs/ingenuity/NodeMenu.cpp6
-rw-r--r--src/progs/ingenuity/NodeMenu.h6
-rw-r--r--src/progs/ingenuity/NodeModule.cpp10
-rw-r--r--src/progs/ingenuity/NodeModule.h2
-rw-r--r--src/progs/ingenuity/NodePropertiesWindow.cpp6
-rw-r--r--src/progs/ingenuity/NodePropertiesWindow.h4
-rw-r--r--src/progs/ingenuity/PatchCanvas.cpp24
-rw-r--r--src/progs/ingenuity/PatchCanvas.h4
-rw-r--r--src/progs/ingenuity/PatchPortModule.cpp6
-rw-r--r--src/progs/ingenuity/PatchPortModule.h2
-rw-r--r--src/progs/ingenuity/PatchPropertiesWindow.cpp4
-rw-r--r--src/progs/ingenuity/PatchPropertiesWindow.h2
-rw-r--r--src/progs/ingenuity/PatchTreeWindow.cpp11
-rw-r--r--src/progs/ingenuity/PatchTreeWindow.h2
-rw-r--r--src/progs/ingenuity/PatchView.cpp6
-rw-r--r--src/progs/ingenuity/PatchView.h4
-rw-r--r--src/progs/ingenuity/PatchWindow.cpp6
-rw-r--r--src/progs/ingenuity/PatchWindow.h6
-rw-r--r--src/progs/ingenuity/Port.cpp10
-rw-r--r--src/progs/ingenuity/Port.h2
-rw-r--r--src/progs/ingenuity/PortPropertiesWindow.cpp10
-rw-r--r--src/progs/ingenuity/PortPropertiesWindow.h4
-rw-r--r--src/progs/ingenuity/RenameWindow.cpp9
-rw-r--r--src/progs/ingenuity/RenameWindow.h4
-rw-r--r--src/progs/ingenuity/SubpatchModule.cpp4
-rw-r--r--src/progs/ingenuity/SubpatchModule.h6
-rw-r--r--src/progs/ingenuity/ThreadedLoader.cpp26
-rw-r--r--src/progs/ingenuity/ThreadedLoader.h18
-rw-r--r--src/progs/ingenuity/UploadPatchWindow.cpp8
-rw-r--r--src/progs/ingenuity/UploadPatchWindow.h10
-rw-r--r--src/progs/ingenuity/WindowFactory.h5
-rwxr-xr-xsrc/progs/ingenuity/ingenuity_dev3
61 files changed, 300 insertions, 257 deletions
diff --git a/src/progs/ingenuity/App.cpp b/src/progs/ingenuity/App.cpp
index 0e726db9..20b61da6 100644
--- a/src/progs/ingenuity/App.cpp
+++ b/src/progs/ingenuity/App.cpp
@@ -23,6 +23,11 @@
#include <libgnomecanvasmm.h>
#include <time.h>
#include <sys/time.h>
+#include <raul/Path.h>
+#include "interface/EngineInterface.h"
+#include "client/ObjectModel.h"
+#include "client/PatchModel.h"
+#include "client/Store.h"
#include "NodeModule.h"
#include "ControlPanel.h"
#include "SubpatchModule.h"
@@ -31,16 +36,11 @@
#include "MessagesWindow.h"
#include "ConfigWindow.h"
#include "GladeFactory.h"
-#include "raul/Path.h"
-#include "ObjectModel.h"
-#include "PatchModel.h"
#include "PatchTreeWindow.h"
#include "Configuration.h"
#include "ConnectWindow.h"
-#include "Store.h"
#include "ThreadedLoader.h"
#include "WindowFactory.h"
-#include "ModelEngineInterface.h"
#ifdef HAVE_LASH
#include "LashController.h"
#endif
@@ -102,7 +102,7 @@ App::instantiate()
void
-App::attach(const SharedPtr<ModelEngineInterface>& engine, const SharedPtr<SigClientInterface>& client)
+App::attach(const SharedPtr<EngineInterface>& engine, const SharedPtr<SigClientInterface>& client)
{
assert( ! _engine);
assert( ! _client);
diff --git a/src/progs/ingenuity/App.h b/src/progs/ingenuity/App.h
index aaf33893..2ef0891d 100644
--- a/src/progs/ingenuity/App.h
+++ b/src/progs/ingenuity/App.h
@@ -31,14 +31,19 @@
using std::string; using std::map; using std::list;
using std::cerr; using std::endl;
-namespace Ingen { namespace Client {
- class PatchModel;
- class PluginModel;
- class Store;
- class SigClientInterface;
- class ModelEngineInterface;
-} }
+namespace Ingen {
+ namespace Shared {
+ class EngineInterface;
+ }
+ namespace Client {
+ class PatchModel;
+ class PluginModel;
+ class Store;
+ class SigClientInterface;
+ }
+}
using namespace Ingen::Client;
+using Ingen::Shared::EngineInterface;
/** \defgroup Ingenuity GTK Client
*/
@@ -72,8 +77,8 @@ public:
void error_message(const string& msg);
- void attach(const SharedPtr<ModelEngineInterface>& engine,
- const SharedPtr<SigClientInterface>& client);
+ void attach(const SharedPtr<EngineInterface>& engine,
+ const SharedPtr<SigClientInterface>& client);
void detach();
@@ -89,10 +94,10 @@ public:
Raul::RDF::World* rdf_world() { return &_rdf_world; }
- const SharedPtr<ModelEngineInterface>& engine() const { return _engine; }
- const SharedPtr<SigClientInterface>& client() const { return _client; }
- const SharedPtr<Store>& store() const { return _store; }
- const SharedPtr<ThreadedLoader>& loader() const { return _loader; }
+ const SharedPtr<EngineInterface>& engine() const { return _engine; }
+ const SharedPtr<SigClientInterface>& client() const { return _client; }
+ const SharedPtr<Store>& store() const { return _store; }
+ const SharedPtr<ThreadedLoader>& loader() const { return _loader; }
static inline App& instance() { assert(_instance); return *_instance; }
static void instantiate();
@@ -101,8 +106,8 @@ protected:
App();
static App* _instance;
- SharedPtr<ModelEngineInterface> _engine;
- SharedPtr<SigClientInterface> _client;
+ SharedPtr<EngineInterface> _engine;
+ SharedPtr<SigClientInterface> _client;
SharedPtr<Store> _store;
SharedPtr<ThreadedLoader> _loader;
diff --git a/src/progs/ingenuity/BreadCrumb.h b/src/progs/ingenuity/BreadCrumb.h
index ae829dee..1e8b4c9b 100644
--- a/src/progs/ingenuity/BreadCrumb.h
+++ b/src/progs/ingenuity/BreadCrumb.h
@@ -19,8 +19,8 @@
#define BREADCRUMB_H
#include <gtkmm.h>
-#include "raul/Path.h"
-#include "raul/SharedPtr.h"
+#include <raul/Path.h>
+#include <raul/SharedPtr.h>
#include "PatchView.h"
namespace Ingenuity {
diff --git a/src/progs/ingenuity/BreadCrumbBox.h b/src/progs/ingenuity/BreadCrumbBox.h
index f05a14d1..952e04f1 100644
--- a/src/progs/ingenuity/BreadCrumbBox.h
+++ b/src/progs/ingenuity/BreadCrumbBox.h
@@ -22,8 +22,8 @@
#include <gtkmm.h>
#include <libglademm/xml.h>
#include <libglademm.h>
-#include "raul/Path.h"
-#include "raul/SharedPtr.h"
+#include <raul/Path.h>
+#include <raul/SharedPtr.h>
#include "PatchView.h"
namespace Ingenuity {
diff --git a/src/progs/ingenuity/ConfigWindow.cpp b/src/progs/ingenuity/ConfigWindow.cpp
index decd18ef..eef81ce3 100644
--- a/src/progs/ingenuity/ConfigWindow.cpp
+++ b/src/progs/ingenuity/ConfigWindow.cpp
@@ -15,17 +15,18 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "ConfigWindow.h"
#include <iostream>
#include <cassert>
#include <algorithm>
#include <cctype>
-#include "NodeModel.h"
-using std::cout; using std::cerr; using std::endl;
+#include "client/NodeModel.h"
+#include "ConfigWindow.h"
+using namespace std;
namespace Ingenuity {
+
ConfigWindow::ConfigWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::Glade::Xml>& xml)
: Gtk::Window(cobject),
_configuration(NULL)
diff --git a/src/progs/ingenuity/ConfigWindow.h b/src/progs/ingenuity/ConfigWindow.h
index 04a25689..31e564bd 100644
--- a/src/progs/ingenuity/ConfigWindow.h
+++ b/src/progs/ingenuity/ConfigWindow.h
@@ -15,16 +15,15 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-
#ifndef CONFIGWINDOW_H
#define CONFIGWINDOW_H
-#include "PluginModel.h"
-#include "Configuration.h"
#include <list>
#include <libglademm/xml.h>
#include <libglademm.h>
#include <gtkmm.h>
+#include "client/PluginModel.h"
+#include "Configuration.h"
using std::list;
using Ingen::Client::PluginModel;
diff --git a/src/progs/ingenuity/Configuration.cpp b/src/progs/ingenuity/Configuration.cpp
index 4d2b8e07..d3d7f295 100644
--- a/src/progs/ingenuity/Configuration.cpp
+++ b/src/progs/ingenuity/Configuration.cpp
@@ -21,10 +21,10 @@
#include <iostream>
#include <fstream>
#include <map>
-#include "PortModel.h"
-#include "PluginModel.h"
-#include "PatchModel.h"
-#include "Loader.h"
+#include "client/PortModel.h"
+#include "client/PluginModel.h"
+#include "client/PatchModel.h"
+#include "serialisation/Loader.h"
#include "App.h"
using std::cerr; using std::cout; using std::endl;
diff --git a/src/progs/ingenuity/ConnectWindow.cpp b/src/progs/ingenuity/ConnectWindow.cpp
index 6e5b6c67..322750ea 100644
--- a/src/progs/ingenuity/ConnectWindow.cpp
+++ b/src/progs/ingenuity/ConnectWindow.cpp
@@ -21,25 +21,24 @@
#include <stdlib.h>
#include <sys/time.h>
#include <sys/resource.h>
-#include "raul/Process.h"
+#include <raul/Process.h>
#include "config.h"
-#include "ConnectWindow.h"
#include "interface/ClientKey.h"
-#include "OSCModelEngineInterface.h"
-#include "OSCClientReceiver.h"
-#include "ThreadedSigClientInterface.h"
-#include "Store.h"
-#include "PatchModel.h"
+#include "interface/EngineInterface.h"
+#include "engine/tuning.h"
+#include "engine/Engine.h"
+#include "engine/DirectResponder.h"
+#include "engine/QueuedEngineInterface.h"
+#include "client/OSCClientReceiver.h"
+#include "client/OSCEngineSender.h"
+#include "client/ThreadedSigClientInterface.h"
+#include "client/Store.h"
+#include "client/PatchModel.h"
+#include "module/Module.h"
#include "App.h"
#include "WindowFactory.h"
-#ifdef MONOLITHIC_INGENUITY
- #include "engine/Engine.h"
- #include "engine/JackAudioDriver.h"
- #include "engine/QueuedEngineInterface.h"
- #include "engine/DirectResponder.h"
- #include "engine/tuning.h"
+#include "ConnectWindow.h"
using Ingen::QueuedEngineInterface;
-#endif
using Ingen::Client::ThreadedSigClientInterface;
namespace Ingenuity {
@@ -58,18 +57,6 @@ struct OSCSigEmitter : public OSCClientReceiver, public ThreadedSigClientInterfa
};
-#ifdef MONOLITHIC_INGENUITY
-struct QueuedModelEngineInterface : public QueuedEngineInterface, public ModelEngineInterface {
- QueuedModelEngineInterface(SharedPtr<Ingen::Engine> engine)
- : Ingen::Shared::EngineInterface()
- , Ingen::QueuedEngineInterface(engine, Ingen::event_queue_size, Ingen::event_queue_size)
- {
- QueuedEventSource::start();
- }
-};
-#endif
-
-
// ConnectWindow
@@ -79,6 +66,8 @@ ConnectWindow::ConnectWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::
, _ping_id(-1)
, _attached(false)
, _connect_stage(0)
+ , _new_engine(NULL)
+ , _new_queued_engine_interface(NULL)
{
xml->get_widget("connect_icon", _icon);
xml->get_widget("connect_progress_bar", _progress_bar);
@@ -91,13 +80,29 @@ ConnectWindow::ConnectWindow(BaseObjectType* cobject, const Glib::RefPtr<Gnome::
xml->get_widget("connect_disconnect_button", _disconnect_button);
xml->get_widget("connect_connect_button", _connect_button);
xml->get_widget("connect_quit_button", _quit_button);
-
+
_server_radio->signal_toggled().connect(sigc::mem_fun(this, &ConnectWindow::server_toggled));
_launch_radio->signal_toggled().connect(sigc::mem_fun(this, &ConnectWindow::launch_toggled));
_internal_radio->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::internal_toggled));
_disconnect_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::disconnect));
_connect_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::connect));
_quit_button->signal_clicked().connect(sigc::mem_fun(this, &ConnectWindow::quit));
+
+ _engine_module = Ingen::Shared::load_module("ingen_engine");
+
+ if (!_engine_module) {
+ cerr << "Unable to load ingen_engine module, internal engine unavailable." << endl;
+ cerr << "If you are running from the source tree, run ingenuity_dev." << endl;
+ }
+
+ bool found1 = _engine_module->get_symbol("new_engine", (void*&)_new_engine);
+ bool found2 = _engine_module->get_symbol("new_queued_engine_interface",
+ (void*&)_new_queued_engine_interface);
+
+ if (!found1 || !found2) {
+ cerr << "Unable to find module entry point, internal engine unavailable." << endl;
+ _engine_module.reset();
+ }
}
@@ -121,11 +126,10 @@ ConnectWindow::init()
_disconnect_button->set_sensitive(false);
_port_spinbutton->set_sensitive(false);
_launch_radio->set_sensitive(true);
-#ifdef MONOLITHIC_INGENUITY
- _internal_radio->set_sensitive(true);
-#else
- _internal_radio->set_sensitive(false);
-#endif
+ if (_new_engine)
+ _internal_radio->set_sensitive(true);
+ else
+ _internal_radio->set_sensitive(false);
server_toggled();
_progress_label->set_text(string("Disconnected"));
@@ -151,8 +155,8 @@ ConnectWindow::connect()
_connect_stage = 0;
if (_mode == CONNECT_REMOTE) {
- SharedPtr<ModelEngineInterface> engine(
- new OSCModelEngineInterface(_url_entry->get_text()));
+ SharedPtr<EngineInterface> engine(
+ new OSCEngineSender(_url_entry->get_text()));
OSCSigEmitter* ose = new OSCSigEmitter(1024, 16181); // FIXME: args
SharedPtr<SigClientInterface> client(ose);
@@ -172,8 +176,8 @@ ConnectWindow::connect()
const string cmd = string("ingen --port=").append(port_str);
if (Raul::Process::launch(cmd)) {
- SharedPtr<ModelEngineInterface> engine(
- new OSCModelEngineInterface(string("osc.udp://localhost:").append(port_str)));
+ SharedPtr<EngineInterface> engine(
+ new OSCEngineSender(string("osc.udp://localhost:").append(port_str)));
OSCSigEmitter* ose = new OSCSigEmitter(1024, 16181); // FIXME: args
SharedPtr<SigClientInterface> client(ose);
@@ -189,13 +193,14 @@ ConnectWindow::connect()
cerr << "Failed to launch ingen process." << endl;
}
-#ifdef MONOLITHIC_INGENUITY
} else if (_mode == INTERNAL) {
- SharedPtr<Ingen::Engine> engine(new Ingen::Engine());
- SharedPtr<Ingen::AudioDriver> audio_driver(
- new Ingen::JackAudioDriver(*engine.get()) );
- SharedPtr<QueuedModelEngineInterface> engine_interface(
- new QueuedModelEngineInterface(engine) );
+ assert(_new_engine);
+ SharedPtr<Ingen::Engine> engine(_new_engine());
+ engine->start_jack_driver();
+
+ assert(_new_queued_engine_interface);
+ SharedPtr<Ingen::QueuedEngineInterface> engine_interface(_new_queued_engine_interface(*engine.get()));
+
ThreadedSigClientInterface* tsci = new ThreadedSigClientInterface(Ingen::event_queue_size);
SharedPtr<SigClientInterface> client(tsci);
@@ -203,7 +208,9 @@ ConnectWindow::connect()
engine_interface->set_responder(SharedPtr<Ingen::Responder>(new Ingen::DirectResponder(client, 1)));
- engine->activate(audio_driver, engine_interface);
+ engine->set_event_source(engine_interface);
+
+ engine->activate();
Glib::signal_timeout().connect(
sigc::mem_fun(engine.get(), &Ingen::Engine::main_iteration), 1000);
@@ -213,7 +220,6 @@ ConnectWindow::connect()
Glib::signal_timeout().connect(
sigc::mem_fun(tsci, &ThreadedSigClientInterface::emit_signals), 2, G_PRIORITY_HIGH_IDLE);
-#endif
}
}
diff --git a/src/progs/ingenuity/ConnectWindow.h b/src/progs/ingenuity/ConnectWindow.h
index 7e137066..fb1a012f 100644
--- a/src/progs/ingenuity/ConnectWindow.h
+++ b/src/progs/ingenuity/ConnectWindow.h
@@ -21,10 +21,12 @@
#include <gtkmm.h>
#include <libglademm/xml.h>
#include <libglademm.h>
-#include "raul/SharedPtr.h"
-#include "ThreadedSigClientInterface.h"
+#include <raul/SharedPtr.h>
+#include "client/ThreadedSigClientInterface.h"
using Ingen::Client::SigClientInterface;
+namespace Ingen { class Engine; class QueuedEngineInterface; }
+
namespace Ingenuity {
class App;
@@ -66,6 +68,10 @@ private:
int _connect_stage;
+ SharedPtr<Glib::Module> _engine_module;
+ Ingen::Engine* (*_new_engine)();
+ Ingen::QueuedEngineInterface* (*_new_queued_engine_interface)(Ingen::Engine&);
+
Gtk::Image* _icon;
Gtk::ProgressBar* _progress_bar;
Gtk::Label* _progress_label;
diff --git a/src/progs/ingenuity/Connection.h b/src/progs/ingenuity/Connection.h
index 7e0f3cc5..d7b3a9cc 100644
--- a/src/progs/ingenuity/Connection.h
+++ b/src/progs/ingenuity/Connection.h
@@ -21,8 +21,8 @@
#include <cassert>
#include <string>
#include <flowcanvas/Connection.h>
-#include "ConnectionModel.h"
-#include "raul/SharedPtr.h"
+#include <raul/SharedPtr.h>
+#include "client/ConnectionModel.h"
using Ingen::Client::ConnectionModel;
namespace Ingenuity {
diff --git a/src/progs/ingenuity/ControlGroups.cpp b/src/progs/ingenuity/ControlGroups.cpp
index f775709a..2cdbf0a3 100644
--- a/src/progs/ingenuity/ControlGroups.cpp
+++ b/src/progs/ingenuity/ControlGroups.cpp
@@ -17,12 +17,12 @@
#include <cmath>
#include <iostream>
-#include "ModelEngineInterface.h"
+#include "interface/EngineInterface.h"
+#include "client/PluginModel.h"
+#include "client/NodeModel.h"
+#include "client/PortModel.h"
#include "ControlGroups.h"
#include "ControlPanel.h"
-#include "PluginModel.h"
-#include "NodeModel.h"
-#include "PortModel.h"
#include "PortPropertiesWindow.h"
#include "GladeFactory.h"
#include "App.h"
diff --git a/src/progs/ingenuity/ControlGroups.h b/src/progs/ingenuity/ControlGroups.h
index 020b7bf7..70b8bb72 100644
--- a/src/progs/ingenuity/ControlGroups.h
+++ b/src/progs/ingenuity/ControlGroups.h
@@ -22,8 +22,8 @@
#include <gtkmm.h>
#include <libglademm/xml.h>
#include <libglademm.h>
-#include "PortModel.h"
-#include "raul/SharedPtr.h"
+#include "client/PortModel.h"
+#include <raul/SharedPtr.h>
namespace Ingen { namespace Client { class PortModel; } }
using namespace Ingen::Client;
diff --git a/src/progs/ingenuity/ControlPanel.cpp b/src/progs/ingenuity/ControlPanel.cpp
index fa28f0b2..7e153ba5 100644
--- a/src/progs/ingenuity/ControlPanel.cpp
+++ b/src/progs/ingenuity/ControlPanel.cpp
@@ -15,13 +15,13 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
+#include "client/NodeModel.h"
+#include "client/PortModel.h"
+#include "client/PluginModel.h"
#include "App.h"
-#include "ModelEngineInterface.h"
#include "ControlPanel.h"
-#include "PatchModel.h"
-#include "NodeModel.h"
-#include "PortModel.h"
-#include "PluginModel.h"
#include "ControlGroups.h"
#include "GladeFactory.h"
diff --git a/src/progs/ingenuity/ControlPanel.h b/src/progs/ingenuity/ControlPanel.h
index 309d2e50..f7da37ad 100644
--- a/src/progs/ingenuity/ControlPanel.h
+++ b/src/progs/ingenuity/ControlPanel.h
@@ -18,16 +18,17 @@
#ifndef CONTROLPANEL_H
#define CONTROLPANEL_H
-#include <gtkmm.h>
-#include <sigc++/sigc++.h>
-#include <libglademm/xml.h>
-#include <libglademm.h>
#include <vector>
#include <string>
#include <iostream>
#include <utility> // for pair<>
+#include <sigc++/sigc++.h>
+#include <gtkmm.h>
+#include <libglademm/xml.h>
+#include <libglademm.h>
+#include <raul/Path.h>
#include "ControlGroups.h"
-#include "raul/Path.h"
+
using std::vector; using std::string; using std::pair;
using std::cerr; using std::cout; using std::endl;
diff --git a/src/progs/ingenuity/DSSIController.cpp b/src/progs/ingenuity/DSSIController.cpp
index 811d6f1a..01ef96c4 100644
--- a/src/progs/ingenuity/DSSIController.cpp
+++ b/src/progs/ingenuity/DSSIController.cpp
@@ -21,10 +21,10 @@
#include <dirent.h>
#include <unistd.h>
#include <sys/stat.h>
+#include "interface/EngineInterface.h"
+#include "client/NodeModel.h"
#include "App.h"
-#include "NodeModel.h"
#include "DSSIModule.h"
-#include "ModelEngineInterface.h"
namespace Ingenuity {
diff --git a/src/progs/ingenuity/DSSIController.h b/src/progs/ingenuity/DSSIController.h
index 78ae3a35..3d5922c9 100644
--- a/src/progs/ingenuity/DSSIController.h
+++ b/src/progs/ingenuity/DSSIController.h
@@ -20,8 +20,8 @@
#include <string>
#include <gtkmm.h>
-#include "raul/Path.h"
-#include "NodeModel.h"
+#include <raul/Path.h>
+#include "client/NodeModel.h"
using std::string;
using namespace Ingen::Client;
diff --git a/src/progs/ingenuity/LoadPatchWindow.cpp b/src/progs/ingenuity/LoadPatchWindow.cpp
index cc7ff7bd..70d5c409 100644
--- a/src/progs/ingenuity/LoadPatchWindow.cpp
+++ b/src/progs/ingenuity/LoadPatchWindow.cpp
@@ -19,10 +19,10 @@
#include <sys/types.h>
#include <dirent.h>
#include <boost/optional/optional.hpp>
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
#include "App.h"
#include "Configuration.h"
-#include "PatchModel.h"
-#include "ModelEngineInterface.h"
#include "ThreadedLoader.h"
using namespace Ingen::Serialisation;
diff --git a/src/progs/ingenuity/LoadPatchWindow.h b/src/progs/ingenuity/LoadPatchWindow.h
index 3ac3d137..7f17cef7 100644
--- a/src/progs/ingenuity/LoadPatchWindow.h
+++ b/src/progs/ingenuity/LoadPatchWindow.h
@@ -18,12 +18,11 @@
#ifndef LOADPATCHWINDOW_H
#define LOADPATCHWINDOW_H
-#include "PluginModel.h"
-
#include <libglademm/xml.h>
#include <gtkmm.h>
-#include "raul/SharedPtr.h"
-#include "PatchModel.h"
+#include <raul/SharedPtr.h>
+#include "client/PluginModel.h"
+#include "client/PatchModel.h"
using Ingen::Client::PatchModel;
using Ingen::Client::MetadataMap;
diff --git a/src/progs/ingenuity/LoadPluginWindow.cpp b/src/progs/ingenuity/LoadPluginWindow.cpp
index d0311446..5d314db2 100644
--- a/src/progs/ingenuity/LoadPluginWindow.cpp
+++ b/src/progs/ingenuity/LoadPluginWindow.cpp
@@ -15,17 +15,17 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "LoadPluginWindow.h"
#include <iostream>
#include <cassert>
#include <algorithm>
#include <cctype>
-#include "NodeModel.h"
+#include "interface/EngineInterface.h"
+#include "client/NodeModel.h"
+#include "client/PatchModel.h"
+#include "client/Store.h"
#include "App.h"
+#include "LoadPluginWindow.h"
#include "PatchWindow.h"
-#include "PatchModel.h"
-#include "Store.h"
-#include "ModelEngineInterface.h"
#include "PatchView.h"
#include "PatchCanvas.h"
using std::cout; using std::cerr; using std::endl;
@@ -341,7 +341,9 @@ LoadPluginWindow::add_clicked()
dialog.run();
} else {
Path path = _patch->path().base() + Path::nameify(name);
- App::instance().engine()->create_node_with_data(plugin->uri(), path, polyphonic, _initial_data);
+ App::instance().engine()->create_node(plugin->uri(), path, polyphonic);
+ for (MetadataMap::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i)
+ App::instance().engine()->set_metadata(path, i->first, i->second);
++_plugin_name_offset;
_node_name_entry->set_text(generate_module_name(_plugin_name_offset));
diff --git a/src/progs/ingenuity/LoadPluginWindow.h b/src/progs/ingenuity/LoadPluginWindow.h
index 39329f0e..7bfb63e1 100644
--- a/src/progs/ingenuity/LoadPluginWindow.h
+++ b/src/progs/ingenuity/LoadPluginWindow.h
@@ -19,13 +19,13 @@
#ifndef LOADPLUGINWINDOW_H
#define LOADPLUGINWINDOW_H
-#include "PluginModel.h"
#include <map>
#include <libglademm/xml.h>
#include <libglademm.h>
#include <gtkmm.h>
-#include "raul/SharedPtr.h"
-#include "PatchModel.h"
+#include <raul/SharedPtr.h>
+#include "client/PatchModel.h"
+#include "client/PluginModel.h"
using Ingen::Client::PluginModel;
using Ingen::Client::PatchModel;
using Ingen::Client::MetadataMap;
diff --git a/src/progs/ingenuity/LoadRemotePatchWindow.cpp b/src/progs/ingenuity/LoadRemotePatchWindow.cpp
index d1aa0db3..f42c0849 100644
--- a/src/progs/ingenuity/LoadRemotePatchWindow.cpp
+++ b/src/progs/ingenuity/LoadRemotePatchWindow.cpp
@@ -19,11 +19,11 @@
#include <sys/types.h>
#include <dirent.h>
#include <boost/optional/optional.hpp>
-#include "raul/RDFQuery.h"
+#include <raul/RDFQuery.h>
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
#include "App.h"
#include "Configuration.h"
-#include "PatchModel.h"
-#include "ModelEngineInterface.h"
#include "ThreadedLoader.h"
using boost::optional;
diff --git a/src/progs/ingenuity/LoadRemotePatchWindow.h b/src/progs/ingenuity/LoadRemotePatchWindow.h
index 5c399888..5a9de63a 100644
--- a/src/progs/ingenuity/LoadRemotePatchWindow.h
+++ b/src/progs/ingenuity/LoadRemotePatchWindow.h
@@ -18,12 +18,11 @@
#ifndef LOADREMOTEPATCHWINDOW_H
#define LOADREMOTEPATCHWINDOW_H
-#include "PluginModel.h"
-
#include <libglademm/xml.h>
#include <gtkmm.h>
-#include "raul/SharedPtr.h"
-#include "PatchModel.h"
+#include <raul/SharedPtr.h>
+#include "client/PatchModel.h"
+#include "client/PluginModel.h"
using Ingen::Client::PatchModel;
using Ingen::Client::MetadataMap;
diff --git a/src/progs/ingenuity/LoadSubpatchWindow.cpp b/src/progs/ingenuity/LoadSubpatchWindow.cpp
index 37648ca8..d1f4b953 100644
--- a/src/progs/ingenuity/LoadSubpatchWindow.cpp
+++ b/src/progs/ingenuity/LoadSubpatchWindow.cpp
@@ -15,17 +15,17 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "LoadSubpatchWindow.h"
#include <sys/types.h>
#include <dirent.h>
#include <cassert>
#include <boost/optional.hpp>
+#include "interface/EngineInterface.h"
+#include "client/NodeModel.h"
+#include "client/PatchModel.h"
#include "App.h"
+#include "LoadSubpatchWindow.h"
#include "PatchView.h"
-#include "NodeModel.h"
-#include "PatchModel.h"
#include "Configuration.h"
-#include "ModelEngineInterface.h"
#include "ThreadedLoader.h"
using boost::optional;
diff --git a/src/progs/ingenuity/LoadSubpatchWindow.h b/src/progs/ingenuity/LoadSubpatchWindow.h
index 6580bce1..54693504 100644
--- a/src/progs/ingenuity/LoadSubpatchWindow.h
+++ b/src/progs/ingenuity/LoadSubpatchWindow.h
@@ -18,11 +18,11 @@
#ifndef LOADSUBPATCHWINDOW_H
#define LOADSUBPATCHWINDOW_H
-#include "PluginModel.h"
#include <libglademm/xml.h>
#include <gtkmm.h>
-#include "raul/SharedPtr.h"
-#include "PatchModel.h"
+#include <raul/SharedPtr.h>
+#include "client/PatchModel.h"
+#include "client/PluginModel.h"
using Ingen::Client::PatchModel;
using Ingen::Client::MetadataMap;
diff --git a/src/progs/ingenuity/Makefile.am b/src/progs/ingenuity/Makefile.am
index 07420b48..82d96b15 100644
--- a/src/progs/ingenuity/Makefile.am
+++ b/src/progs/ingenuity/Makefile.am
@@ -1,6 +1,6 @@
if BUILD_GTK_CLIENT
-EXTRA_DIST = ingenuity.gladep
+EXTRA_DIST = ingenuity.gladep ingenuity_dev
MAINTAINERCLEANFILES = Makefile.in
sharefilesdir = $(pkgdatadir)
@@ -12,16 +12,9 @@ dist_desktopfiles_DATA = ingenuity.desktop
globalpixmapsdir = $(datadir)/pixmaps
dist_globalpixmaps_DATA = ingen.svg
-ingenuity_CXXFLAGS = -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -I$(top_srcdir)/src/common -I$(top_srcdir)/src/libs/client -DPKGDATADIR=\"$(pkgdatadir)\" @RAUL_CFLAGS@ @GTKMM_CFLAGS@ @LIBGLADEMM_CFLAGS@ @GNOMECANVASMM_CFLAGS@ @LOSC_CFLAGS@ @LASH_CFLAGS@ @FLOWCANVAS_CFLAGS@ @SLV2_CFLAGS@ @CURL_CFLAGS@
-ingenuity_LDADD = @RAUL_LIBS@ @GTKMM_LIBS@ @LIBGLADEMM_LIBS@ @GNOMECANVASMM_LIBS@ @LOSC_LIBS@ @LASH_LIBS@ @FLOWCANVAS_LIBS@ @SLV2_LIBS@ @CURL_LIBS@ ../../libs/client/libingenclient.la
-ingenuity_DEPENDENCIES = ../../libs/client/libingenclient.la
-
-# FIXME: make engine have a separate include dir
-if MONOLITHIC_INGENUITY
-ingenuity_CXXFLAGS += -I$(top_srcdir)/src/libs
-ingenuity_LDADD += ../../libs/engine/libingen.la
-ingenuity_DEPENDENCIES += ../../libs/engine/libingen.la
-endif
+ingenuity_CXXFLAGS = -DGTK_DISABLE_DEPRECATED -DGDK_DISABLE_DEPRECATED -I$(top_srcdir)/src/common -I$(top_srcdir)/src/libs -DPKGDATADIR=\"$(pkgdatadir)\" @RAUL_CFLAGS@ @GTKMM_CFLAGS@ @LIBGLADEMM_CFLAGS@ @GNOMECANVASMM_CFLAGS@ @LOSC_CFLAGS@ @LASH_CFLAGS@ @FLOWCANVAS_CFLAGS@ @SLV2_CFLAGS@ @CURL_CFLAGS@ -DINGEN_MODULE_DIR=\"$(libdir)/ingen\"
+ingenuity_LDADD = @RAUL_LIBS@ @GTKMM_LIBS@ @LIBGLADEMM_LIBS@ @GNOMECANVASMM_LIBS@ @LOSC_LIBS@ @LASH_LIBS@ @FLOWCANVAS_LIBS@ @SLV2_LIBS@ @CURL_LIBS@ ../../libs/client/libingen_client.la ../../libs/module/libingen_module.la
+ingenuity_DEPENDENCIES = ../../libs/client/libingen_client.la ../../libs/module/libingen_module.la
bin_PROGRAMS = ingenuity
ingenuity_SOURCES = \
diff --git a/src/progs/ingenuity/NewSubpatchWindow.cpp b/src/progs/ingenuity/NewSubpatchWindow.cpp
index b30003e7..e49340b8 100644
--- a/src/progs/ingenuity/NewSubpatchWindow.cpp
+++ b/src/progs/ingenuity/NewSubpatchWindow.cpp
@@ -16,10 +16,10 @@
*/
#include "App.h"
-#include "ModelEngineInterface.h"
+#include "interface/EngineInterface.h"
+#include "client/NodeModel.h"
+#include "client/PatchModel.h"
#include "NewSubpatchWindow.h"
-#include "NodeModel.h"
-#include "PatchModel.h"
#include "PatchView.h"
namespace Ingenuity {
@@ -89,7 +89,10 @@ NewSubpatchWindow::ok_clicked()
const Path path = _patch->path().base() + Path::nameify(_name_entry->get_text());
const size_t poly = _poly_spinbutton->get_value_as_int();
- App::instance().engine()->create_patch_with_data(path, poly, _initial_data);
+ App::instance().engine()->create_patch(path, poly);
+ for (MetadataMap::const_iterator i = _initial_data.begin(); i != _initial_data.end(); ++i)
+ App::instance().engine()->set_metadata(path, i->first, i->second);
+
App::instance().engine()->enable_patch(path);
hide();
diff --git a/src/progs/ingenuity/NewSubpatchWindow.h b/src/progs/ingenuity/NewSubpatchWindow.h
index 554005fa..28730137 100644
--- a/src/progs/ingenuity/NewSubpatchWindow.h
+++ b/src/progs/ingenuity/NewSubpatchWindow.h
@@ -18,11 +18,11 @@
#ifndef NEWSUBPATCHWINDOW_H
#define NEWSUBPATCHWINDOW_H
-#include "PluginModel.h"
#include <libglademm/xml.h>
#include <gtkmm.h>
-#include "raul/SharedPtr.h"
-#include "PatchModel.h"
+#include <raul/SharedPtr.h>
+#include "client/PatchModel.h"
+#include "client/PluginModel.h"
using Ingen::Client::PatchModel;
using Ingen::Client::MetadataMap;
diff --git a/src/progs/ingenuity/NodeControlWindow.cpp b/src/progs/ingenuity/NodeControlWindow.cpp
index 49578c1d..8d324a65 100644
--- a/src/progs/ingenuity/NodeControlWindow.cpp
+++ b/src/progs/ingenuity/NodeControlWindow.cpp
@@ -15,17 +15,18 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <iostream>
+#include <cmath>
+#include "interface/EngineInterface.h"
+#include "client/NodeModel.h"
#include "App.h"
-#include "ModelEngineInterface.h"
#include "NodeControlWindow.h"
#include "GladeFactory.h"
-#include "NodeModel.h"
#include "ControlGroups.h"
#include "ControlPanel.h"
#include "PatchWindow.h"
-#include <iostream>
-#include <cmath>
-using std::cerr; using std::cout; using std::endl;
+
+using namespace std;
namespace Ingenuity {
diff --git a/src/progs/ingenuity/NodeControlWindow.h b/src/progs/ingenuity/NodeControlWindow.h
index ab3e7e85..62ab497d 100644
--- a/src/progs/ingenuity/NodeControlWindow.h
+++ b/src/progs/ingenuity/NodeControlWindow.h
@@ -23,7 +23,7 @@
#include <gtkmm.h>
#include <libglademm.h>
#include <sigc++/sigc++.h>
-#include "raul/SharedPtr.h"
+#include <raul/SharedPtr.h>
using std::string; using std::vector;
namespace Ingen { namespace Client {
diff --git a/src/progs/ingenuity/NodeMenu.cpp b/src/progs/ingenuity/NodeMenu.cpp
index d8a64184..a0efe441 100644
--- a/src/progs/ingenuity/NodeMenu.cpp
+++ b/src/progs/ingenuity/NodeMenu.cpp
@@ -17,10 +17,10 @@
#include <iostream>
#include <gtkmm.h>
-#include "NodeMenu.h"
-#include "NodeModel.h"
+#include "interface/EngineInterface.h"
+#include "client/NodeModel.h"
#include "App.h"
-#include "ModelEngineInterface.h"
+#include "NodeMenu.h"
#include "WindowFactory.h"
using std::cerr; using std::endl;
diff --git a/src/progs/ingenuity/NodeMenu.h b/src/progs/ingenuity/NodeMenu.h
index 23e7c890..d6f598ad 100644
--- a/src/progs/ingenuity/NodeMenu.h
+++ b/src/progs/ingenuity/NodeMenu.h
@@ -20,9 +20,9 @@
#include <string>
#include <gtkmm.h>
-#include "raul/Path.h"
-#include "raul/SharedPtr.h"
-#include "NodeModel.h"
+#include <raul/Path.h>
+#include <raul/SharedPtr.h>
+#include "client/NodeModel.h"
using Ingen::Client::NodeModel;
using std::string;
diff --git a/src/progs/ingenuity/NodeModule.cpp b/src/progs/ingenuity/NodeModule.cpp
index c927114d..dd03fde8 100644
--- a/src/progs/ingenuity/NodeModule.cpp
+++ b/src/progs/ingenuity/NodeModule.cpp
@@ -15,14 +15,14 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "NodeModule.h"
#include <cassert>
-#include "raul/Atom.h"
+#include <raul/Atom.h>
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
+#include "client/NodeModel.h"
#include "App.h"
-#include "ModelEngineInterface.h"
+#include "NodeModule.h"
#include "PatchCanvas.h"
-#include "PatchModel.h"
-#include "NodeModel.h"
#include "Port.h"
#include "GladeFactory.h"
#include "RenameWindow.h"
diff --git a/src/progs/ingenuity/NodeModule.h b/src/progs/ingenuity/NodeModule.h
index 77829e93..d87bcfcc 100644
--- a/src/progs/ingenuity/NodeModule.h
+++ b/src/progs/ingenuity/NodeModule.h
@@ -20,7 +20,7 @@
#include <string>
#include <libgnomecanvasmm.h>
#include <flowcanvas/Module.h>
-#include "raul/SharedPtr.h"
+#include <raul/SharedPtr.h>
#include "Port.h"
#include "NodeMenu.h"
using std::string;
diff --git a/src/progs/ingenuity/NodePropertiesWindow.cpp b/src/progs/ingenuity/NodePropertiesWindow.cpp
index 87e09c99..428119a3 100644
--- a/src/progs/ingenuity/NodePropertiesWindow.cpp
+++ b/src/progs/ingenuity/NodePropertiesWindow.cpp
@@ -15,11 +15,11 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "NodePropertiesWindow.h"
#include <cassert>
#include <string>
-#include "NodeModel.h"
-#include "PluginModel.h"
+#include "client/NodeModel.h"
+#include "client/PluginModel.h"
+#include "NodePropertiesWindow.h"
namespace Ingenuity {
using std::string;
diff --git a/src/progs/ingenuity/NodePropertiesWindow.h b/src/progs/ingenuity/NodePropertiesWindow.h
index b6d90062..eae9bfdc 100644
--- a/src/progs/ingenuity/NodePropertiesWindow.h
+++ b/src/progs/ingenuity/NodePropertiesWindow.h
@@ -20,8 +20,8 @@
#include <gtkmm.h>
#include <libglademm.h>
-#include "raul/SharedPtr.h"
-#include "NodeModel.h"
+#include <raul/SharedPtr.h>
+#include "client/NodeModel.h"
using namespace Ingen::Client;
namespace Ingenuity {
diff --git a/src/progs/ingenuity/PatchCanvas.cpp b/src/progs/ingenuity/PatchCanvas.cpp
index 38fd0d87..e6397a3d 100644
--- a/src/progs/ingenuity/PatchCanvas.cpp
+++ b/src/progs/ingenuity/PatchCanvas.cpp
@@ -15,12 +15,16 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "PatchCanvas.h"
#include <cassert>
#include <flowcanvas/FlowCanvas.h>
+#include "interface/EngineInterface.h"
+#include "client/PluginModel.h"
+#include "client/PatchModel.h"
+#include "client/NodeModel.h"
+#include "client/Store.h"
+#include "client/Serializer.h"
#include "App.h"
-#include "ModelEngineInterface.h"
-#include "PatchModel.h"
+#include "PatchCanvas.h"
#include "PatchWindow.h"
#include "PatchPortModule.h"
#include "LoadPluginWindow.h"
@@ -28,14 +32,10 @@
#include "NewSubpatchWindow.h"
#include "Port.h"
#include "Connection.h"
-#include "NodeModel.h"
#include "NodeModule.h"
#include "SubpatchModule.h"
#include "GladeFactory.h"
#include "WindowFactory.h"
-#include "Serializer.h"
-#include "Store.h"
-#include "PluginModel.h"
#include "config.h"
using Ingen::Client::Store;
using Ingen::Client::Serializer;
@@ -456,7 +456,10 @@ void
PatchCanvas::menu_add_port(const string& name, const string& type, bool is_output)
{
const Path& path = _patch->path().base() + generate_port_name(name);
- App::instance().engine()->create_port_with_data(path, type, is_output, get_initial_data());
+ App::instance().engine()->create_port(path, type, is_output);
+ MetadataMap data = get_initial_data();
+ for (MetadataMap::const_iterator i = data.begin(); i != data.end(); ++i)
+ App::instance().engine()->set_metadata(path, i->first, i->second);
}
@@ -465,7 +468,10 @@ PatchCanvas::load_plugin(SharedPtr<PluginModel> plugin)
{
const Path& path = _patch->path().base() + plugin->default_node_name(_patch);
// FIXME: polyphony?
- App::instance().engine()->create_node_with_data(plugin->uri(), path, false, get_initial_data());
+ App::instance().engine()->create_node(plugin->uri(), path, false);
+ MetadataMap data = get_initial_data();
+ for (MetadataMap::const_iterator i = data.begin(); i != data.end(); ++i)
+ App::instance().engine()->set_metadata(path, i->first, i->second);
}
diff --git a/src/progs/ingenuity/PatchCanvas.h b/src/progs/ingenuity/PatchCanvas.h
index b36bd115..297e9874 100644
--- a/src/progs/ingenuity/PatchCanvas.h
+++ b/src/progs/ingenuity/PatchCanvas.h
@@ -25,8 +25,8 @@
#include <flowcanvas/Module.h>
#include <raul/SharedPtr.h>
#include <raul/Path.h>
-#include "ConnectionModel.h"
-#include "PatchModel.h"
+#include "client/ConnectionModel.h"
+#include "client/PatchModel.h"
#include "NodeModule.h"
using std::string;
diff --git a/src/progs/ingenuity/PatchPortModule.cpp b/src/progs/ingenuity/PatchPortModule.cpp
index 048d0ee7..08e7dbbd 100644
--- a/src/progs/ingenuity/PatchPortModule.cpp
+++ b/src/progs/ingenuity/PatchPortModule.cpp
@@ -17,11 +17,11 @@
#include "PatchPortModule.h"
#include <cassert>
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
+#include "client/NodeModel.h"
#include "App.h"
-#include "ModelEngineInterface.h"
#include "PatchCanvas.h"
-#include "PatchModel.h"
-#include "NodeModel.h"
#include "Port.h"
#include "GladeFactory.h"
#include "RenameWindow.h"
diff --git a/src/progs/ingenuity/PatchPortModule.h b/src/progs/ingenuity/PatchPortModule.h
index 21455089..f42b7592 100644
--- a/src/progs/ingenuity/PatchPortModule.h
+++ b/src/progs/ingenuity/PatchPortModule.h
@@ -22,7 +22,7 @@
#include <boost/enable_shared_from_this.hpp>
#include <libgnomecanvasmm.h>
#include <flowcanvas/Module.h>
-#include "raul/Atom.h"
+#include <raul/Atom.h>
#include "Port.h"
using std::string;
diff --git a/src/progs/ingenuity/PatchPropertiesWindow.cpp b/src/progs/ingenuity/PatchPropertiesWindow.cpp
index 33afd1fb..17b28d34 100644
--- a/src/progs/ingenuity/PatchPropertiesWindow.cpp
+++ b/src/progs/ingenuity/PatchPropertiesWindow.cpp
@@ -15,9 +15,9 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "PatchPropertiesWindow.h"
#include <string>
-#include "PatchModel.h"
+#include "client/PatchModel.h"
+#include "PatchPropertiesWindow.h"
namespace Ingenuity {
using std::string;
diff --git a/src/progs/ingenuity/PatchPropertiesWindow.h b/src/progs/ingenuity/PatchPropertiesWindow.h
index f5dc3b79..8e461381 100644
--- a/src/progs/ingenuity/PatchPropertiesWindow.h
+++ b/src/progs/ingenuity/PatchPropertiesWindow.h
@@ -21,7 +21,7 @@
#include <string>
#include <gtkmm.h>
#include <libglademm/xml.h>
-#include "raul/SharedPtr.h"
+#include <raul/SharedPtr.h>
using std::string;
namespace Ingen { namespace Client { class PatchModel; } }
diff --git a/src/progs/ingenuity/PatchTreeWindow.cpp b/src/progs/ingenuity/PatchTreeWindow.cpp
index 5f17a774..77caf6dd 100644
--- a/src/progs/ingenuity/PatchTreeWindow.cpp
+++ b/src/progs/ingenuity/PatchTreeWindow.cpp
@@ -15,16 +15,15 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
+#include <raul/Path.h>
+#include "interface/EngineInterface.h"
+#include "client/OSCEngineSender.h"
+#include "client/Store.h"
+#include "client/PatchModel.h"
#include "App.h"
-#include "ModelEngineInterface.h"
-#include "OSCEngineSender.h"
#include "PatchTreeWindow.h"
-#include "PatchWindow.h"
-#include "Store.h"
#include "SubpatchModule.h"
-#include "PatchModel.h"
#include "WindowFactory.h"
-#include "raul/Path.h"
namespace Ingenuity {
diff --git a/src/progs/ingenuity/PatchTreeWindow.h b/src/progs/ingenuity/PatchTreeWindow.h
index 00dcf25c..c7fc3c10 100644
--- a/src/progs/ingenuity/PatchTreeWindow.h
+++ b/src/progs/ingenuity/PatchTreeWindow.h
@@ -20,7 +20,7 @@
#include <gtkmm.h>
#include <libglademm.h>
-#include "raul/Path.h"
+#include <raul/Path.h>
namespace Ingen { namespace Client {
class Store;
diff --git a/src/progs/ingenuity/PatchView.cpp b/src/progs/ingenuity/PatchView.cpp
index aafe798a..076eaa40 100644
--- a/src/progs/ingenuity/PatchView.cpp
+++ b/src/progs/ingenuity/PatchView.cpp
@@ -15,15 +15,15 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "PatchView.h"
#include <iostream>
#include <cassert>
#include <fstream>
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
#include "App.h"
-#include "ModelEngineInterface.h"
+#include "PatchView.h"
#include "PatchCanvas.h"
#include "LoadPluginWindow.h"
-#include "PatchModel.h"
#include "NewSubpatchWindow.h"
#include "LoadSubpatchWindow.h"
#include "NodeControlWindow.h"
diff --git a/src/progs/ingenuity/PatchView.h b/src/progs/ingenuity/PatchView.h
index 3ea52932..95683251 100644
--- a/src/progs/ingenuity/PatchView.h
+++ b/src/progs/ingenuity/PatchView.h
@@ -22,8 +22,8 @@
#include <gtkmm.h>
#include <libglademm/xml.h>
#include <libglademm.h>
-#include "raul/SharedPtr.h"
-#include "PatchModel.h"
+#include <raul/SharedPtr.h>
+#include "client/PatchModel.h"
using std::string;
diff --git a/src/progs/ingenuity/PatchWindow.cpp b/src/progs/ingenuity/PatchWindow.cpp
index 606674bb..2e764ff0 100644
--- a/src/progs/ingenuity/PatchWindow.cpp
+++ b/src/progs/ingenuity/PatchWindow.cpp
@@ -19,11 +19,12 @@
#include <iostream>
#include <cassert>
#include <fstream>
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
+#include "client/Store.h"
#include "App.h"
-#include "ModelEngineInterface.h"
#include "PatchCanvas.h"
#include "LoadPluginWindow.h"
-#include "PatchModel.h"
#include "NewSubpatchWindow.h"
#include "LoadPatchWindow.h"
#include "LoadSubpatchWindow.h"
@@ -33,7 +34,6 @@
#include "MessagesWindow.h"
#include "PatchTreeWindow.h"
#include "BreadCrumbBox.h"
-#include "Store.h"
#include "ConnectWindow.h"
#include "ThreadedLoader.h"
#include "WindowFactory.h"
diff --git a/src/progs/ingenuity/PatchWindow.h b/src/progs/ingenuity/PatchWindow.h
index a5ce150d..f4399a20 100644
--- a/src/progs/ingenuity/PatchWindow.h
+++ b/src/progs/ingenuity/PatchWindow.h
@@ -23,9 +23,9 @@
#include <gtkmm.h>
#include <libglademm/xml.h>
#include <libglademm.h>
-#include "raul/Path.h"
-#include "raul/SharedPtr.h"
-#include "PatchModel.h"
+#include <raul/Path.h>
+#include <raul/SharedPtr.h>
+#include "client/PatchModel.h"
#include "PatchView.h"
using Ingen::Client::PatchModel;
diff --git a/src/progs/ingenuity/Port.cpp b/src/progs/ingenuity/Port.cpp
index 4c27c3b1..b13ccda9 100644
--- a/src/progs/ingenuity/Port.cpp
+++ b/src/progs/ingenuity/Port.cpp
@@ -15,15 +15,15 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "Port.h"
#include <cassert>
#include <iostream>
-#include "PatchModel.h"
-#include "PortModel.h"
-#include "ControlModel.h"
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
+#include "client/PortModel.h"
+#include "client/ControlModel.h"
#include "Configuration.h"
-#include "ModelEngineInterface.h"
#include "App.h"
+#include "Port.h"
using std::cerr; using std::endl;
using namespace Ingen::Client;
diff --git a/src/progs/ingenuity/Port.h b/src/progs/ingenuity/Port.h
index 78950040..b006ba45 100644
--- a/src/progs/ingenuity/Port.h
+++ b/src/progs/ingenuity/Port.h
@@ -21,7 +21,7 @@
#include <cassert>
#include <string>
#include <flowcanvas/Port.h>
-#include "raul/SharedPtr.h"
+#include <raul/SharedPtr.h>
namespace Ingen { namespace Client { class PortModel; } }
using Ingen::Client::PortModel;
diff --git a/src/progs/ingenuity/PortPropertiesWindow.cpp b/src/progs/ingenuity/PortPropertiesWindow.cpp
index 3a490a74..eb23c542 100644
--- a/src/progs/ingenuity/PortPropertiesWindow.cpp
+++ b/src/progs/ingenuity/PortPropertiesWindow.cpp
@@ -15,14 +15,14 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "PortPropertiesWindow.h"
#include <cassert>
#include <string>
-#include "NodeModel.h"
-#include "PluginModel.h"
-#include "ModelEngineInterface.h"
-#include "ControlGroups.h"
+#include "interface/EngineInterface.h"
+#include "client/NodeModel.h"
+#include "client/PluginModel.h"
#include "App.h"
+#include "ControlGroups.h"
+#include "PortPropertiesWindow.h"
using std::string;
diff --git a/src/progs/ingenuity/PortPropertiesWindow.h b/src/progs/ingenuity/PortPropertiesWindow.h
index cd22cb09..adb0a2f0 100644
--- a/src/progs/ingenuity/PortPropertiesWindow.h
+++ b/src/progs/ingenuity/PortPropertiesWindow.h
@@ -20,8 +20,8 @@
#include <gtkmm.h>
#include <libglademm.h>
-#include "raul/SharedPtr.h"
-#include "PortModel.h"
+#include <raul/SharedPtr.h>
+#include "client/PortModel.h"
using namespace Ingen::Client;
namespace Ingenuity {
diff --git a/src/progs/ingenuity/RenameWindow.cpp b/src/progs/ingenuity/RenameWindow.cpp
index c2dca012..28a8ddfe 100644
--- a/src/progs/ingenuity/RenameWindow.cpp
+++ b/src/progs/ingenuity/RenameWindow.cpp
@@ -15,13 +15,14 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "RenameWindow.h"
#include <cassert>
#include <string>
-#include "ObjectModel.h"
-#include "Store.h"
+#include "interface/EngineInterface.h"
+#include "client/ObjectModel.h"
+#include "client/Store.h"
#include "App.h"
-#include "ModelEngineInterface.h"
+#include "RenameWindow.h"
+
using std::string;
namespace Ingenuity {
diff --git a/src/progs/ingenuity/RenameWindow.h b/src/progs/ingenuity/RenameWindow.h
index 11adbff8..04f765d4 100644
--- a/src/progs/ingenuity/RenameWindow.h
+++ b/src/progs/ingenuity/RenameWindow.h
@@ -20,8 +20,8 @@
#include <gtkmm.h>
#include <libglademm.h>
-#include "raul/SharedPtr.h"
-#include "ObjectModel.h"
+#include <raul/SharedPtr.h>
+#include "client/ObjectModel.h"
using Ingen::Client::ObjectModel;
namespace Ingenuity {
diff --git a/src/progs/ingenuity/SubpatchModule.cpp b/src/progs/ingenuity/SubpatchModule.cpp
index ec4d7fd9..53958375 100644
--- a/src/progs/ingenuity/SubpatchModule.cpp
+++ b/src/progs/ingenuity/SubpatchModule.cpp
@@ -18,11 +18,11 @@
#include "SubpatchModule.h"
#include <cassert>
#include <iostream>
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
#include "App.h"
-#include "ModelEngineInterface.h"
#include "NodeModule.h"
#include "NodeControlWindow.h"
-#include "PatchModel.h"
#include "PatchWindow.h"
#include "PatchCanvas.h"
#include "Port.h"
diff --git a/src/progs/ingenuity/SubpatchModule.h b/src/progs/ingenuity/SubpatchModule.h
index 4bf33431..36e9a2d3 100644
--- a/src/progs/ingenuity/SubpatchModule.h
+++ b/src/progs/ingenuity/SubpatchModule.h
@@ -21,10 +21,10 @@
#include <string>
#include <libgnomecanvasmm.h>
-#include "NodeModule.h"
-#include "raul/SharedPtr.h"
-#include "PatchModel.h"
+#include <raul/SharedPtr.h>
+#include "client/PatchModel.h"
#include "PatchPortModule.h"
+#include "NodeModule.h"
using std::string; using std::list;
namespace Ingen { namespace Client {
diff --git a/src/progs/ingenuity/ThreadedLoader.cpp b/src/progs/ingenuity/ThreadedLoader.cpp
index bf195dce..43bc76c8 100644
--- a/src/progs/ingenuity/ThreadedLoader.cpp
+++ b/src/progs/ingenuity/ThreadedLoader.cpp
@@ -15,24 +15,38 @@
* 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#include "ThreadedLoader.h"
#include <fstream>
#include <cassert>
#include <string>
-#include "PatchModel.h"
+#include "client/PatchModel.h"
+#include "module/Module.h"
#include "App.h"
+#include "ThreadedLoader.h"
using std::cout; using std::endl;
namespace Ingenuity {
-ThreadedLoader::ThreadedLoader(SharedPtr<ModelEngineInterface> engine)
- : _engine(engine)
+ThreadedLoader::ThreadedLoader(SharedPtr<EngineInterface> engine)
+ : _serialisation_module(Ingen::Shared::load_module("ingen_serialisation"))
+ , _engine(engine)
, _deprecated_loader(engine)
, _serializer(*App::instance().rdf_world())
{
// FIXME: rework this so the thread is only present when it's doing something (save mem)
- start();
+ if (_serialisation_module) {
+ Loader* (*new_loader)() = NULL;
+ bool found = _serialisation_module->get_symbol("new_loader", (void*&)new_loader);
+ if (found)
+ _loader = SharedPtr<Loader>(new_loader());
+ }
+
+ if (_loader) {
+ start();
+ } else {
+ cerr << "WARNING: Failed to load ingen_serialisation module, unable to load patches." << endl;;
+ cerr << "If you are running from the source tree, run ingenuity_dev." << endl;
+ }
}
@@ -78,7 +92,7 @@ ThreadedLoader::load_patch(bool merge,
false)));
} else {
_events.push_back(sigc::hide_return(sigc::bind(
- sigc::ptr_fun(&Ingen::Serialisation::load),
+ sigc::mem_fun(_loader.get(), &Ingen::Serialisation::Loader::load),
App::instance().engine(),
App::instance().rdf_world(),
data_base_uri,
diff --git a/src/progs/ingenuity/ThreadedLoader.h b/src/progs/ingenuity/ThreadedLoader.h
index bf2c2ed5..1846cece 100644
--- a/src/progs/ingenuity/ThreadedLoader.h
+++ b/src/progs/ingenuity/ThreadedLoader.h
@@ -26,16 +26,17 @@
#include <raul/Slave.h>
#include <raul/Mutex.h>
#include <raul/Condition.h>
-#include "ModelEngineInterface.h"
-#include "Serializer.h"
-#include "DeprecatedLoader.h"
-#include "Loader.h"
-#include "PatchModel.h"
+#include "interface/EngineInterface.h"
+#include "client/PatchModel.h"
+#include "client/Serializer.h"
+#include "client/DeprecatedLoader.h"
+#include "serialisation/Loader.h"
using std::string;
using std::list;
using boost::optional;
using namespace Ingen::Client;
+using namespace Ingen::Serialisation;
namespace Ingenuity {
@@ -54,7 +55,7 @@ namespace Ingenuity {
class ThreadedLoader : public Raul::Slave
{
public:
- ThreadedLoader(SharedPtr<ModelEngineInterface> engine);
+ ThreadedLoader(SharedPtr<EngineInterface> engine);
~ThreadedLoader();
// FIXME: there's a pattern here....
@@ -79,7 +80,10 @@ private:
void _whipped();
- SharedPtr<ModelEngineInterface> _engine;
+ SharedPtr<Glib::Module> _serialisation_module;
+
+ SharedPtr<EngineInterface> _engine;
+ SharedPtr<Loader> _loader;
DeprecatedLoader _deprecated_loader;
Serializer _serializer;
diff --git a/src/progs/ingenuity/UploadPatchWindow.cpp b/src/progs/ingenuity/UploadPatchWindow.cpp
index 6c68236d..400c2369 100644
--- a/src/progs/ingenuity/UploadPatchWindow.cpp
+++ b/src/progs/ingenuity/UploadPatchWindow.cpp
@@ -21,13 +21,13 @@
#include <dirent.h>
#include <boost/optional/optional.hpp>
#include <curl/curl.h>
-#include "Serializer.h"
-#include "raul/RDFQuery.h"
+#include <raul/RDFQuery.h>
+#include "interface/EngineInterface.h"
+#include "client/Serializer.h"
+#include "client/PatchModel.h"
#include "UploadPatchWindow.h"
#include "App.h"
#include "Configuration.h"
-#include "PatchModel.h"
-#include "ModelEngineInterface.h"
#include "ThreadedLoader.h"
using boost::optional;
diff --git a/src/progs/ingenuity/UploadPatchWindow.h b/src/progs/ingenuity/UploadPatchWindow.h
index ffc0f17c..36b39b07 100644
--- a/src/progs/ingenuity/UploadPatchWindow.h
+++ b/src/progs/ingenuity/UploadPatchWindow.h
@@ -22,11 +22,11 @@
#include <libglademm/xml.h>
#include <gtkmm.h>
#include <curl/curl.h>
-#include "raul/SharedPtr.h"
-#include "raul/Thread.h"
-#include "raul/AtomicInt.h"
-#include "PatchModel.h"
-#include "PluginModel.h"
+#include <raul/SharedPtr.h>
+#include <raul/Thread.h>
+#include <raul/AtomicInt.h>
+#include "client/PatchModel.h"
+#include "client/PluginModel.h"
using Ingen::Client::PatchModel;
using Ingen::Client::MetadataMap;
diff --git a/src/progs/ingenuity/WindowFactory.h b/src/progs/ingenuity/WindowFactory.h
index 9c6cfa0a..085ff9b6 100644
--- a/src/progs/ingenuity/WindowFactory.h
+++ b/src/progs/ingenuity/WindowFactory.h
@@ -20,9 +20,10 @@
#include <map>
#include <gtkmm.h>
-#include "raul/SharedPtr.h"
+#include <raul/SharedPtr.h>
+#include "client/PatchModel.h"
#include "PatchView.h"
-#include "PatchModel.h"
+
using Ingen::Client::PatchModel;
namespace Ingenuity {
diff --git a/src/progs/ingenuity/ingenuity_dev b/src/progs/ingenuity/ingenuity_dev
new file mode 100755
index 00000000..b77d2fe6
--- /dev/null
+++ b/src/progs/ingenuity/ingenuity_dev
@@ -0,0 +1,3 @@
+#!/usr/bin/env sh
+
+INGEN_MODULE_PATH=../../libs/engine/.libs:../../libs/serialisation/.libs ./ingenuity