summaryrefslogtreecommitdiffstats
path: root/src/engine
diff options
context:
space:
mode:
Diffstat (limited to 'src/engine')
-rw-r--r--src/engine/Engine.cpp14
-rw-r--r--src/engine/Engine.hpp15
2 files changed, 21 insertions, 8 deletions
diff --git a/src/engine/Engine.cpp b/src/engine/Engine.cpp
index 12c479f5..514e286f 100644
--- a/src/engine/Engine.cpp
+++ b/src/engine/Engine.cpp
@@ -138,6 +138,13 @@ Engine::main_iteration()
void
+Engine::quit()
+{
+ _quit_flag = true;
+}
+
+
+void
Engine::add_event_source(SharedPtr<EventSource> source)
{
_event_sources.insert(source);
@@ -263,4 +270,11 @@ Engine::process_events(ProcessContext& context)
}
+bool
+Engine::activated()
+{
+ return _activated;
+}
+
+
} // namespace Ingen
diff --git a/src/engine/Engine.hpp b/src/engine/Engine.hpp
index 9f0f08a8..e79dbb9f 100644
--- a/src/engine/Engine.hpp
+++ b/src/engine/Engine.hpp
@@ -19,15 +19,16 @@
#define INGEN_ENGINE_ENGINE_HPP
#include <cassert>
-#include <vector>
#include <set>
+#include <vector>
+
#include <boost/utility.hpp>
+
#include "raul/SharedPtr.hpp"
+
#include "interface/PortType.hpp"
#include "interface/EventType.hpp"
-template<typename T> class Queue;
-
namespace Raul { class Maid; }
namespace Ingen {
@@ -71,16 +72,14 @@ public:
virtual int main();
virtual bool main_iteration();
- /** Set the quit flag that should kill all threads and exit cleanly.
- * Note that it will take some time. */
- virtual void quit() { _quit_flag = true; }
+ virtual void quit();
virtual bool activate();
virtual void deactivate();
virtual void process_events(ProcessContext& context);
- virtual bool activated() { return _activated; }
+ virtual bool activated();
virtual BufferFactory* buffer_factory() const { return _buffer_factory; }
virtual ClientBroadcaster* broadcaster() const { return _broadcaster; }
@@ -101,7 +100,7 @@ public:
typedef std::vector<ProcessSlave*> ProcessSlaves;
virtual const ProcessSlaves& process_slaves() const { return _process_slaves; }
- virtual ProcessSlaves& process_slaves() { return _process_slaves; }
+ virtual ProcessSlaves& process_slaves() { return _process_slaves; }
private:
typedef std::set< SharedPtr<EventSource> > EventSources;