21 #include <bsoncxx/document/element.hpp>
22 #include <bsoncxx/stdx/string_view.hpp>
24 #include <bsoncxx/config/prelude.hpp>
27 BSONCXX_INLINE_NAMESPACE_BEGIN
35 class BSONCXX_API const_iterator;
53 view(
const std::uint8_t* data, std::size_t length);
58 const_iterator cbegin()
const;
63 const_iterator cend()
const;
68 const_iterator begin()
const;
73 const_iterator end()
const;
90 const_iterator find(stdx::string_view key)
const;
102 element operator[](stdx::string_view key)
const;
109 const std::uint8_t* data()
const;
119 std::size_t length()
const;
136 friend BSONCXX_API
bool BSONCXX_CALL operator==(
view,
view);
137 friend BSONCXX_API
bool BSONCXX_CALL operator!=(
view,
view);
143 const std::uint8_t* _data;
154 :
public std::iterator<std::forward_iterator_tag, element, std::ptrdiff_t, const element*,
160 reference operator*();
161 pointer operator->();
184 BSONCXX_INLINE_NAMESPACE_END
187 #include <bsoncxx/config/postlude.hpp>
A read-only, non-owning view of a BSON document.
Definition: view.hpp:33
A const iterator over the contents of a document view.
Definition: view.hpp:153
A variant view type that accesses values in serialized BSON documents.
Definition: element.hpp:70
Definition: element.hpp:24