diff options
Diffstat (limited to 'common/domainadaptor.h')
-rw-r--r-- | common/domainadaptor.h | 16 |
1 files changed, 3 insertions, 13 deletions
diff --git a/common/domainadaptor.h b/common/domainadaptor.h index 70c3a42..c9a3a01 100644 --- a/common/domainadaptor.h +++ b/common/domainadaptor.h | |||
@@ -25,7 +25,6 @@ | |||
25 | #include <functional> | 25 | #include <functional> |
26 | #include "clientapi.h" //for domain parts | 26 | #include "clientapi.h" //for domain parts |
27 | 27 | ||
28 | #include "event_generated.h" | ||
29 | #include "entity_generated.h" | 28 | #include "entity_generated.h" |
30 | #include "metadata_generated.h" | 29 | #include "metadata_generated.h" |
31 | #include "entitybuffer.h" | 30 | #include "entitybuffer.h" |
@@ -103,17 +102,6 @@ public: | |||
103 | QSharedPointer<ReadPropertyMapper<ResourceBuffer> > mResourceMapper; | 102 | QSharedPointer<ReadPropertyMapper<ResourceBuffer> > mResourceMapper; |
104 | }; | 103 | }; |
105 | 104 | ||
106 | /** | ||
107 | * Initializes the local property mapper. | ||
108 | * | ||
109 | * Provide an implementation for each application domain type. | ||
110 | */ | ||
111 | template <class T> | ||
112 | QSharedPointer<ReadPropertyMapper<T> > initializeReadPropertyMapper(); | ||
113 | |||
114 | template <class T> | ||
115 | QSharedPointer<WritePropertyMapper<T> > initializeWritePropertyMapper(); | ||
116 | |||
117 | template<typename DomainType> | 105 | template<typename DomainType> |
118 | class DomainTypeAdaptorFactoryInterface | 106 | class DomainTypeAdaptorFactoryInterface |
119 | { | 107 | { |
@@ -128,9 +116,11 @@ public: | |||
128 | * It defines how values are split accross local and resource buffer. | 116 | * It defines how values are split accross local and resource buffer. |
129 | * This is required by the facade the read the value, and by the pipeline preprocessors to access the domain values in a generic way. | 117 | * This is required by the facade the read the value, and by the pipeline preprocessors to access the domain values in a generic way. |
130 | */ | 118 | */ |
131 | template<typename DomainType, typename LocalBuffer, typename ResourceBuffer, typename LocalBuilder, typename ResourceBuilder> | 119 | template<typename DomainType, typename ResourceBuffer, typename ResourceBuilder> |
132 | class DomainTypeAdaptorFactory : public DomainTypeAdaptorFactoryInterface<DomainType> | 120 | class DomainTypeAdaptorFactory : public DomainTypeAdaptorFactoryInterface<DomainType> |
133 | { | 121 | { |
122 | typedef typename Akonadi2::ApplicationDomain::TypeImplementation<DomainType>::Buffer LocalBuffer; | ||
123 | typedef typename Akonadi2::ApplicationDomain::TypeImplementation<DomainType>::BufferBuilder LocalBuilder; | ||
134 | public: | 124 | public: |
135 | DomainTypeAdaptorFactory() : | 125 | DomainTypeAdaptorFactory() : |
136 | mLocalMapper(Akonadi2::ApplicationDomain::TypeImplementation<DomainType>::initializeReadPropertyMapper()), | 126 | mLocalMapper(Akonadi2::ApplicationDomain::TypeImplementation<DomainType>::initializeReadPropertyMapper()), |