summaryrefslogtreecommitdiff
path: root/project2/compression/decompressStream.cpp
diff options
context:
space:
mode:
authorDan Goodliffe <dan@randomdan.homeip.net>2015-10-02 21:25:12 +0100
committerDan Goodliffe <dan@randomdan.homeip.net>2015-10-02 21:25:12 +0100
commitc9382a9c89ce03f1fcde3fadd294a3938b894e47 (patch)
tree7e5de1834f121b44f2485132741a6b3fe8431129 /project2/compression/decompressStream.cpp
parentCompat fix (diff)
parentBig tidy up of loggers and logger factories (diff)
downloadproject2-c9382a9c89ce03f1fcde3fadd294a3938b894e47.tar.bz2
project2-c9382a9c89ce03f1fcde3fadd294a3938b894e47.tar.xz
project2-c9382a9c89ce03f1fcde3fadd294a3938b894e47.zip
Merge branch 'project2-adhoc-plugins'
Diffstat (limited to 'project2/compression/decompressStream.cpp')
-rw-r--r--project2/compression/decompressStream.cpp9
1 files changed, 3 insertions, 6 deletions
diff --git a/project2/compression/decompressStream.cpp b/project2/compression/decompressStream.cpp
index c1d52ab..7d4023b 100644
--- a/project2/compression/decompressStream.cpp
+++ b/project2/compression/decompressStream.cpp
@@ -1,10 +1,8 @@
#include "stream.h"
-#include "componentLoader.h"
#include "decompressor.h"
#include "scripts.h"
#include "variables.h"
#include "scriptStorage.h"
-#include "instanceStore.impl.h"
class DecompressStream : public Stream {
public:
@@ -12,12 +10,12 @@ class DecompressStream : public Stream {
Stream(p),
method(p, "method")
{
- p->script->loader.addLoadTarget(p, Storer::into<ElementLoader>(&stream));
+ p->script->loader.addLoadTarget(p, Storer::into<StreamFactory>(&stream));
}
void runStream(const Sink & sink, ExecContext * ec) const
{
- DecompressorPtr decomp = DecompressorLoader::getFor(method(ec))->create();
+ DecompressorPtr decomp = DecompressorFactory::createNew(method(ec));
stream->runStream([&](const char * data, size_t len) -> size_t {
decomp->decompress(data, len, sink);
return len;
@@ -28,6 +26,5 @@ class DecompressStream : public Stream {
const Variable method;
};
-DECLARE_LOADER("decompstream", DecompressStream);
-INSTANTIATESTORE(std::string, DecompressorLoader);
+NAMEDFACTORY("decompstream", DecompressStream, StreamFactory);