summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2009-12-22 16:34:14 +0000
committerDavid Robillard <d@drobilla.net>2009-12-22 16:34:14 +0000
commita854ac939a20b12932384c3074c9ce85df0b39bd (patch)
tree0c84a22cbf128369fae7bf3b32a9cf64cb575d21
parent19045ab92aa7e996971584a0dc8780d1d58b498b (diff)
downloadingen-a854ac939a20b12932384c3074c9ce85df0b39bd.tar.gz
ingen-a854ac939a20b12932384c3074c9ce85df0b39bd.tar.bz2
ingen-a854ac939a20b12932384c3074c9ce85df0b39bd.zip
Fix compilation.
Consistent naming of module source files. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2315 a436a847-0d15-0410-975c-d299462d15a1
-rw-r--r--src/client/ingen_client.cpp (renamed from src/client/client.cpp)6
-rw-r--r--src/client/wscript2
-rw-r--r--src/gui/App.cpp1
-rw-r--r--src/gui/ingen_gui.cpp (renamed from src/gui/gui.cpp)0
-rw-r--r--src/gui/wscript2
-rw-r--r--src/module/World.cpp7
-rw-r--r--src/module/World.hpp17
7 files changed, 21 insertions, 14 deletions
diff --git a/src/client/client.cpp b/src/client/ingen_client.cpp
index 9512ba44..9f644e4d 100644
--- a/src/client/client.cpp
+++ b/src/client/ingen_client.cpp
@@ -50,9 +50,9 @@ new_http_interface(Ingen::Shared::World* world, const std::string& url)
struct IngenClientModule : public Ingen::Shared::Module {
void load(Ingen::Shared::World* world) {
- world->interface_factories.insert(make_pair("osc.udp", &new_osc_interface));
- world->interface_factories.insert(make_pair("osc.tcp", &new_osc_interface));
- world->interface_factories.insert(make_pair("http", &new_http_interface));
+ world->add_interface_factory("osc.udp", &new_osc_interface);
+ world->add_interface_factory("osc.tcp", &new_osc_interface);
+ world->add_interface_factory("http", &new_http_interface);
}
};
diff --git a/src/client/wscript b/src/client/wscript
index ea0eef85..749d9ec7 100644
--- a/src/client/wscript
+++ b/src/client/wscript
@@ -15,7 +15,7 @@ def build(bld):
PluginUI.cpp
PortModel.cpp
ThreadedSigClientInterface.cpp
- client.cpp
+ ingen_client.cpp
'''
if bld.env['HAVE_SOUP'] == 1:
diff --git a/src/gui/App.cpp b/src/gui/App.cpp
index f42ddcb4..0f34de2f 100644
--- a/src/gui/App.cpp
+++ b/src/gui/App.cpp
@@ -26,7 +26,6 @@
#include <sys/time.h>
#include "raul/Path.hpp"
#include "flowcanvas/Connection.hpp"
-#include "module/Module.hpp"
#include "module/World.hpp"
#include "engine/Engine.hpp"
#include "interface/EngineInterface.hpp"
diff --git a/src/gui/gui.cpp b/src/gui/ingen_gui.cpp
index d1ad6c99..d1ad6c99 100644
--- a/src/gui/gui.cpp
+++ b/src/gui/ingen_gui.cpp
diff --git a/src/gui/wscript b/src/gui/wscript
index 93084654..7d7e61fc 100644
--- a/src/gui/wscript
+++ b/src/gui/wscript
@@ -40,7 +40,7 @@ def build(bld):
ThreadedLoader.cpp
Window.cpp
WindowFactory.cpp
- gui.cpp
+ ingen_gui.cpp
'''
if bld.env['HAVE_CURL'] != 0:
diff --git a/src/module/World.cpp b/src/module/World.cpp
index 0bc87459..c4b1a88e 100644
--- a/src/module/World.cpp
+++ b/src/module/World.cpp
@@ -141,6 +141,13 @@ World::run(const std::string& mime_type, const std::string& filename)
return i->second(this, filename.c_str());
}
+void
+World::add_interface_factory(const std::string& scheme, InterfaceFactory factory)
+{
+ interface_factories.insert(make_pair(scheme, factory));
+}
+
+
} // namespace Shared
} // namespace Ingen
diff --git a/src/module/World.hpp b/src/module/World.hpp
index e12ce5b2..59500c3e 100644
--- a/src/module/World.hpp
+++ b/src/module/World.hpp
@@ -44,13 +44,12 @@ class LV2Features;
/** The "world" all Ingen modules may share.
*
- * This is required for shared access to things like Redland, so locking can
- * take place centrally and the engine/gui using the same library won't
- * explode horribly.
+ * All loaded components of Ingen, as well as things requiring shared access
+ * and/or locking (e.g. Redland, SLV2).
*
- * Hopefully at some point in the future it can allow some fun things like
- * scripting bindings that play with all loaded components of
- * The Ingen System(TM) and whatnot.
+ * Ingen modules are shared libraries which modify the World when loaded
+ * using World::load, e.g. loading the "ingen_serialisation" module will
+ * set World::serialiser and World::parser to valid objects.
*/
struct World {
World() : conf(0) {}
@@ -58,6 +57,10 @@ struct World {
bool load(const char* name);
void unload_all();
+ typedef SharedPtr<Ingen::Shared::EngineInterface> (*InterfaceFactory)(
+ World* world, const std::string& engine_url);
+
+ void add_interface_factory(const std::string& scheme, InterfaceFactory factory);
SharedPtr<Ingen::Shared::EngineInterface> interface(const std::string& engine_url);
bool run(const std::string& mime_type, const std::string& filename);
@@ -80,8 +83,6 @@ private:
typedef std::map< const std::string, boost::shared_ptr<Module> > Modules;
Modules modules;
- typedef SharedPtr<Ingen::Shared::EngineInterface> (*InterfaceFactory)(
- World* world, const std::string& url);
typedef std::map<const std::string, InterfaceFactory> InterfaceFactories;
InterfaceFactories interface_factories;