summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/client/OSCEngineSender.cpp4
-rw-r--r--src/engine/Engine.cpp14
-rw-r--r--src/engine/Engine.hpp15
-rw-r--r--src/module/World.cpp4
-rw-r--r--src/module/World.hpp39
5 files changed, 50 insertions, 26 deletions
diff --git a/src/client/OSCEngineSender.cpp b/src/client/OSCEngineSender.cpp
index 512d21aa..42e2a09a 100644
--- a/src/client/OSCEngineSender.cpp
+++ b/src/client/OSCEngineSender.cpp
@@ -18,11 +18,13 @@
#include "raul/log.hpp"
#include "raul/AtomLiblo.hpp"
#include "raul/Path.hpp"
-#include "OSCEngineSender.hpp"
+
#include "common/interface/Patch.hpp"
#include "common/interface/Port.hpp"
#include "common/interface/Plugin.hpp"
+#include "OSCEngineSender.hpp"
+
#define LOG(s) s << "[OSCEngineSender] "
using namespace std;
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;
diff --git a/src/module/World.cpp b/src/module/World.cpp
index d8721f5f..48fe7753 100644
--- a/src/module/World.cpp
+++ b/src/module/World.cpp
@@ -29,6 +29,7 @@
#include "shared/LV2Features.hpp"
#include "shared/LV2URIMap.hpp"
#include "World.hpp"
+#include "Module.hpp"
#define LOG(s) s << "[Module] "
@@ -94,7 +95,8 @@ load_module(const string& name)
}
-struct WorldImpl : public boost::noncopyable {
+class WorldImpl : public boost::noncopyable {
+public:
WorldImpl(Raul::Configuration* conf, int& a_argc, char**& a_argv)
: argc(a_argc)
, argv(a_argv)
diff --git a/src/module/World.hpp b/src/module/World.hpp
index a2eb5d40..dededc44 100644
--- a/src/module/World.hpp
+++ b/src/module/World.hpp
@@ -20,13 +20,16 @@
#include <map>
#include <string>
+
#include <boost/shared_ptr.hpp>
#include <boost/utility.hpp>
+
#include <glibmm/module.h>
-#include "ingen-config.h"
+
#include "raul/Configuration.hpp"
#include "raul/SharedPtr.hpp"
-#include "Module.hpp"
+
+#include "ingen-config.h"
#include "module/ingen_module.hpp"
#ifdef HAVE_SLV2
@@ -44,10 +47,10 @@ namespace Serialisation { class Serialiser; class Parser; }
namespace Shared {
class EngineInterface;
-class Store;
class LV2Features;
class LV2URIMap;
-struct WorldImpl;
+class Store;
+class WorldImpl;
/** The "world" all Ingen modules may share.
@@ -60,14 +63,6 @@ struct WorldImpl;
* set World::serialiser and World::parser to valid objects.
*/
class World : public boost::noncopyable {
- friend Ingen::Shared::World* ::ingen_world_new(Raul::Configuration*, int&, char**&);
- World(Raul::Configuration* conf, int& argc, char**& argv);
-
- friend void ::ingen_world_free(Ingen::Shared::World* world);
- virtual ~World();
-
- WorldImpl* _impl;
-
public:
virtual bool load(const char* name);
virtual void unload_all();
@@ -75,10 +70,14 @@ public:
typedef SharedPtr<Ingen::Shared::EngineInterface> (*InterfaceFactory)(
World* world, const std::string& engine_url);
- virtual void add_interface_factory(const std::string& scheme, InterfaceFactory factory);
- virtual SharedPtr<Ingen::Shared::EngineInterface> interface(const std::string& engine_url);
+ virtual void add_interface_factory(const std::string& scheme,
+ InterfaceFactory factory);
+
+ virtual SharedPtr<Ingen::Shared::EngineInterface> interface(
+ const std::string& engine_url);
- virtual bool run(const std::string& mime_type, const std::string& filename);
+ virtual bool run(const std::string& mime_type,
+ const std::string& filename);
virtual void set_local_engine(SharedPtr<Engine> e);
virtual void set_engine(SharedPtr<EngineInterface> e);
@@ -111,6 +110,15 @@ public:
virtual void set_jack_uuid(const std::string& uuid);
virtual std::string jack_uuid();
#endif
+
+private:
+ friend Ingen::Shared::World* ::ingen_world_new(Raul::Configuration*, int&, char**&);
+ World(Raul::Configuration* conf, int& argc, char**& argv);
+
+ friend void ::ingen_world_free(Ingen::Shared::World* world);
+ virtual ~World();
+
+ WorldImpl* _impl;
};
@@ -118,4 +126,3 @@ public:
} // namespace Ingen
#endif // INGEN_MODULE_WORLD_HPP
-