summaryrefslogtreecommitdiffstats
path: root/src/shared
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2012-05-10 04:02:24 +0000
committerDavid Robillard <d@drobilla.net>2012-05-10 04:02:24 +0000
commit8ec295a0f2a40086ed83e8d2ad8ad38c8125bcb4 (patch)
treeaf044468e3f20bea5c18d02ba35cd3a69cdc4808 /src/shared
parentda468f24388d7f0f574c6e4dd4022e05d47a9db2 (diff)
downloadingen-8ec295a0f2a40086ed83e8d2ad8ad38c8125bcb4.tar.gz
ingen-8ec295a0f2a40086ed83e8d2ad8ad38c8125bcb4.tar.bz2
ingen-8ec295a0f2a40086ed83e8d2ad8ad38c8125bcb4.zip
LV2URIMap => URIMap.
Trim unnecessary includes. git-svn-id: http://svn.drobilla.net/lad/trunk/ingen@4337 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'src/shared')
-rw-r--r--src/shared/AtomReader.cpp3
-rw-r--r--src/shared/AtomWriter.cpp3
-rw-r--r--src/shared/Builder.cpp8
-rw-r--r--src/shared/Forge.cpp3
-rw-r--r--src/shared/LV2Features.cpp2
-rw-r--r--src/shared/ResourceImpl.cpp5
-rw-r--r--src/shared/URIMap.cpp (renamed from src/shared/LV2URIMap.cpp)28
-rw-r--r--src/shared/URIs.cpp7
-rw-r--r--src/shared/World.cpp22
-rw-r--r--src/shared/wscript2
10 files changed, 42 insertions, 41 deletions
diff --git a/src/shared/AtomReader.cpp b/src/shared/AtomReader.cpp
index 45b60c35..dc2aa15c 100644
--- a/src/shared/AtomReader.cpp
+++ b/src/shared/AtomReader.cpp
@@ -17,6 +17,7 @@
#include <utility>
#include "ingen/shared/AtomReader.hpp"
+#include "ingen/shared/URIMap.hpp"
#include "lv2/lv2plug.in/ns/ext/atom/util.h"
#include "raul/Path.hpp"
#include "raul/log.hpp"
@@ -24,7 +25,7 @@
namespace Ingen {
namespace Shared {
-AtomReader::AtomReader(LV2URIMap& map, URIs& uris, Forge& forge, Interface& iface)
+AtomReader::AtomReader(URIMap& map, URIs& uris, Forge& forge, Interface& iface)
: _map(map)
, _uris(uris)
, _forge(forge)
diff --git a/src/shared/AtomWriter.cpp b/src/shared/AtomWriter.cpp
index 8d88ef11..ab65f435 100644
--- a/src/shared/AtomWriter.cpp
+++ b/src/shared/AtomWriter.cpp
@@ -16,6 +16,7 @@
#include "ingen/shared/AtomSink.hpp"
#include "ingen/shared/AtomWriter.hpp"
+#include "ingen/shared/URIMap.hpp"
#include "raul/Path.hpp"
#include "serd/serd.h"
@@ -40,7 +41,7 @@ forge_deref(LV2_Atom_Forge_Sink_Handle handle, LV2_Atom_Forge_Ref ref)
return (LV2_Atom*)(chunk->buf + ref - 1);
}
-AtomWriter::AtomWriter(LV2URIMap& map, URIs& uris, AtomSink& sink)
+AtomWriter::AtomWriter(URIMap& map, URIs& uris, AtomSink& sink)
: _map(map)
, _uris(uris)
, _sink(sink)
diff --git a/src/shared/Builder.cpp b/src/shared/Builder.cpp
index 272a3394..b0f095ca 100644
--- a/src/shared/Builder.cpp
+++ b/src/shared/Builder.cpp
@@ -14,18 +14,16 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "raul/Atom.hpp"
-#include "raul/Path.hpp"
-
-#include "ingen/Interface.hpp"
#include "ingen/Connection.hpp"
+#include "ingen/Interface.hpp"
#include "ingen/Node.hpp"
#include "ingen/Patch.hpp"
#include "ingen/Plugin.hpp"
#include "ingen/Port.hpp"
#include "ingen/shared/Builder.hpp"
-#include "ingen/shared/LV2URIMap.hpp"
#include "ingen/shared/URIs.hpp"
+#include "raul/Atom.hpp"
+#include "raul/Path.hpp"
using namespace std;
using namespace Raul;
diff --git a/src/shared/Forge.cpp b/src/shared/Forge.cpp
index fc8116c6..c481b50e 100644
--- a/src/shared/Forge.cpp
+++ b/src/shared/Forge.cpp
@@ -17,11 +17,12 @@
#include <sstream>
#include "ingen/shared/Forge.hpp"
+#include "ingen/shared/URIMap.hpp"
#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
namespace Ingen {
-Forge::Forge(Shared::LV2URIMap& map)
+Forge::Forge(Shared::URIMap& map)
{
Int = map.map_uri(LV2_ATOM__Int);
Float = map.map_uri(LV2_ATOM__Float);
diff --git a/src/shared/LV2Features.cpp b/src/shared/LV2Features.cpp
index 0b1b7b3c..1bfd3936 100644
--- a/src/shared/LV2Features.cpp
+++ b/src/shared/LV2Features.cpp
@@ -17,7 +17,7 @@
#include <cstdlib>
#include "ingen/shared/LV2Features.hpp"
-#include "ingen/shared/LV2URIMap.hpp"
+#include "ingen/shared/URIMap.hpp"
using namespace std;
diff --git a/src/shared/ResourceImpl.cpp b/src/shared/ResourceImpl.cpp
index 5ec07b13..9bf7384e 100644
--- a/src/shared/ResourceImpl.cpp
+++ b/src/shared/ResourceImpl.cpp
@@ -14,11 +14,10 @@
along with Ingen. If not, see <http://www.gnu.org/licenses/>.
*/
-#include "raul/log.hpp"
-#include "raul/Atom.hpp"
-#include "ingen/shared/LV2URIMap.hpp"
#include "ingen/shared/ResourceImpl.hpp"
#include "ingen/shared/URIs.hpp"
+#include "raul/Atom.hpp"
+#include "raul/log.hpp"
using namespace std;
using namespace Raul;
diff --git a/src/shared/LV2URIMap.cpp b/src/shared/URIMap.cpp
index dae8bd69..144941e9 100644
--- a/src/shared/LV2URIMap.cpp
+++ b/src/shared/URIMap.cpp
@@ -23,7 +23,7 @@
#include <boost/shared_ptr.hpp>
-#include "ingen/shared/LV2URIMap.hpp"
+#include "ingen/shared/URIMap.hpp"
#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
#include "raul/log.hpp"
@@ -33,14 +33,14 @@ using namespace Raul;
namespace Ingen {
namespace Shared {
-LV2URIMap::LV2URIMap(LV2_URID_Map* map, LV2_URID_Unmap* unmap)
+URIMap::URIMap(LV2_URID_Map* map, LV2_URID_Unmap* unmap)
: _urid_map_feature(new URIDMapFeature(this, map))
, _urid_unmap_feature(new URIDUnmapFeature(this, unmap))
{
}
-LV2URIMap::URIDMapFeature::URIDMapFeature(LV2URIMap* map,
- LV2_URID_Map* impl)
+URIMap::URIDMapFeature::URIDMapFeature(URIMap* map,
+ LV2_URID_Map* impl)
: Feature(LV2_URID__map, &urid_map)
{
if (impl) {
@@ -52,20 +52,20 @@ LV2URIMap::URIDMapFeature::URIDMapFeature(LV2URIMap* map,
}
LV2_URID
-LV2URIMap::URIDMapFeature::default_map(LV2_URID_Map_Handle handle,
- const char* uri)
+URIMap::URIDMapFeature::default_map(LV2_URID_Map_Handle handle,
+ const char* uri)
{
return static_cast<LV2_URID>(g_quark_from_string(uri));
}
LV2_URID
-LV2URIMap::URIDMapFeature::map(const char* uri)
+URIMap::URIDMapFeature::map(const char* uri)
{
return urid_map.map(urid_map.handle, uri);
}
-LV2URIMap::URIDUnmapFeature::URIDUnmapFeature(LV2URIMap* map,
- LV2_URID_Unmap* impl)
+URIMap::URIDUnmapFeature::URIDUnmapFeature(URIMap* map,
+ LV2_URID_Unmap* impl)
: Feature(LV2_URID__unmap, &urid_unmap)
{
if (impl) {
@@ -77,26 +77,26 @@ LV2URIMap::URIDUnmapFeature::URIDUnmapFeature(LV2URIMap* map,
}
const char*
-LV2URIMap::URIDUnmapFeature::default_unmap(LV2_URID_Unmap_Handle handle,
- LV2_URID urid)
+URIMap::URIDUnmapFeature::default_unmap(LV2_URID_Unmap_Handle handle,
+ LV2_URID urid)
{
return g_quark_to_string(urid);
}
const char*
-LV2URIMap::URIDUnmapFeature::unmap(LV2_URID urid)
+URIMap::URIDUnmapFeature::unmap(LV2_URID urid)
{
return urid_unmap.unmap(urid_unmap.handle, urid);
}
uint32_t
-LV2URIMap::map_uri(const char* uri)
+URIMap::map_uri(const char* uri)
{
return _urid_map_feature->map(uri);
}
const char*
-LV2URIMap::unmap_uri(uint32_t urid)
+URIMap::unmap_uri(uint32_t urid)
{
return _urid_unmap_feature->unmap(urid);
}
diff --git a/src/shared/URIs.cpp b/src/shared/URIs.cpp
index 058e4216..56189ed5 100644
--- a/src/shared/URIs.cpp
+++ b/src/shared/URIs.cpp
@@ -23,11 +23,12 @@
#include <boost/shared_ptr.hpp>
+#include "ingen/shared/URIMap.hpp"
#include "ingen/shared/URIs.hpp"
-#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
#include "lv2/lv2plug.in/ns/ext/atom/atom.h"
#include "lv2/lv2plug.in/ns/ext/midi/midi.h"
#include "lv2/lv2plug.in/ns/ext/patch/patch.h"
+#include "lv2/lv2plug.in/ns/lv2core/lv2.h"
#include "raul/log.hpp"
using namespace std;
@@ -36,7 +37,7 @@ using namespace Raul;
namespace Ingen {
namespace Shared {
-URIs::Quark::Quark(Ingen::Forge& forge, LV2URIMap* map, const char* c_str)
+URIs::Quark::Quark(Ingen::Forge& forge, URIMap* map, const char* c_str)
: Raul::URI(c_str)
, id(map->map_uri(c_str))
, atom(forge.alloc_uri(c_str))
@@ -47,7 +48,7 @@ URIs::Quark::Quark(Ingen::Forge& forge, LV2URIMap* map, const char* c_str)
#define NS_RDF "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
#define NS_RDFS "http://www.w3.org/2000/01/rdf-schema#"
-URIs::URIs(Ingen::Forge& f, LV2URIMap* map)
+URIs::URIs(Ingen::Forge& f, URIMap* map)
: forge(f)
, atom_AtomPort (forge, map, LV2_ATOM__AtomPort)
, atom_Blank (forge, map, LV2_ATOM__Blank)
diff --git a/src/shared/World.cpp b/src/shared/World.cpp
index d2d5f74c..1d47100a 100644
--- a/src/shared/World.cpp
+++ b/src/shared/World.cpp
@@ -31,7 +31,7 @@
#include "ingen/shared/World.hpp"
#include "ingen/shared/runtime_paths.hpp"
#include "ingen/shared/LV2Features.hpp"
-#include "ingen/shared/LV2URIMap.hpp"
+#include "ingen/shared/URIMap.hpp"
#include "ingen/shared/URIs.hpp"
#define LOG(s) s << "[Module] "
@@ -109,14 +109,14 @@ public:
, conf(conf)
, lv2_features(NULL)
, rdf_world(new Sord::World())
- , lv2_uri_map(new Ingen::Shared::LV2URIMap(map, unmap))
- , forge(new Ingen::Forge(*lv2_uri_map))
- , uris(new Shared::URIs(*forge, lv2_uri_map.get()))
+ , uri_map(new Ingen::Shared::URIMap(map, unmap))
+ , forge(new Ingen::Forge(*uri_map))
+ , uris(new Shared::URIs(*forge, uri_map.get()))
, lilv_world(lilv_world_new())
{
lv2_features = new Ingen::Shared::LV2Features();
- lv2_features->add_feature(lv2_uri_map->urid_map_feature());
- lv2_features->add_feature(lv2_uri_map->urid_unmap_feature());
+ lv2_features->add_feature(uri_map->urid_map_feature());
+ lv2_features->add_feature(uri_map->urid_unmap_feature());
lilv_world_load_all(lilv_world);
// Set up RDF namespaces
@@ -173,7 +173,7 @@ public:
Raul::Configuration* conf;
LV2Features* lv2_features;
Sord::World* rdf_world;
- SharedPtr<LV2URIMap> lv2_uri_map;
+ SharedPtr<URIMap> uri_map;
Ingen::Forge* forge;
SharedPtr<URIs> uris;
SharedPtr<Interface> engine;
@@ -218,10 +218,10 @@ Raul::Configuration* World::conf() { return _impl->conf;
Ingen::Forge& World::forge() { return *_impl->forge; }
LV2Features* World::lv2_features() { return _impl->lv2_features; }
-LilvWorld* World::lilv_world() { return _impl->lilv_world; }
-Sord::World* World::rdf_world() { return _impl->rdf_world; }
-SharedPtr<URIs> World::uris() { return _impl->uris; }
-SharedPtr<LV2URIMap> World::lv2_uri_map() { return _impl->lv2_uri_map; }
+LilvWorld* World::lilv_world() { return _impl->lilv_world; }
+Sord::World* World::rdf_world() { return _impl->rdf_world; }
+SharedPtr<URIs> World::uris() { return _impl->uris; }
+SharedPtr<URIMap> World::uri_map() { return _impl->uri_map; }
/** Load an Ingen module.
* @return true on success, false on failure
diff --git a/src/shared/wscript b/src/shared/wscript
index 3a122306..15e6097e 100644
--- a/src/shared/wscript
+++ b/src/shared/wscript
@@ -20,10 +20,10 @@ def build(bld):
Configuration.cpp
Forge.cpp
LV2Features.cpp
- LV2URIMap.cpp
Module.cpp
ResourceImpl.cpp
Store.cpp
+ URIMap.cpp
URIs.cpp
World.cpp
runtime_paths.cpp