MongoDB C++ Driver  mongocxx-3.7.0
Public Member Functions | List of all members
mongocxx::change_stream::iterator Class Reference

Class representing a MongoDB change stream iterator. More...

#include <change_stream.hpp>

Public Member Functions

 iterator ()
 Default-construct an iterator. More...
 
const bsoncxx::document::viewoperator* () const
 Dereferences the view for the document currently being pointed to.
 
const bsoncxx::document::viewoperator-> () const
 Accesses a member of the dereferenced document currently being pointed to.
 
iteratoroperator++ ()
 Pre-increments the iterator to move to the next document. More...
 
void operator++ (int)
 Post-increments the iterator to move to the next document. More...
 

Friends

bool operator== (const change_stream::iterator &, const change_stream::iterator &) noexcept
 Compare two iterators for (in)-equality. More...
 
bool operator!= (const change_stream::iterator &, const change_stream::iterator &) noexcept
 Compare two iterators for (in)-equality. More...
 

Detailed Description

Class representing a MongoDB change stream iterator.

Constructor & Destructor Documentation

◆ iterator()

mongocxx::change_stream::iterator::iterator ( )

Default-construct an iterator.

Default-constucted iterators can be compared (all default-constructed iterators are ==), assigned, and copied.

Member Function Documentation

◆ operator++() [1/2]

iterator& mongocxx::change_stream::iterator::operator++ ( )

Pre-increments the iterator to move to the next document.

change_stream::begin() and increment operators are blocking operations. They will not return until a notification is available, the max_await_time (from the options::change_stream) miliseconds have elapsed, or a server error is encountered.

Exceptions
mongocxx::query_exceptionif the query failed

◆ operator++() [2/2]

void mongocxx::change_stream::iterator::operator++ ( int  )

Post-increments the iterator to move to the next document.

change_stream::begin() and increment operators are blocking operations. They will not return until a notification is available, the max_await_time (from the options::change_stream) miliseconds have elapsed, or a server error is encountered.

Exceptions
mongocxx::query_exceptionif the query failed

Friends And Related Function Documentation

◆ operator!=

bool operator!= ( const change_stream::iterator ,
const change_stream::iterator  
)
friend

Compare two iterators for (in)-equality.

Iterators compare equal if they point to the same underlying change_stream or if both are exhausted.

◆ operator==

bool operator== ( const change_stream::iterator ,
const change_stream::iterator  
)
friend

Compare two iterators for (in)-equality.

Iterators compare equal if they point to the same underlying change_stream or if both are exhausted.


The documentation for this class was generated from the following file: