summaryrefslogtreecommitdiffstats
path: root/common/pipeline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'common/pipeline.cpp')
-rw-r--r--common/pipeline.cpp11
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
312Preprocessor::Preprocessor() : d(new Preprocessor::Private) 313Preprocessor::Preprocessor() : d(new Preprocessor::Private)
@@ -317,11 +318,12 @@ Preprocessor::~Preprocessor()
317{ 318{
318} 319}
319 320
320void Preprocessor::setup(const QByteArray &resourceType, const QByteArray &resourceInstanceIdentifier, Pipeline *pipeline) 321void 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
327void Preprocessor::startBatch() 329void Preprocessor::startBatch()
@@ -337,6 +339,11 @@ QByteArray Preprocessor::resourceInstanceIdentifier() const
337 return d->resourceInstanceIdentifier; 339 return d->resourceInstanceIdentifier;
338} 340}
339 341
342Storage::EntityStore &Preprocessor::entityStore() const
343{
344 return *d->entityStore;
345}
346
340void Preprocessor::createEntity(const Sink::ApplicationDomain::ApplicationDomainType &entity, const QByteArray &typeName) 347void Preprocessor::createEntity(const Sink::ApplicationDomain::ApplicationDomainType &entity, const QByteArray &typeName)
341{ 348{
342 flatbuffers::FlatBufferBuilder entityFbb; 349 flatbuffers::FlatBufferBuilder entityFbb;