21#include <bsoncxx/array/element.hpp>
22#include <bsoncxx/document/view.hpp>
24#include <bsoncxx/config/prelude.hpp>
27BSONCXX_INLINE_NAMESPACE_BEGIN
104 view(
const std::uint8_t* data, std::size_t length);
111 const std::uint8_t*
data()
const;
167 using iterator_category = std::forward_iterator_tag;
168 using difference_type = std::ptrdiff_t;
197BSONCXX_INLINE_NAMESPACE_END
200#include <bsoncxx/config/postlude.hpp>
A variant view type that accesses values in serialized BSON arrays.
Definition element.hpp:42
A const iterator over the contents of an array view.
Definition view.hpp:159
friend bool operator!=(const const_iterator &, const const_iterator &)
Compare two const_iterators for (in)-equality.
friend bool operator==(const const_iterator &, const const_iterator &)
Compare two const_iterators for (in)-equality.
A read-only, non-owning view of a BSON document.
Definition view.hpp:40
const_iterator cend() const
friend bool operator==(view, view)
Compare two views for (in)-equality.
const_iterator cbegin() const
const std::uint8_t * data() const
Access the raw bytes of the underlying array.
bool empty() const
Checks if the underlying buffer is empty, i.e.
view(const std::uint8_t *data, std::size_t length)
Constructs a view from a buffer.
view()
Default constructs a view.
const_iterator find(std::uint32_t i) const
Indexes into this BSON array.
const_iterator begin() const
std::size_t length() const
Gets the length of the underlying buffer.
friend bool operator!=(view, view)
Compare two views for (in)-equality.
const_iterator end() const
element operator[](std::uint32_t i) const
Indexes into this BSON array.
A read-only, non-owning view of a BSON document.
Definition view.hpp:33
Top level namespace for MongoDB C++ BSON functionality.
Definition element.hpp:24