summaryrefslogtreecommitdiffstats
path: root/src/progs/ingenuity/Loader.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2006-09-30 06:47:00 +0000
committerDavid Robillard <d@drobilla.net>2006-09-30 06:47:00 +0000
commit35a5d92cfcf6815553a0939c3e2bf77c1108fd31 (patch)
tree456351b4b18d48aba25a2db7218df9be09d4047e /src/progs/ingenuity/Loader.h
parentd82dcd232f201b531a0be165ee44aede1bc8a1df (diff)
downloadingen-35a5d92cfcf6815553a0939c3e2bf77c1108fd31.tar.gz
ingen-35a5d92cfcf6815553a0939c3e2bf77c1108fd31.tar.bz2
ingen-35a5d92cfcf6815553a0939c3e2bf77c1108fd31.zip
Work on RDF serialization (only (partial) saving so far).
git-svn-id: http://svn.drobilla.net/lad/ingen@146 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/progs/ingenuity/Loader.h')
-rw-r--r--src/progs/ingenuity/Loader.h16
1 files changed, 10 insertions, 6 deletions
diff --git a/src/progs/ingenuity/Loader.h b/src/progs/ingenuity/Loader.h
index a33945a1..7459378e 100644
--- a/src/progs/ingenuity/Loader.h
+++ b/src/progs/ingenuity/Loader.h
@@ -18,6 +18,7 @@
#define LOADERTHREAD_H
#include <string>
+#include <list>
#include <cassert>
#include "util/Thread.h"
#include "util/Slave.h"
@@ -26,9 +27,10 @@
#include "ModelEngineInterface.h"
#include "ObjectModel.h"
using std::string;
+using std::list;
namespace Ingen { namespace Client {
- class PatchLibrarian;
+ class Serializer;
class PatchModel;
} }
using namespace Ingen::Client;
@@ -42,6 +44,9 @@ namespace Ingenuity {
* blocking everything else, so the app can respond to the incoming events
* caused as a result of the patch loading, while the patch loads.
*
+ * Implemented as a slave with a list of closures (events) which processes
+ * all events in the (mutex protected) list each time it's whipped.
+ *
* \ingroup Ingenuity
*/
class Loader : public Slave
@@ -50,7 +55,7 @@ public:
Loader(CountedPtr<ModelEngineInterface> engine);
~Loader();
- PatchLibrarian& librarian() { return *_patch_librarian; }
+ Serializer& serializer() const { return *_serializer; }
void load_patch(const string& filename,
const string& parent_path,
@@ -69,10 +74,9 @@ private:
void _whipped();
- PatchLibrarian* const _patch_librarian;
- Mutex _mutex;
- Condition _cond;
- Closure _event;
+ Serializer* const _serializer;
+ Mutex _mutex;
+ list<Closure> _events;
};