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 /tests/testimplementations.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 'tests/testimplementations.h')
-rw-r--r-- | tests/testimplementations.h | 45 |
1 files changed, 25 insertions, 20 deletions
diff --git a/tests/testimplementations.h b/tests/testimplementations.h index adfdab3..688875d 100644 --- a/tests/testimplementations.h +++ b/tests/testimplementations.h | |||
@@ -28,7 +28,7 @@ | |||
28 | #include <common/genericresource.h> | 28 | #include <common/genericresource.h> |
29 | #include <common/commands.h> | 29 | #include <common/commands.h> |
30 | 30 | ||
31 | //Replace with something different | 31 | // Replace with something different |
32 | #include "event_generated.h" | 32 | #include "event_generated.h" |
33 | #include "mail_generated.h" | 33 | #include "mail_generated.h" |
34 | #include "createentity_generated.h" | 34 | #include "createentity_generated.h" |
@@ -36,37 +36,48 @@ | |||
36 | class TestEventAdaptorFactory : public DomainTypeAdaptorFactory<Sink::ApplicationDomain::Event, Sink::ApplicationDomain::Buffer::Event, Sink::ApplicationDomain::Buffer::EventBuilder> | 36 | class TestEventAdaptorFactory : public DomainTypeAdaptorFactory<Sink::ApplicationDomain::Event, Sink::ApplicationDomain::Buffer::Event, Sink::ApplicationDomain::Buffer::EventBuilder> |
37 | { | 37 | { |
38 | public: | 38 | public: |
39 | TestEventAdaptorFactory() | 39 | TestEventAdaptorFactory() : DomainTypeAdaptorFactory() |
40 | : DomainTypeAdaptorFactory() | ||
41 | { | 40 | { |
42 | } | 41 | } |
43 | 42 | ||
44 | virtual ~TestEventAdaptorFactory() {}; | 43 | virtual ~TestEventAdaptorFactory(){}; |
45 | }; | 44 | }; |
46 | 45 | ||
47 | class TestMailAdaptorFactory : public DomainTypeAdaptorFactory<Sink::ApplicationDomain::Mail, Sink::ApplicationDomain::Buffer::Mail, Sink::ApplicationDomain::Buffer::MailBuilder> | 46 | class TestMailAdaptorFactory : public DomainTypeAdaptorFactory<Sink::ApplicationDomain::Mail, Sink::ApplicationDomain::Buffer::Mail, Sink::ApplicationDomain::Buffer::MailBuilder> |
48 | { | 47 | { |
49 | public: | 48 | public: |
50 | TestMailAdaptorFactory() | 49 | TestMailAdaptorFactory() : DomainTypeAdaptorFactory() |
51 | : DomainTypeAdaptorFactory() | ||
52 | { | 50 | { |
53 | } | 51 | } |
54 | 52 | ||
55 | virtual ~TestMailAdaptorFactory() {}; | 53 | virtual ~TestMailAdaptorFactory(){}; |
56 | }; | 54 | }; |
57 | 55 | ||
58 | class TestResourceAccess : public Sink::ResourceAccessInterface | 56 | class TestResourceAccess : public Sink::ResourceAccessInterface |
59 | { | 57 | { |
60 | Q_OBJECT | 58 | Q_OBJECT |
61 | public: | 59 | public: |
62 | virtual ~TestResourceAccess() {}; | 60 | virtual ~TestResourceAccess(){}; |
63 | KAsync::Job<void> sendCommand(int commandId) Q_DECL_OVERRIDE { return KAsync::null<void>(); } | 61 | KAsync::Job<void> sendCommand(int commandId) Q_DECL_OVERRIDE |
64 | KAsync::Job<void> sendCommand(int commandId, flatbuffers::FlatBufferBuilder &fbb) Q_DECL_OVERRIDE { return KAsync::null<void>(); } | 62 | { |
65 | KAsync::Job<void> synchronizeResource(bool remoteSync, bool localSync) Q_DECL_OVERRIDE { return KAsync::null<void>(); } | 63 | return KAsync::null<void>(); |
64 | } | ||
65 | KAsync::Job<void> sendCommand(int commandId, flatbuffers::FlatBufferBuilder &fbb) Q_DECL_OVERRIDE | ||
66 | { | ||
67 | return KAsync::null<void>(); | ||
68 | } | ||
69 | KAsync::Job<void> synchronizeResource(bool remoteSync, bool localSync) Q_DECL_OVERRIDE | ||
70 | { | ||
71 | return KAsync::null<void>(); | ||
72 | } | ||
66 | 73 | ||
67 | public slots: | 74 | public slots: |
68 | void open() Q_DECL_OVERRIDE {} | 75 | void open() Q_DECL_OVERRIDE |
69 | void close() Q_DECL_OVERRIDE {} | 76 | { |
77 | } | ||
78 | void close() Q_DECL_OVERRIDE | ||
79 | { | ||
80 | } | ||
70 | }; | 81 | }; |
71 | 82 | ||
72 | class TestResourceFacade : public Sink::GenericFacade<Sink::ApplicationDomain::Event> | 83 | class TestResourceFacade : public Sink::GenericFacade<Sink::ApplicationDomain::Event> |
@@ -75,11 +86,9 @@ public: | |||
75 | TestResourceFacade(const QByteArray &instanceIdentifier, const QSharedPointer<Sink::ResourceAccessInterface> resourceAccess) | 86 | TestResourceFacade(const QByteArray &instanceIdentifier, const QSharedPointer<Sink::ResourceAccessInterface> resourceAccess) |
76 | : Sink::GenericFacade<Sink::ApplicationDomain::Event>(instanceIdentifier, QSharedPointer<TestEventAdaptorFactory>::create(), resourceAccess) | 87 | : Sink::GenericFacade<Sink::ApplicationDomain::Event>(instanceIdentifier, QSharedPointer<TestEventAdaptorFactory>::create(), resourceAccess) |
77 | { | 88 | { |
78 | |||
79 | } | 89 | } |
80 | virtual ~TestResourceFacade() | 90 | virtual ~TestResourceFacade() |
81 | { | 91 | { |
82 | |||
83 | } | 92 | } |
84 | }; | 93 | }; |
85 | 94 | ||
@@ -89,19 +98,16 @@ public: | |||
89 | TestMailResourceFacade(const QByteArray &instanceIdentifier, const QSharedPointer<Sink::ResourceAccessInterface> resourceAccess) | 98 | TestMailResourceFacade(const QByteArray &instanceIdentifier, const QSharedPointer<Sink::ResourceAccessInterface> resourceAccess) |
90 | : Sink::GenericFacade<Sink::ApplicationDomain::Mail>(instanceIdentifier, QSharedPointer<TestMailAdaptorFactory>::create(), resourceAccess) | 99 | : Sink::GenericFacade<Sink::ApplicationDomain::Mail>(instanceIdentifier, QSharedPointer<TestMailAdaptorFactory>::create(), resourceAccess) |
91 | { | 100 | { |
92 | |||
93 | } | 101 | } |
94 | virtual ~TestMailResourceFacade() | 102 | virtual ~TestMailResourceFacade() |
95 | { | 103 | { |
96 | |||
97 | } | 104 | } |
98 | }; | 105 | }; |
99 | 106 | ||
100 | class TestResource : public Sink::GenericResource | 107 | class TestResource : public Sink::GenericResource |
101 | { | 108 | { |
102 | public: | 109 | public: |
103 | TestResource(const QByteArray &instanceIdentifier, QSharedPointer<Sink::Pipeline> pipeline) | 110 | TestResource(const QByteArray &instanceIdentifier, QSharedPointer<Sink::Pipeline> pipeline) : Sink::GenericResource(instanceIdentifier, pipeline) |
104 | : Sink::GenericResource(instanceIdentifier, pipeline) | ||
105 | { | 111 | { |
106 | } | 112 | } |
107 | 113 | ||
@@ -126,4 +132,3 @@ QByteArray createCommand(const DomainType &domainObject, DomainTypeAdaptorFactor | |||
126 | Sink::Commands::FinishCreateEntityBuffer(fbb, location); | 132 | Sink::Commands::FinishCreateEntityBuffer(fbb, location); |
127 | return QByteArray(reinterpret_cast<const char *>(fbb.GetBufferPointer()), fbb.GetSize()); | 133 | return QByteArray(reinterpret_cast<const char *>(fbb.GetBufferPointer()), fbb.GetSize()); |
128 | } | 134 | } |
129 | |||