Ditto 4.2.0
Loading...
Searching...
No Matches
CollectionsEvent.hpp
1#ifndef _DITTO_COLLECTIONS_EVENT_
2#define _DITTO_COLLECTIONS_EVENT_
3
4#include "Collection.hpp"
5#include "LiveQueryMove.hpp"
6
7#include <cstddef>
8#include <vector>
9
10namespace ditto {
11
22 friend class DocumentHelpers;
23
24 explicit CollectionsEvent(std::vector<Collection> collections);
25 CollectionsEvent(std::vector<Collection> collections,
26 std::vector<Collection> old_collections,
27 std::vector<std::size_t> insertions,
28 std::vector<std::size_t> deletions,
29 std::vector<std::size_t> updates,
30 std::vector<LiveQueryMove> moves);
31
32public:
33 CollectionsEvent(const CollectionsEvent &) = delete;
34 CollectionsEvent &operator=(const CollectionsEvent &) = delete;
35
36 CollectionsEvent(CollectionsEvent &&) noexcept = default;
37
43
47 std::vector<Collection> collections;
48
53 std::vector<Collection> old_collections;
54
59 std::vector<std::size_t> insertions;
60
65 std::vector<std::size_t> deletions;
66
71 std::vector<std::size_t> updates;
72
79 std::vector<LiveQueryMove> moves;
80};
81
82} // namespace ditto
83
84#endif
Provides information about the changes that have occurred in relation to an event delivered when obse...
Definition CollectionsEvent.hpp:21
std::vector< std::size_t > insertions
Definition CollectionsEvent.hpp:59
std::vector< Collection > old_collections
Definition CollectionsEvent.hpp:53
std::vector< std::size_t > updates
Definition CollectionsEvent.hpp:71
bool is_initial
Definition CollectionsEvent.hpp:42
std::vector< std::size_t > deletions
Definition CollectionsEvent.hpp:65
std::vector< LiveQueryMove > moves
Definition CollectionsEvent.hpp:79
std::vector< Collection > collections
Definition CollectionsEvent.hpp:47