diff options
Diffstat (limited to 'common/pipeline.cpp')
-rw-r--r-- | common/pipeline.cpp | 11 |
1 files changed, 9 insertions, 2 deletions
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 QVector<Preproc | |||
73 | auto &list = d->processors[entityType]; | 73 | auto &list = d->processors[entityType]; |
74 | list.clear(); | 74 | list.clear(); |
75 | for (auto p : processors) { | 75 | for (auto p : processors) { |
76 | p->setup(d->resourceContext.resourceType, d->resourceContext.instanceId(), this); | 76 | p->setup(d->resourceContext.resourceType, d->resourceContext.instanceId(), this, &d->entityStore); |
77 | list.append(QSharedPointer<Preprocessor>(p)); | 77 | list.append(QSharedPointer<Preprocessor>(p)); |
78 | } | 78 | } |
79 | } | 79 | } |
@@ -307,6 +307,7 @@ public: | |||
307 | QByteArray resourceType; | 307 | QByteArray resourceType; |
308 | QByteArray resourceInstanceIdentifier; | 308 | QByteArray resourceInstanceIdentifier; |
309 | Pipeline *pipeline; | 309 | Pipeline *pipeline; |
310 | Storage::EntityStore *entityStore; | ||
310 | }; | 311 | }; |
311 | 312 | ||
312 | Preprocessor::Preprocessor() : d(new Preprocessor::Private) | 313 | Preprocessor::Preprocessor() : d(new Preprocessor::Private) |
@@ -317,11 +318,12 @@ Preprocessor::~Preprocessor() | |||
317 | { | 318 | { |
318 | } | 319 | } |
319 | 320 | ||
320 | void Preprocessor::setup(const QByteArray &resourceType, const QByteArray &resourceInstanceIdentifier, Pipeline *pipeline) | 321 | void Preprocessor::setup(const QByteArray &resourceType, const QByteArray &resourceInstanceIdentifier, Pipeline *pipeline, Storage::EntityStore *entityStore) |
321 | { | 322 | { |
322 | d->resourceType = resourceType; | 323 | d->resourceType = resourceType; |
323 | d->resourceInstanceIdentifier = resourceInstanceIdentifier; | 324 | d->resourceInstanceIdentifier = resourceInstanceIdentifier; |
324 | d->pipeline = pipeline; | 325 | d->pipeline = pipeline; |
326 | d->entityStore = entityStore; | ||
325 | } | 327 | } |
326 | 328 | ||
327 | void Preprocessor::startBatch() | 329 | void Preprocessor::startBatch() |
@@ -337,6 +339,11 @@ QByteArray Preprocessor::resourceInstanceIdentifier() const | |||
337 | return d->resourceInstanceIdentifier; | 339 | return d->resourceInstanceIdentifier; |
338 | } | 340 | } |
339 | 341 | ||
342 | Storage::EntityStore &Preprocessor::entityStore() const | ||
343 | { | ||
344 | return *d->entityStore; | ||
345 | } | ||
346 | |||
340 | void Preprocessor::createEntity(const Sink::ApplicationDomain::ApplicationDomainType &entity, const QByteArray &typeName) | 347 | void Preprocessor::createEntity(const Sink::ApplicationDomain::ApplicationDomainType &entity, const QByteArray &typeName) |
341 | { | 348 | { |
342 | flatbuffers::FlatBufferBuilder entityFbb; | 349 | flatbuffers::FlatBufferBuilder entityFbb; |