summaryrefslogtreecommitdiffstats
path: root/src/server/Engine.hpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-09 01:14:30 +0000
committerDavid Robillard <d@drobilla.net>2012-05-09 01:14:30 +0000
commitbaeb3c1872a989b69eb89fae04f93c59b06f258e (patch)
tree83720f9c7bad7ab26c910180d8caea2fd4cb7e70 /src/server/Engine.hpp
parent4d46a232b30be99bc34e581cbc636345f77c6bc4 (diff)
downloadingen-baeb3c1872a989b69eb89fae04f93c59b06f258e.tar.gz
ingen-baeb3c1872a989b69eb89fae04f93c59b06f258e.tar.bz2
ingen-baeb3c1872a989b69eb89fae04f93c59b06f258e.zip
Simply event interface design and make only one pre-process thread.
This makes event pre-processing actually safe for multiple interfaces since multiple events will never be pre-processed simultaneously and the pre-process order is definitely the same as the execute order. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4323 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/server/Engine.hpp')
-rw-r--r--src/server/Engine.hpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/server/Engine.hpp b/src/server/Engine.hpp
index 5f218078..042264e4 100644
--- a/src/server/Engine.hpp
+++ b/src/server/Engine.hpp
@@ -17,8 +17,6 @@
#ifndef INGEN_ENGINE_ENGINE_HPP
#define INGEN_ENGINE_ENGINE_HPP
-#include <vector>
-
#include <boost/utility.hpp>
#include "ingen/EngineBase.hpp"
@@ -38,10 +36,12 @@ class ClientBroadcaster;
class ControlBindings;
class Driver;
class EngineStore;
-class EventSource;
+class Event;
+class EventWriter;
class MessageContext;
class NodeFactory;
class PostProcessor;
+class PreProcessor;
class ProcessContext;
/**
@@ -69,11 +69,14 @@ public:
virtual bool unregister_client(const Raul::URI& uri);
void set_driver(SharedPtr<Driver> driver);
- void add_event_source(SharedPtr<EventSource> source);
+
+ bool pending_events();
+ void enqueue_event(Event* ev);
void process_events(ProcessContext& context);
Ingen::Shared::World* world() const { return _world; }
+ EventWriter* interface() const { return _event_writer; }
ClientBroadcaster* broadcaster() const { return _broadcaster; }
BufferFactory* buffer_factory() const { return _buffer_factory; }
ControlBindings* control_bindings() const { return _control_bindings; }
@@ -97,9 +100,9 @@ private:
Raul::Maid* _maid;
MessageContext* _message_context;
NodeFactory* _node_factory;
+ PreProcessor* _pre_processor;
PostProcessor* _post_processor;
-
- SharedPtr<EventSource> _event_sources; ///< Intrusive linked list
+ EventWriter* _event_writer;
bool _quit_flag;
};