21 #include <bsoncxx/array/view-fwd.hpp>
22 #include <bsoncxx/types/bson_value/view-fwd.hpp>
24 #include <bsoncxx/array/element.hpp>
25 #include <bsoncxx/document/view.hpp>
27 #include <bsoncxx/config/prelude.hpp>
107 const std::uint8_t*
data()
const;
163 using iterator_category = std::forward_iterator_tag;
164 using difference_type = std::ptrdiff_t;
196 #include <bsoncxx/config/postlude.hpp>
A variant view type that accesses values in serialized BSON arrays.
Definition: element.hpp:39
A const iterator over the contents of an array view.
Definition: view.hpp:155
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:36
bool empty() const
Checks if the underlying buffer is empty, i.e.
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 find(std::uint32_t i) const
Indexes into this BSON array.
const_iterator end() const
const_iterator begin() const
const_iterator cend() const
const_iterator cbegin() const
view()
Default constructs a view.
friend bool operator!=(view, view)
Compare two views for (in)-equality.
view(const std::uint8_t *data, std::size_t length)
Constructs a view from a buffer.
const std::uint8_t * data() const
Access the raw bytes of the underlying array.
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:35
The top-level namespace for bsoncxx library entities.
Definition: element-fwd.hpp:19