21 #include <bsoncxx/document/view.hpp>
22 #include <bsoncxx/array/element.hpp>
24 #include <bsoncxx/config/prelude.hpp>
27 BSONCXX_INLINE_NAMESPACE_BEGIN
35 class BSONCXX_API iterator;
36 class BSONCXX_API const_iterator;
41 const_iterator cbegin()
const;
46 const_iterator cend()
const;
51 iterator begin()
const;
68 iterator find(std::uint32_t i)
const;
80 element operator[](std::uint32_t i)
const;
97 view(
const std::uint8_t* data, std::size_t length);
104 const std::uint8_t* data()
const;
114 std::size_t length()
const;
133 friend BSONCXX_API
bool BSONCXX_CALL operator==(
view,
view);
134 friend BSONCXX_API
bool BSONCXX_CALL operator!=(
view,
view);
149 class BSONCXX_API
view::
iterator :
public std::iterator<std::forward_iterator_tag, element> {
154 reference operator*();
155 pointer operator->();
167 friend BSONCXX_API
bool BSONCXX_CALL operator==(
const iterator&,
const iterator&);
168 friend BSONCXX_API
bool BSONCXX_CALL operator!=(
const iterator&,
const iterator&);
184 :
public std::iterator<std::forward_iterator_tag, element, std::ptrdiff_t, const element*,
190 reference operator*();
191 pointer operator->();
214 BSONCXX_INLINE_NAMESPACE_END
217 #include <bsoncxx/config/postlude.hpp>
A mutable iterator over the contents of an array view.
Definition: view.hpp:149
A read-only, non-owning view of a BSON document.
Definition: view.hpp:33
A const iterator over the contents of an array view.
Definition: view.hpp:183
A read-only, non-owning view of a BSON document.
Definition: view.hpp:33
A variant view type that accesses values in serialized BSON arrays.
Definition: element.hpp:36
Definition: element.hpp:24