summaryrefslogtreecommitdiffstats
path: root/common/domain/applicationdomaintype.h
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-06 22:52:14 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-06-06 22:52:14 +0200
commit16d4e7fcbe4e7817b4cbe4f7d2644520e1af1658 (patch)
tree4874e8c279db554d32576f8a2f3b1c3ac2afcc93 /common/domain/applicationdomaintype.h
parent87994d1fe5fc77bb5fbbe98cea8e2b8e37a1c45f (diff)
downloadsink-16d4e7fcbe4e7817b4cbe4f7d2644520e1af1658.tar.gz
sink-16d4e7fcbe4e7817b4cbe4f7d2644520e1af1658.zip
Avoid extra dependency in public header.
Diffstat (limited to 'common/domain/applicationdomaintype.h')
-rw-r--r--common/domain/applicationdomaintype.h7
1 files changed, 4 insertions, 3 deletions
diff --git a/common/domain/applicationdomaintype.h b/common/domain/applicationdomaintype.h
index a41882d..b011eb5 100644
--- a/common/domain/applicationdomaintype.h
+++ b/common/domain/applicationdomaintype.h
@@ -27,7 +27,6 @@
27#include <QDebug> 27#include <QDebug>
28#include <QUuid> 28#include <QUuid>
29#include "bufferadaptor.h" 29#include "bufferadaptor.h"
30#include "storage.h" //for generateUid()
31 30
32#define SINK_ENTITY(TYPE) \ 31#define SINK_ENTITY(TYPE) \
33 typedef QSharedPointer<TYPE> Ptr; \ 32 typedef QSharedPointer<TYPE> Ptr; \
@@ -102,11 +101,13 @@ public:
102 return QSharedPointer<DomainType>::create(domainType.mResourceInstanceIdentifier, QByteArray(domainType.mIdentifier.constData(), domainType.mIdentifier.size()), domainType.mRevision, memoryAdaptor); 101 return QSharedPointer<DomainType>::create(domainType.mResourceInstanceIdentifier, QByteArray(domainType.mIdentifier.constData(), domainType.mIdentifier.size()), domainType.mRevision, memoryAdaptor);
103 } 102 }
104 103
104 static QByteArray generateUid();
105
105 template <class DomainType> 106 template <class DomainType>
106 static DomainType createEntity() 107 static DomainType createEntity()
107 { 108 {
108 DomainType object; 109 DomainType object;
109 object.mIdentifier = Sink::Storage::generateUid(); 110 object.mIdentifier = generateUid();
110 return object; 111 return object;
111 } 112 }
112 113
@@ -114,7 +115,7 @@ public:
114 static DomainType createEntity(const QByteArray &resourceInstanceIdentifier) 115 static DomainType createEntity(const QByteArray &resourceInstanceIdentifier)
115 { 116 {
116 DomainType object(resourceInstanceIdentifier); 117 DomainType object(resourceInstanceIdentifier);
117 object.mIdentifier = Sink::Storage::generateUid(); 118 object.mIdentifier = generateUid();
118 return object; 119 return object;
119 } 120 }
120 121