From 81e9fb3245bd461ebfee4cfa16d1792e48533f9e Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 12 Mar 2012 06:59:48 +0000 Subject: Centralise atom creation in forge object. Aside from being more greppable and making realtime violations more obvious, this is a step towards using LV2 atoms internally (which needs a factory since the type numbers are dynamic). git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4054 a436a847-0d15-0410-975c-d299462d15a1 --- src/shared/World.cpp | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'src/shared/World.cpp') diff --git a/src/shared/World.cpp b/src/shared/World.cpp index 59207939..cf21cd44 100644 --- a/src/shared/World.cpp +++ b/src/shared/World.cpp @@ -23,6 +23,7 @@ #include "lilv/lilv.h" #include "raul/log.hpp" +#include "raul/Atom.hpp" #include "sord/sordmm.hpp" #include "ingen/EngineBase.hpp" @@ -102,8 +103,9 @@ public: , argv(a_argv) , conf(conf) , lv2_features(NULL) + , forge(new Raul::Forge()) , rdf_world(new Sord::World()) - , uris(new Shared::URIs()) + , uris(new Shared::URIs(*forge)) , lv2_uri_map(new Ingen::Shared::LV2URIMap(*uris.get())) , lilv_world(lilv_world_new()) { @@ -144,6 +146,8 @@ public: delete lv2_features; lv2_features = NULL; + delete forge; + uris.reset(); } @@ -161,6 +165,7 @@ public: char**& argv; Raul::Configuration* conf; LV2Features* lv2_features; + Raul::Forge* forge; Sord::World* rdf_world; SharedPtr uris; SharedPtr lv2_uri_map; @@ -199,6 +204,7 @@ SharedPtr World::serialiser() { return _impl->seria SharedPtr World::parser() { return _impl->parser; } SharedPtr World::store() { return _impl->store; } Raul::Configuration* World::conf() { return _impl->conf; } +Raul::Forge& World::forge() { return *_impl->forge; } LV2Features* World::lv2_features() { return _impl->lv2_features; } LilvWorld* World::lilv_world() { return _impl->lilv_world; } -- cgit v1.2.1