21#include <bsoncxx/document/view.hpp>
22#include <bsoncxx/array/element.hpp>
24#include <bsoncxx/config/prelude.hpp>
27BSONCXX_INLINE_NAMESPACE_BEGIN
97 view(
const std::uint8_t* data, std::size_t length);
104 const std::uint8_t*
data()
const;
150 :
public std::iterator<std::forward_iterator_tag, element, std::ptrdiff_t, const element*,
156 reference operator*();
157 pointer operator->();
180BSONCXX_INLINE_NAMESPACE_END
183#include <bsoncxx/config/postlude.hpp>
A variant view type that accesses values in serialized BSON arrays.
Definition element.hpp:36
A const iterator over the contents of an array view.
Definition view.hpp:151
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:33
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