19 #include <mongocxx/change_stream-fwd.hpp>
20 #include <mongocxx/client-fwd.hpp>
21 #include <mongocxx/collection-fwd.hpp>
22 #include <mongocxx/database-fwd.hpp>
24 #include <bsoncxx/document/view.hpp>
25 #include <bsoncxx/stdx/optional.hpp>
27 #include <mongocxx/config/prelude.hpp>
109 bsoncxx::v_noabi::stdx::optional<bsoncxx::v_noabi::document::view>
get_resume_token()
const;
112 friend ::mongocxx::v_noabi::client;
113 friend ::mongocxx::v_noabi::collection;
114 friend ::mongocxx::v_noabi::database;
116 friend ::mongocxx::v_noabi::change_stream::iterator;
120 class MONGOCXX_PRIVATE impl;
121 std::unique_ptr<impl> _impl;
130 using difference_type = std::int64_t;
132 using pointer = std::add_pointer<value_type>::type;
133 using reference = std::add_lvalue_reference<value_type>::type;
134 using iterator_category = std::input_iterator_tag;
190 friend ::mongocxx::v_noabi::change_stream;
192 enum class iter_type { k_tracking, k_default_constructed, k_end };
213 MONGOCXX_PRIVATE
bool is_exhausted()
const;
223 #include <mongocxx/config/postlude.hpp>
A read-only, non-owning view of a BSON document.
Definition: view.hpp:35
Class representing a MongoDB change stream iterator.
Definition: change_stream.hpp:127
friend bool operator==(const change_stream::iterator &, const change_stream::iterator &) noexcept
Compare two iterators for (in)-equality.
iterator()
Default-construct an iterator.
void operator++(int)
Post-increments the iterator to move to the next document.
const bsoncxx::v_noabi::document::view & operator*() const
Dereferences the view for the document currently being pointed to.
iterator & operator++()
Pre-increments the iterator to move to the next document.
const bsoncxx::v_noabi::document::view * operator->() const
Accesses a member of the dereferenced document currently being pointed to.
friend bool operator!=(const change_stream::iterator &, const change_stream::iterator &) noexcept
Compare two iterators for (in)-equality.
Class representing a MongoDB change stream.
Definition: change_stream.hpp:35
~change_stream()
Destroys a change_stream.
iterator end() const
A change_stream::iterator indicating stream exhaustion, meaning that no notifications are available f...
iterator begin() const
A change_stream::iterator points to the beginning of any available notifications.
bsoncxx::v_noabi::stdx::optional< bsoncxx::v_noabi::document::view > get_resume_token() const
Returns a resume token for this change stream.
change_stream & operator=(change_stream &&other) noexcept
Move assigns a change_stream.
change_stream(change_stream &&other) noexcept
Move constructs a change_stream.
The top-level namespace for mongocxx library entities.
Definition: bulk_write-fwd.hpp:19