#include <mongocxx/v1/cursor.hpp>
An iterator over the results of an associated cursor.
Public Types | |
| using | difference_type = std::ptrdiff_t |
| Provide std::iterator_traits<T>::difference_type. | |
| using | iterator_category = std::input_iterator_tag |
| Provide std::iterator_traits<T>::iterator_category. | |
| using | pointer = value_type const* |
| Provide std::iterator_traits<T>::pointer. | |
| using | reference = value_type |
| Provide std::iterator_traits<T>::reference. | |
| using | value_type = bsoncxx::v1::document::view |
| Provide std::iterator_traits<T>::value_type. | |
Public Member Functions | |
| iterator () | |
| Initialize as an end iterator. | |
| iterator (iterator &&other) noexcept | |
| Move construction. | |
| iterator (iterator const &other) | |
| Copy construction. | |
| ~iterator () | |
| Destroy this object. | |
| value_type | operator* () const |
| Access the current cursor result document. | |
| iterator & | operator++ () |
| Increment this iterator. | |
| iterator & | operator++ (int) |
| Increment this iterator. | |
| pointer | operator-> () const |
| Access the current result document. | |
| iterator & | operator= (iterator &&other) noexcept |
| Move assignment. | |
| iterator & | operator= (iterator const &other) |
| Copy assignment. | |
Friends | |
| bool | operator!= (iterator const &lhs, iterator const &rhs) |
| Equivalent to !(lhs == rhs). | |
| bool | operator== (iterator const &lhs, iterator const &rhs) |
| Equality comparison. | |
| using mongocxx::v1::cursor::iterator::difference_type = std::ptrdiff_t |
Provide std::iterator_traits<T>::difference_type.
| using mongocxx::v1::cursor::iterator::iterator_category = std::input_iterator_tag |
Provide std::iterator_traits<T>::iterator_category.
| using mongocxx::v1::cursor::iterator::pointer = value_type const* |
Provide std::iterator_traits<T>::pointer.
Provide std::iterator_traits<T>::reference.
Provide std::iterator_traits<T>::value_type.
| mongocxx::v1::cursor::iterator::~iterator | ( | ) |
Destroy this object.
|
noexcept |
Move construction.
| mongocxx::v1::cursor::iterator::iterator | ( | iterator const & | other | ) |
Copy construction.
| mongocxx::v1::cursor::iterator::iterator | ( | ) |
Initialize as an end iterator.
| value_type mongocxx::v1::cursor::iterator::operator* | ( | ) | const |
Access the current cursor result document.
| iterator & mongocxx::v1::cursor::iterator::operator++ | ( | ) |
Increment this iterator.
Advance the underlying cursor to obtain the next result document. Compare equal to the end iterator when there are no result documents available.
| mongocxx::v1::server_error | when a server-side error is encountered and a raw server error is available. |
| mongocxx::v1::exception | for all other runtime errors. |
|
inline |
Increment this iterator.
Advance the underlying cursor to obtain the next result document. Compare equal to the end iterator when there are no result documents available.
| mongocxx::v1::server_error | when a server-side error is encountered and a raw server error is available. |
| mongocxx::v1::exception | for all other runtime errors. |
| pointer mongocxx::v1::cursor::iterator::operator-> | ( | ) | const |
Access the current result document.
Move assignment.
Equality comparison.
lhs and rhs compare equal when: