diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-05-10 14:26:33 +0200 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-05-10 14:26:33 +0200 |
commit | 9e002cca99ad176fd9168123955cc0779a4e1237 (patch) | |
tree | 41dad7b73563693559670f3fd25261c520186b89 /examples/dummyresource/domainadaptor.cpp | |
parent | ef91fc2c1fef8ed409aa60429afb4867d0dec568 (diff) | |
download | sink-9e002cca99ad176fd9168123955cc0779a4e1237.tar.gz sink-9e002cca99ad176fd9168123955cc0779a4e1237.zip |
Property definitions
Instead of hardcoding assumptions all over the place we create typesafe
setters and getters for all properties.
Diffstat (limited to 'examples/dummyresource/domainadaptor.cpp')
-rw-r--r-- | examples/dummyresource/domainadaptor.cpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/dummyresource/domainadaptor.cpp b/examples/dummyresource/domainadaptor.cpp index 839c4a7..dcc08c7 100644 --- a/examples/dummyresource/domainadaptor.cpp +++ b/examples/dummyresource/domainadaptor.cpp | |||
@@ -20,6 +20,7 @@ | |||
20 | #include "domainadaptor.h" | 20 | #include "domainadaptor.h" |
21 | 21 | ||
22 | #include "dummycalendar_generated.h" | 22 | #include "dummycalendar_generated.h" |
23 | #include "applicationdomaintype.h" | ||
23 | 24 | ||
24 | using namespace DummyCalendar; | 25 | using namespace DummyCalendar; |
25 | using namespace flatbuffers; | 26 | using namespace flatbuffers; |
@@ -28,10 +29,8 @@ DummyEventAdaptorFactory::DummyEventAdaptorFactory() | |||
28 | : DomainTypeAdaptorFactory() | 29 | : DomainTypeAdaptorFactory() |
29 | { | 30 | { |
30 | //TODO turn this into initializeReadPropertyMapper as well? | 31 | //TODO turn this into initializeReadPropertyMapper as well? |
31 | mResourceMapper->addMapping<QString, DummyEvent>("summary", &DummyEvent::summary); | 32 | mResourceMapper->addMapping<Sink::ApplicationDomain::Event::Summary, DummyEvent>(&DummyEvent::summary); |
32 | mResourceMapper->addMapping<QString, DummyEvent>("remoteId", &DummyEvent::remoteId); | 33 | mResourceWriteMapper->addMapping<Sink::ApplicationDomain::Event::Summary>(&DummyEventBuilder::add_summary); |
33 | mResourceWriteMapper->addMapping<QString>("summary", &DummyEventBuilder::add_summary); | ||
34 | mResourceWriteMapper->addMapping<QString>("remoteId", &DummyEventBuilder::add_remoteId); | ||
35 | } | 34 | } |
36 | 35 | ||
37 | DummyMailAdaptorFactory::DummyMailAdaptorFactory() | 36 | DummyMailAdaptorFactory::DummyMailAdaptorFactory() |