summaryrefslogtreecommitdiffstats
path: root/src/module
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 /src/module
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
Diffstat (limited to 'src/module')
-rw-r--r--src/module/World.cpp7
-rw-r--r--src/module/World.hpp17
2 files changed, 16 insertions, 8 deletions
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;