diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-03-03 09:01:05 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-03-03 09:01:05 +0100 |
commit | 4d9746c828558c9f872e0aed52442863affb25d5 (patch) | |
tree | 507d7c2ba67f47d3cbbcf01a722236ff1b48426b /common/facade.h | |
parent | 9cea920b7dd51867a0be0fed2f461b6be73c103e (diff) | |
download | sink-4d9746c828558c9f872e0aed52442863affb25d5.tar.gz sink-4d9746c828558c9f872e0aed52442863affb25d5.zip |
Fromatted the whole codebase with clang-format.
clang-format -i */**{.cpp,.h}
Diffstat (limited to 'common/facade.h')
-rw-r--r-- | common/facade.h | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/common/facade.h b/common/facade.h index 99fbcdc..a24ac7a 100644 --- a/common/facade.h +++ b/common/facade.h | |||
@@ -33,8 +33,9 @@ namespace Sink { | |||
33 | 33 | ||
34 | /** | 34 | /** |
35 | * Default facade implementation for resources that are implemented in a separate process using the ResourceAccess class. | 35 | * Default facade implementation for resources that are implemented in a separate process using the ResourceAccess class. |
36 | * | 36 | * |
37 | * Ideally a basic resource has no implementation effort for the facades and can simply instanciate default implementations (meaning it only has to implement the factory with all supported types). | 37 | * Ideally a basic resource has no implementation effort for the facades and can simply instanciate default implementations (meaning it only has to implement the factory with all |
38 | * supported types). | ||
38 | * A resource has to implement: | 39 | * A resource has to implement: |
39 | * * A facade factory registering all available facades | 40 | * * A facade factory registering all available facades |
40 | * * An adaptor factory if it uses special resource buffers (default implementation can be used otherwise) | 41 | * * An adaptor factory if it uses special resource buffers (default implementation can be used otherwise) |
@@ -43,16 +44,17 @@ namespace Sink { | |||
43 | * Additionally a resource only has to provide a synchronizer plugin to execute the synchronization | 44 | * Additionally a resource only has to provide a synchronizer plugin to execute the synchronization |
44 | */ | 45 | */ |
45 | template <typename DomainType> | 46 | template <typename DomainType> |
46 | class SINK_EXPORT GenericFacade: public Sink::StoreFacade<DomainType> | 47 | class SINK_EXPORT GenericFacade : public Sink::StoreFacade<DomainType> |
47 | { | 48 | { |
48 | public: | 49 | public: |
49 | /** | 50 | /** |
50 | * Create a new GenericFacade | 51 | * Create a new GenericFacade |
51 | * | 52 | * |
52 | * @param resourceIdentifier is the identifier of the resource instance | 53 | * @param resourceIdentifier is the identifier of the resource instance |
53 | * @param adaptorFactory is the adaptor factory used to generate the mappings from domain to resource types and vice versa | 54 | * @param adaptorFactory is the adaptor factory used to generate the mappings from domain to resource types and vice versa |
54 | */ | 55 | */ |
55 | GenericFacade(const QByteArray &resourceIdentifier, const DomainTypeAdaptorFactoryInterface::Ptr &adaptorFactory = DomainTypeAdaptorFactoryInterface::Ptr(), const QSharedPointer<Sink::ResourceAccessInterface> resourceAccess = QSharedPointer<Sink::ResourceAccessInterface>()); | 56 | GenericFacade(const QByteArray &resourceIdentifier, const DomainTypeAdaptorFactoryInterface::Ptr &adaptorFactory = DomainTypeAdaptorFactoryInterface::Ptr(), |
57 | const QSharedPointer<Sink::ResourceAccessInterface> resourceAccess = QSharedPointer<Sink::ResourceAccessInterface>()); | ||
56 | ~GenericFacade(); | 58 | ~GenericFacade(); |
57 | 59 | ||
58 | static QByteArray bufferTypeForDomainType(); | 60 | static QByteArray bufferTypeForDomainType(); |
@@ -63,10 +65,9 @@ public: | |||
63 | 65 | ||
64 | protected: | 66 | protected: |
65 | std::function<void(Sink::ApplicationDomain::ApplicationDomainType &domainObject)> mResultTransformation; | 67 | std::function<void(Sink::ApplicationDomain::ApplicationDomainType &domainObject)> mResultTransformation; |
66 | //TODO use one resource access instance per application & per resource | 68 | // TODO use one resource access instance per application & per resource |
67 | QSharedPointer<Sink::ResourceAccessInterface> mResourceAccess; | 69 | QSharedPointer<Sink::ResourceAccessInterface> mResourceAccess; |
68 | DomainTypeAdaptorFactoryInterface::Ptr mDomainTypeAdaptorFactory; | 70 | DomainTypeAdaptorFactoryInterface::Ptr mDomainTypeAdaptorFactory; |
69 | QByteArray mResourceInstanceIdentifier; | 71 | QByteArray mResourceInstanceIdentifier; |
70 | }; | 72 | }; |
71 | |||
72 | } | 73 | } |