From 21da1b751d0f55648a7c9dbe71a3cd3440a134f0 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Wed, 19 Oct 2016 15:47:39 +0200 Subject: Fixed specialpurposeprocessor --- common/pipeline.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'common/pipeline.cpp') diff --git a/common/pipeline.cpp b/common/pipeline.cpp index ea59ae9..b1c2c58 100644 --- a/common/pipeline.cpp +++ b/common/pipeline.cpp @@ -73,7 +73,7 @@ void Pipeline::setPreprocessors(const QString &entityType, const QVectorprocessors[entityType]; list.clear(); for (auto p : processors) { - p->setup(d->resourceContext.resourceType, d->resourceContext.instanceId(), this); + p->setup(d->resourceContext.resourceType, d->resourceContext.instanceId(), this, &d->entityStore); list.append(QSharedPointer(p)); } } @@ -307,6 +307,7 @@ public: QByteArray resourceType; QByteArray resourceInstanceIdentifier; Pipeline *pipeline; + Storage::EntityStore *entityStore; }; Preprocessor::Preprocessor() : d(new Preprocessor::Private) @@ -317,11 +318,12 @@ Preprocessor::~Preprocessor() { } -void Preprocessor::setup(const QByteArray &resourceType, const QByteArray &resourceInstanceIdentifier, Pipeline *pipeline) +void Preprocessor::setup(const QByteArray &resourceType, const QByteArray &resourceInstanceIdentifier, Pipeline *pipeline, Storage::EntityStore *entityStore) { d->resourceType = resourceType; d->resourceInstanceIdentifier = resourceInstanceIdentifier; d->pipeline = pipeline; + d->entityStore = entityStore; } void Preprocessor::startBatch() @@ -337,6 +339,11 @@ QByteArray Preprocessor::resourceInstanceIdentifier() const return d->resourceInstanceIdentifier; } +Storage::EntityStore &Preprocessor::entityStore() const +{ + return *d->entityStore; +} + void Preprocessor::createEntity(const Sink::ApplicationDomain::ApplicationDomainType &entity, const QByteArray &typeName) { flatbuffers::FlatBufferBuilder entityFbb; -- cgit v1.2.3