summaryrefslogtreecommitdiffstats
path: root/src/AtomReader.cpp
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2016-07-29 11:36:17 -0400
committerDavid Robillard <d@drobilla.net>2016-07-29 13:51:35 -0400
commit9ff60e9058080ccbea85eee603642a577dd258cf (patch)
tree728540389e8419c32a96d04b781ee36eb250b902 /src/AtomReader.cpp
parent77c9b5518299ee401e95cb81aaf18a27900341c8 (diff)
downloadingen-9ff60e9058080ccbea85eee603642a577dd258cf.tar.gz
ingen-9ff60e9058080ccbea85eee603642a577dd258cf.tar.bz2
ingen-9ff60e9058080ccbea85eee603642a577dd258cf.zip
Remove Forge dependency from AtomReader
Diffstat (limited to 'src/AtomReader.cpp')
-rw-r--r--src/AtomReader.cpp18
1 files changed, 6 insertions, 12 deletions
diff --git a/src/AtomReader.cpp b/src/AtomReader.cpp
index ef59e1b5..9f0119d5 100644
--- a/src/AtomReader.cpp
+++ b/src/AtomReader.cpp
@@ -25,18 +25,12 @@
namespace Ingen {
-AtomReader::AtomReader(URIMap& map,
- URIs& uris,
- Log& log,
- Forge& forge,
- Interface& iface)
+AtomReader::AtomReader(URIMap& map, URIs& uris, Log& log, Interface& iface)
: _map(map)
, _uris(uris)
, _log(log)
- , _forge(forge)
, _iface(iface)
-{
-}
+{}
void
AtomReader::get_atom(const LV2_Atom* in, Atom& out)
@@ -46,12 +40,12 @@ AtomReader::get_atom(const LV2_Atom* in, Atom& out)
const LV2_Atom_URID* urid = (const LV2_Atom_URID*)in;
const char* uri = _map.unmap_uri(urid->body);
if (uri) {
- out = _forge.make_urid(urid->body);
+ out = Atom(sizeof(int32_t), _uris.atom_URID, &urid->body);
} else {
_log.error(fmt("Unable to unmap URID %1%\n") % urid->body);
}
} else {
- out = _forge.alloc(in->size, in->type, LV2_ATOM_BODY_CONST(in));
+ out = Atom(in->size, in->type, LV2_ATOM_BODY_CONST(in));
}
}
}
@@ -61,8 +55,8 @@ AtomReader::get_props(const LV2_Atom_Object* obj,
Ingen::Resource::Properties& props)
{
if (obj->body.otype) {
- props.insert(std::make_pair(_uris.rdf_type,
- _forge.make_urid(obj->body.otype)));
+ const Atom type(sizeof(int32_t), _uris.atom_URID, &obj->body.otype);
+ props.insert(std::make_pair(_uris.rdf_type, type));
}
LV2_ATOM_OBJECT_FOREACH(obj, p) {
Atom val;