diff options
Diffstat (limited to 'common/facadefactory.h')
-rw-r--r-- | common/facadefactory.h | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/common/facadefactory.h b/common/facadefactory.h index 7313970..8d41705 100644 --- a/common/facadefactory.h +++ b/common/facadefactory.h | |||
@@ -29,6 +29,7 @@ | |||
29 | 29 | ||
30 | #include "facadeinterface.h" | 30 | #include "facadeinterface.h" |
31 | #include "applicationdomaintype.h" | 31 | #include "applicationdomaintype.h" |
32 | #include "resourcecontext.h" | ||
32 | #include "log.h" | 33 | #include "log.h" |
33 | 34 | ||
34 | namespace Sink { | 35 | namespace Sink { |
@@ -41,7 +42,7 @@ namespace Sink { | |||
41 | class SINK_EXPORT FacadeFactory | 42 | class SINK_EXPORT FacadeFactory |
42 | { | 43 | { |
43 | public: | 44 | public: |
44 | typedef std::function<std::shared_ptr<void>(const QByteArray &)> FactoryFunction; | 45 | typedef std::function<std::shared_ptr<void>(const ResourceContext &)> FactoryFunction; |
45 | 46 | ||
46 | void registerStaticFacades(); | 47 | void registerStaticFacades(); |
47 | 48 | ||
@@ -52,13 +53,13 @@ public: | |||
52 | template <class DomainType, class Facade> | 53 | template <class DomainType, class Facade> |
53 | void registerFacade(const QByteArray &resource) | 54 | void registerFacade(const QByteArray &resource) |
54 | { | 55 | { |
55 | registerFacade(resource, [](const QByteArray &instanceIdentifier) { return std::make_shared<Facade>(instanceIdentifier); }, ApplicationDomain::getTypeName<DomainType>()); | 56 | registerFacade(resource, [](const ResourceContext &context) { return std::make_shared<Facade>(context); }, ApplicationDomain::getTypeName<DomainType>()); |
56 | } | 57 | } |
57 | 58 | ||
58 | template <class DomainType, class Facade> | 59 | template <class DomainType, class Facade> |
59 | void registerFacade() | 60 | void registerFacade() |
60 | { | 61 | { |
61 | registerFacade(QByteArray(), [](const QByteArray &) { return std::make_shared<Facade>(); }, ApplicationDomain::getTypeName<DomainType>()); | 62 | registerFacade(QByteArray(), [](const ResourceContext &) { return std::make_shared<Facade>(); }, ApplicationDomain::getTypeName<DomainType>()); |
62 | } | 63 | } |
63 | 64 | ||
64 | /* | 65 | /* |