summaryrefslogtreecommitdiffstats
path: root/src/progs
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2007-05-01 23:58:38 +0000
committerDavid Robillard <d@drobilla.net>2007-05-01 23:58:38 +0000
commit10e23868c8199335ebd360afb62911174075658c (patch)
tree5ca362855ca1b2809b1e4ca95ecbcdf3fe8bf60b /src/progs
parent2772d11a284f199342ef86e9169865968577a17c (diff)
downloadingen-10e23868c8199335ebd360afb62911174075658c.tar.gz
ingen-10e23868c8199335ebd360afb62911174075658c.tar.bz2
ingen-10e23868c8199335ebd360afb62911174075658c.zip
Moved loading out to it's own namespace.
git-svn-id: http://svn.drobilla.net/lad/ingen@490 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs')
-rw-r--r--src/progs/ingenuity/App.cpp1
-rw-r--r--src/progs/ingenuity/LoadPatchWindow.cpp1
-rw-r--r--src/progs/ingenuity/ThreadedLoader.cpp7
-rw-r--r--src/progs/ingenuity/ThreadedLoader.h16
-rw-r--r--src/progs/patch_loader/patch_loader.cpp4
5 files changed, 15 insertions, 14 deletions
diff --git a/src/progs/ingenuity/App.cpp b/src/progs/ingenuity/App.cpp
index 8ffcd710..0e726db9 100644
--- a/src/progs/ingenuity/App.cpp
+++ b/src/progs/ingenuity/App.cpp
@@ -40,6 +40,7 @@
#include "Store.h"
#include "ThreadedLoader.h"
#include "WindowFactory.h"
+#include "ModelEngineInterface.h"
#ifdef HAVE_LASH
#include "LashController.h"
#endif
diff --git a/src/progs/ingenuity/LoadPatchWindow.cpp b/src/progs/ingenuity/LoadPatchWindow.cpp
index aba427e9..cc7ff7bd 100644
--- a/src/progs/ingenuity/LoadPatchWindow.cpp
+++ b/src/progs/ingenuity/LoadPatchWindow.cpp
@@ -25,6 +25,7 @@
#include "ModelEngineInterface.h"
#include "ThreadedLoader.h"
+using namespace Ingen::Serialisation;
using boost::optional;
namespace Ingenuity {
diff --git a/src/progs/ingenuity/ThreadedLoader.cpp b/src/progs/ingenuity/ThreadedLoader.cpp
index 118d252f..bf195dce 100644
--- a/src/progs/ingenuity/ThreadedLoader.cpp
+++ b/src/progs/ingenuity/ThreadedLoader.cpp
@@ -27,8 +27,8 @@ namespace Ingenuity {
ThreadedLoader::ThreadedLoader(SharedPtr<ModelEngineInterface> engine)
- : _deprecated_loader(engine)
- , _loader(engine, App::instance().rdf_world())
+ : _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)
@@ -78,7 +78,8 @@ ThreadedLoader::load_patch(bool merge,
false)));
} else {
_events.push_back(sigc::hide_return(sigc::bind(
- sigc::mem_fun(_loader, &Loader::load),
+ sigc::ptr_fun(&Ingen::Serialisation::load),
+ App::instance().engine(),
App::instance().rdf_world(),
data_base_uri,
engine_parent,
diff --git a/src/progs/ingenuity/ThreadedLoader.h b/src/progs/ingenuity/ThreadedLoader.h
index 4cab4acb..bf2c2ed5 100644
--- a/src/progs/ingenuity/ThreadedLoader.h
+++ b/src/progs/ingenuity/ThreadedLoader.h
@@ -22,15 +22,15 @@
#include <list>
#include <cassert>
#include <boost/optional/optional.hpp>
-#include "raul/Thread.h"
-#include "raul/Slave.h"
-#include "raul/Mutex.h"
-#include "raul/Condition.h"
+#include <raul/Thread.h>
+#include <raul/Slave.h>
+#include <raul/Mutex.h>
+#include <raul/Condition.h>
#include "ModelEngineInterface.h"
-#include "ObjectModel.h"
#include "Serializer.h"
#include "DeprecatedLoader.h"
#include "Loader.h"
+#include "PatchModel.h"
using std::string;
using std::list;
using boost::optional;
@@ -57,9 +57,6 @@ public:
ThreadedLoader(SharedPtr<ModelEngineInterface> engine);
~ThreadedLoader();
- //Loader& loader() const { return *_loader; }
- //Serializer& serializer() const { return *_serializer; }
-
// FIXME: there's a pattern here....
// (same core interface as Loader/Serializer)
@@ -82,8 +79,9 @@ private:
void _whipped();
+ SharedPtr<ModelEngineInterface> _engine;
+
DeprecatedLoader _deprecated_loader;
- Loader _loader;
Serializer _serializer;
Raul::Mutex _mutex;
list<Closure> _events;
diff --git a/src/progs/patch_loader/patch_loader.cpp b/src/progs/patch_loader/patch_loader.cpp
index f011d308..cc3c1903 100644
--- a/src/progs/patch_loader/patch_loader.cpp
+++ b/src/progs/patch_loader/patch_loader.cpp
@@ -61,7 +61,6 @@ int main(int argc, char** argv)
rdf_world.add_prefix("doap", "http://usefulinc.com/ns/doap#");
SharedPtr<OSCModelEngineInterface> engine(new OSCModelEngineInterface(engine_url));
- Loader loader(engine, &rdf_world);
/* Connect to engine */
engine->attach(-1, client_port);
@@ -81,7 +80,8 @@ int main(int argc, char** argv)
for (uint i=0; i < args_info.inputs_num; ++i) {
cerr << "FIXME: load patch under root" << endl;
cerr << "Load " << args_info.inputs[i] << endl;
- loader.load(&rdf_world, string("file:") + args_info.inputs[i], Path("/"), "");
+ Ingen::Serialisation::load(engine, &rdf_world,
+ string("file:") + args_info.inputs[i], Path("/"), "");
}
return 0;