diff options
author | David Robillard <d@drobilla.net> | 2009-12-19 21:37:50 +0000 |
---|---|---|
committer | David Robillard <d@drobilla.net> | 2009-12-19 21:37:50 +0000 |
commit | 19045ab92aa7e996971584a0dc8780d1d58b498b (patch) | |
tree | 619c73deb7fd64ce31c5167490d1ae186dbb2695 /src/module/World.hpp | |
parent | 4613a2e15f1122ecf6830171de0ab18dc22fefff (diff) | |
download | ingen-19045ab92aa7e996971584a0dc8780d1d58b498b.tar.gz ingen-19045ab92aa7e996971584a0dc8780d1d58b498b.tar.bz2 ingen-19045ab92aa7e996971584a0dc8780d1d58b498b.zip |
New ingen module (library, not e.g. LV2 plugin) design.
Much cleaner interface and general usage of Ingen as a library.
git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@2314 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/module/World.hpp')
-rw-r--r-- | src/module/World.hpp | 35 |
1 files changed, 31 insertions, 4 deletions
diff --git a/src/module/World.hpp b/src/module/World.hpp index 27c9c764..e12ce5b2 100644 --- a/src/module/World.hpp +++ b/src/module/World.hpp @@ -18,8 +18,12 @@ #ifndef INGEN_WORLD_HPP #define INGEN_WORLD_HPP +#include <map> +#include <string> #include <boost/shared_ptr.hpp> #include <glibmm/module.h> +#include "raul/Configuration.hpp" +#include "Module.hpp" typedef struct _SLV2World* SLV2World; @@ -49,10 +53,22 @@ class LV2Features; * The Ingen System(TM) and whatnot. */ struct World { - Redland::World* rdf_world; + World() : conf(0) {} - SLV2World slv2_world; - LV2Features* lv2_features; + bool load(const char* name); + void unload_all(); + + SharedPtr<Ingen::Shared::EngineInterface> interface(const std::string& engine_url); + + bool run(const std::string& mime_type, const std::string& filename); + + int argc; + char** argv; + Raul::Configuration* conf; + + Redland::World* rdf_world; + SLV2World slv2_world; + LV2Features* lv2_features; boost::shared_ptr<EngineInterface> engine; boost::shared_ptr<Engine> local_engine; @@ -60,7 +76,18 @@ struct World { boost::shared_ptr<Serialisation::Parser> parser; boost::shared_ptr<Store> store; - boost::shared_ptr<Glib::Module> serialisation_module; +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; + + typedef bool (*ScriptRunner)(World* world, const char* filename); + typedef std::map<const std::string, ScriptRunner> ScriptRunners; + ScriptRunners script_runners; }; |