MongoDB C++ Driver
mongocxx-3.6.2
|
21 #include <bsoncxx/document/element.hpp>
22 #include <bsoncxx/stdx/string_view.hpp>
24 #include <bsoncxx/config/prelude.hpp>
27 BSONCXX_INLINE_NAMESPACE_BEGIN
53 view(
const std::uint8_t* data, std::size_t length);
109 const std::uint8_t*
data()
const;
143 const std::uint8_t* _data;
162 reference operator*();
163 pointer operator->();
186 BSONCXX_INLINE_NAMESPACE_END
189 #include <bsoncxx/config/postlude.hpp>
A const iterator over the contents of a document view.
Definition: view.hpp:157
std::size_t length() const
Gets the length of the underlying buffer.
Top level namespace for MongoDB C++ BSON functionality.
Definition: element.hpp:24
const_iterator begin() const
friend bool operator==(const const_iterator &, const const_iterator &)
Compares two const_iterators for (in)-equality.
const std::uint8_t * data() const
Access the raw bytes of the underlying document.
const_iterator find(stdx::string_view key) const
Finds the first element of the document with the provided key.
friend bool operator!=(view, view)
Compare two document views for (in)-equality.
bool empty() const
Checks if the underlying document is empty, i.e.
const_iterator cbegin() const
const_iterator cend() const
view(const std::uint8_t *data, std::size_t length)
Constructs a view from a buffer.
const_iterator end() const
A variant view type that accesses values in serialized BSON documents.
Definition: element.hpp:76
friend bool operator==(view, view)
Compare two document views for (in)-equality.
view()
Default constructs a view.
friend bool operator!=(const const_iterator &, const const_iterator &)
Compares two const_iterators for (in)-equality.
element operator[](stdx::string_view key) const
Finds the first element of the document with the provided key.
A read-only, non-owning view of a BSON document.
Definition: view.hpp:33