summaryrefslogtreecommitdiffstats
path: root/common/facade.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-02-05 17:14:29 +0100
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-02-05 17:14:29 +0100
commitb9a79ed514e7ab6bab0d6dedfcb9a78387d2b7c1 (patch)
treef3b51a296dd09ca0c0cd78c880c893de315a5a59 /common/facade.h
parent36a742c33f0a3144ed8d5dbaf56d7b4ef4e4e3d3 (diff)
downloadsink-b9a79ed514e7ab6bab0d6dedfcb9a78387d2b7c1.tar.gz
sink-b9a79ed514e7ab6bab0d6dedfcb9a78387d2b7c1.zip
Support result property transformations
This can be used to modify each result before reporting it to the client. Alternatively this could also be done in the DomainTypeAdaptor, which would perhaps be the cleaner solution...
Diffstat (limited to 'common/facade.h')
-rw-r--r--common/facade.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/common/facade.h b/common/facade.h
index 71451e2..914b6fc 100644
--- a/common/facade.h
+++ b/common/facade.h
@@ -60,9 +60,10 @@ public:
60 KAsync::Job<void> create(const DomainType &domainObject) Q_DECL_OVERRIDE; 60 KAsync::Job<void> create(const DomainType &domainObject) Q_DECL_OVERRIDE;
61 KAsync::Job<void> modify(const DomainType &domainObject) Q_DECL_OVERRIDE; 61 KAsync::Job<void> modify(const DomainType &domainObject) Q_DECL_OVERRIDE;
62 KAsync::Job<void> remove(const DomainType &domainObject) Q_DECL_OVERRIDE; 62 KAsync::Job<void> remove(const DomainType &domainObject) Q_DECL_OVERRIDE;
63 QPair<KAsync::Job<void>, typename ResultEmitter<typename DomainType::Ptr>::Ptr> load(const Sink::Query &query) Q_DECL_OVERRIDE; 63 virtual QPair<KAsync::Job<void>, typename ResultEmitter<typename DomainType::Ptr>::Ptr> load(const Sink::Query &query) Q_DECL_OVERRIDE;
64 64
65protected: 65protected:
66 std::function<void(Sink::ApplicationDomain::ApplicationDomainType &domainObject)> mResultTransformation;
66 //TODO use one resource access instance per application & per resource 67 //TODO use one resource access instance per application & per resource
67 QSharedPointer<Sink::ResourceAccessInterface> mResourceAccess; 68 QSharedPointer<Sink::ResourceAccessInterface> mResourceAccess;
68 DomainTypeAdaptorFactoryInterface::Ptr mDomainTypeAdaptorFactory; 69 DomainTypeAdaptorFactoryInterface::Ptr mDomainTypeAdaptorFactory;