diff options
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; }; |