19 #include <bsoncxx/document/view.hpp>
20 #include <bsoncxx/stdx/optional.hpp>
22 #include <mongocxx/config/prelude.hpp>
25 inline namespace v_noabi {
36 class MONGOCXX_API iterator;
117 class MONGOCXX_PRIVATE impl;
118 std::unique_ptr<impl> _impl;
127 using difference_type = std::int64_t;
128 using value_type =
const bsoncxx::document::view;
129 using pointer = std::add_pointer<value_type>::type;
130 using reference = std::add_lvalue_reference<value_type>::type;
131 using iterator_category = std::input_iterator_tag;
188 enum class iter_type { k_tracking, k_default_constructed, k_end };
209 MONGOCXX_PRIVATE
bool is_exhausted()
const;
219 #include <mongocxx/config/postlude.hpp>
Class representing a MongoDB change stream iterator.
Definition: change_stream.hpp:124
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::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::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:33
~change_stream()
Destroys a change_stream.
iterator end() const
A change_stream::iterator indicating stream exhaustion, meaning that no notifications are available f...
bsoncxx::stdx::optional< bsoncxx::document::view > get_resume_token() const
Returns a resume token for this change stream.
iterator begin() const
A change_stream::iterator points to the beginning of any available notifications.
change_stream & operator=(change_stream &&other) noexcept
Move assigns a change_stream.
change_stream(change_stream &&other) noexcept
Move constructs a change_stream.
Class representing a client connection to MongoDB.
Definition: client.hpp:54
Class representing server side document groupings within a MongoDB database.
Definition: collection.hpp:85
Class representing a MongoDB database.
Definition: database.hpp:44
The top-level namespace for mongocxx library entities.
Definition: bulk_write.hpp:24