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/resultset.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/resultset.h')
-rw-r--r-- | common/resultset.h | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/common/resultset.h b/common/resultset.h index e513460..88f7055 100644 --- a/common/resultset.h +++ b/common/resultset.h | |||
@@ -28,34 +28,34 @@ | |||
28 | * | 28 | * |
29 | * We'll eventually want to lazy load results in next(). | 29 | * We'll eventually want to lazy load results in next(). |
30 | */ | 30 | */ |
31 | class ResultSet { | 31 | class ResultSet |
32 | public: | 32 | { |
33 | typedef std::function<bool(std::function<void(const Sink::ApplicationDomain::ApplicationDomainType::Ptr &, Sink::Operation)>)> ValueGenerator; | 33 | public: |
34 | typedef std::function<QByteArray()> IdGenerator; | 34 | typedef std::function<bool(std::function<void(const Sink::ApplicationDomain::ApplicationDomainType::Ptr &, Sink::Operation)>)> ValueGenerator; |
35 | typedef std::function<void()> SkipValue; | 35 | typedef std::function<QByteArray()> IdGenerator; |
36 | 36 | typedef std::function<void()> SkipValue; | |
37 | ResultSet(); | 37 | |
38 | ResultSet(const ValueGenerator &generator, const SkipValue &skip); | 38 | ResultSet(); |
39 | ResultSet(const IdGenerator &generator); | 39 | ResultSet(const ValueGenerator &generator, const SkipValue &skip); |
40 | ResultSet(const QVector<QByteArray> &resultSet); | 40 | ResultSet(const IdGenerator &generator); |
41 | ResultSet(const ResultSet &other); | 41 | ResultSet(const QVector<QByteArray> &resultSet); |
42 | 42 | ResultSet(const ResultSet &other); | |
43 | bool next(); | 43 | |
44 | bool next(std::function<bool(const Sink::ApplicationDomain::ApplicationDomainType::Ptr &value, Sink::Operation)> callback); | 44 | bool next(); |
45 | 45 | bool next(std::function<bool(const Sink::ApplicationDomain::ApplicationDomainType::Ptr &value, Sink::Operation)> callback); | |
46 | void skip(int number); | 46 | |
47 | 47 | void skip(int number); | |
48 | QByteArray id(); | 48 | |
49 | 49 | QByteArray id(); | |
50 | bool isEmpty(); | 50 | |
51 | 51 | bool isEmpty(); | |
52 | private: | 52 | |
53 | QVector<QByteArray> mResultSet; | 53 | private: |
54 | QVector<QByteArray>::ConstIterator mIt; | 54 | QVector<QByteArray> mResultSet; |
55 | QByteArray mCurrentValue; | 55 | QVector<QByteArray>::ConstIterator mIt; |
56 | IdGenerator mGenerator; | 56 | QByteArray mCurrentValue; |
57 | ValueGenerator mValueGenerator; | 57 | IdGenerator mGenerator; |
58 | SkipValue mSkip; | 58 | ValueGenerator mValueGenerator; |
59 | bool mFirst; | 59 | SkipValue mSkip; |
60 | bool mFirst; | ||
60 | }; | 61 | }; |
61 | |||