summaryrefslogtreecommitdiffstats
path: root/src/shared/World.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-11 01:29:18 +0000
committerDavid Robillard <d@drobilla.net>2012-05-11 01:29:18 +0000
commite77d4fcf31bfdad0b34e184e4743b4750848472c (patch)
treedd3e9aa6d8b8d1e54cae56138ab25f92eba8624a /src/shared/World.cpp
parent00957dd74a97252d9a790141cb7f475573da1a91 (diff)
downloadingen-e77d4fcf31bfdad0b34e184e4743b4750848472c.tar.gz
ingen-e77d4fcf31bfdad0b34e184e4743b4750848472c.tar.bz2
ingen-e77d4fcf31bfdad0b34e184e4743b4750848472c.zip
Use more reasonable names for the world's interface and engine (if present).
Don't require separate Configuration initialisation from World (simplify API). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4343 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared/World.cpp')
-rw-r--r--src/shared/World.cpp33
1 files changed, 15 insertions, 18 deletions
diff --git a/src/shared/World.cpp b/src/shared/World.cpp
index 28ad1a34..1012a157 100644
--- a/src/shared/World.cpp
+++ b/src/shared/World.cpp
@@ -98,14 +98,12 @@ ingen_load_module(const string& name)
class World::Pimpl {
public:
- Pimpl(Raul::Configuration* conf,
- int& a_argc,
+ Pimpl(int& a_argc,
char**& a_argv,
LV2_URID_Map* map,
LV2_URID_Unmap* unmap)
: argc(a_argc)
, argv(a_argv)
- , conf(conf)
, lv2_features(NULL)
, rdf_world(new Sord::World())
, uri_map(new Ingen::Shared::URIMap(map, unmap))
@@ -113,6 +111,7 @@ public:
, uris(new Shared::URIs(*forge, uri_map.get()))
, lilv_world(lilv_world_new())
{
+ conf.parse(argc, argv);
lv2_features = new Ingen::Shared::LV2Features();
lv2_features->add_feature(uri_map->urid_map_feature());
lv2_features->add_feature(uri_map->urid_unmap_feature());
@@ -136,7 +135,7 @@ public:
serialiser.reset();
parser.reset();
- local_engine.reset();
+ engine.reset();
store.reset();
modules.clear();
@@ -169,14 +168,14 @@ public:
int& argc;
char**& argv;
- Raul::Configuration* conf;
+ Shared::Configuration conf;
LV2Features* lv2_features;
Sord::World* rdf_world;
SharedPtr<URIMap> uri_map;
Ingen::Forge* forge;
SharedPtr<URIs> uris;
- SharedPtr<Interface> engine;
- SharedPtr<EngineBase> local_engine;
+ SharedPtr<Interface> interface;
+ SharedPtr<EngineBase> engine;
SharedPtr<Serialisation::Serialiser> serialiser;
SharedPtr<Serialisation::Parser> parser;
SharedPtr<Store> store;
@@ -184,12 +183,11 @@ public:
std::string jack_uuid;
};
-World::World(Raul::Configuration* conf,
- int& argc,
+World::World(int& argc,
char**& argv,
LV2_URID_Map* map,
LV2_URID_Unmap* unmap)
- : _impl(new Pimpl(conf, argc, argv, map, unmap))
+ : _impl(new Pimpl(argc, argv, map, unmap))
{
}
@@ -199,21 +197,20 @@ World::~World()
delete _impl;
}
-void World::set_local_engine(SharedPtr<EngineBase> e) { _impl->local_engine = e; }
-void World::set_engine(SharedPtr<Interface> e) { _impl->engine = e; }
+void World::set_engine(SharedPtr<EngineBase> e) { _impl->engine = e; }
+void World::set_interface(SharedPtr<Interface> i) { _impl->interface = i; }
void World::set_serialiser(SharedPtr<Serialisation::Serialiser> s) { _impl->serialiser = s; }
void World::set_parser(SharedPtr<Serialisation::Parser> p) { _impl->parser = p; }
void World::set_store(SharedPtr<Store> s) { _impl->store = s; }
-void World::set_conf(Raul::Configuration* c) { _impl->conf = c; }
int& World::argc() { return _impl->argc; }
char**& World::argv() { return _impl->argv; }
-SharedPtr<EngineBase> World::local_engine() { return _impl->local_engine; }
-SharedPtr<Interface> World::engine() { return _impl->engine; }
+SharedPtr<EngineBase> World::engine() { return _impl->engine; }
+SharedPtr<Interface> World::interface() { return _impl->interface; }
SharedPtr<Serialisation::Serialiser> World::serialiser() { return _impl->serialiser; }
SharedPtr<Serialisation::Parser> World::parser() { return _impl->parser; }
SharedPtr<Store> World::store() { return _impl->store; }
-Raul::Configuration* World::conf() { return _impl->conf; }
+Shared::Configuration& World::conf() { return _impl->conf; }
Ingen::Forge& World::forge() { return *_impl->forge; }
LV2Features* World::lv2_features() { return _impl->lv2_features; }
@@ -271,8 +268,8 @@ World::unload_modules()
/** Get an interface for a remote engine at @a url
*/
SharedPtr<Interface>
-World::interface(const std::string& engine_url,
- SharedPtr<Interface> respondee)
+World::new_interface(const std::string& engine_url,
+ SharedPtr<Interface> respondee)
{
const string scheme = engine_url.substr(0, engine_url.find(":"));
const Pimpl::InterfaceFactories::const_iterator i = _impl->interface_factories.find(scheme);