diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-22 18:22:39 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-12-22 18:22:39 +0100 |
commit | b2ad8f785e801a35cadf254d827f56d648be510c (patch) | |
tree | 4eeb1e3eefb02c40dac40469c0fae5ad91feb3e3 /common/facadeinterface.h | |
parent | 1fe8664ec74165fc3f250098609ea0e049e3adc8 (diff) | |
download | sink-b2ad8f785e801a35cadf254d827f56d648be510c.tar.gz sink-b2ad8f785e801a35cadf254d827f56d648be510c.zip |
Introduced Log::Context
To have hierarchical debug output we have to pass around something at
run-time, there is no reasonable alternative. Log::Context provides the
identifier to do just that and largely replaces the debug component
idea.
Diffstat (limited to 'common/facadeinterface.h')
-rw-r--r-- | common/facadeinterface.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/common/facadeinterface.h b/common/facadeinterface.h index 5d12360..26a8407 100644 --- a/common/facadeinterface.h +++ b/common/facadeinterface.h | |||
@@ -29,6 +29,9 @@ | |||
29 | 29 | ||
30 | namespace Sink { | 30 | namespace Sink { |
31 | class Query; | 31 | class Query; |
32 | namespace Log { | ||
33 | struct Context; | ||
34 | } | ||
32 | 35 | ||
33 | /** | 36 | /** |
34 | * Interface for the store facade. | 37 | * Interface for the store facade. |
@@ -86,7 +89,7 @@ public: | |||
86 | /** | 89 | /** |
87 | * Load entities from the store. | 90 | * Load entities from the store. |
88 | */ | 91 | */ |
89 | virtual QPair<KAsync::Job<void>, typename Sink::ResultEmitter<typename DomainType::Ptr>::Ptr> load(const Query &query) = 0; | 92 | virtual QPair<KAsync::Job<void>, typename Sink::ResultEmitter<typename DomainType::Ptr>::Ptr> load(const Query &query, const Log::Context &) = 0; |
90 | }; | 93 | }; |
91 | 94 | ||
92 | template <class DomainType> | 95 | template <class DomainType> |
@@ -119,7 +122,7 @@ public: | |||
119 | return KAsync::error<void>(-1, "Failed to create a facade"); | 122 | return KAsync::error<void>(-1, "Failed to create a facade"); |
120 | } | 123 | } |
121 | 124 | ||
122 | QPair<KAsync::Job<void>, typename Sink::ResultEmitter<typename DomainType::Ptr>::Ptr> load(const Query &query) | 125 | QPair<KAsync::Job<void>, typename Sink::ResultEmitter<typename DomainType::Ptr>::Ptr> load(const Query &query, const Log::Context &) |
123 | { | 126 | { |
124 | return qMakePair(KAsync::null<void>(), typename Sink::ResultEmitter<typename DomainType::Ptr>::Ptr()); | 127 | return qMakePair(KAsync::null<void>(), typename Sink::ResultEmitter<typename DomainType::Ptr>::Ptr()); |
125 | } | 128 | } |