71 std::uint8_t
const*
data()
const {
82 return _view.length();
91 explicit operator bool()
const {
92 return _view.operator bool();
97 return _view.cbegin();
140 return *(this->
find(i));
152 return lhs._view == rhs._view;
157 return !(lhs == rhs);
Provides macros to control the set of symbols exported in the ABI.
#define BSONCXX_ABI_EXPORT_CDECL(...)
Equivalent to BSONCXX_ABI_EXPORT with BSONCXX_ABI_CDECL.
Definition export.hpp:52
The bsoncxx v1 macro guard postlude header.
The bsoncxx v1 macro guard prelude header.
std::uint8_t const * data() const
Return a pointer to the BSON bytes being represented.
Definition view.hpp:71
view(std::uint8_t const *data, std::size_t length)
Equivalent to view(std::uint8_t const* data), but validates the embedded length against length.
Definition view.hpp:68
const_iterator begin() const
Return a const iterator to the beginning of the range of BSON elements within this view.
Definition view.hpp:106
std::size_t length() const
Return the length of the BSON bytes being represented.
Definition view.hpp:81
friend bool operator!=(view lhs, view rhs)
Compare equal when the BSON bytes represented by lhs and rhs compare equal.
Definition view.hpp:156
friend bool operator==(view lhs, view rhs)
Compare equal when the BSON bytes represented by lhs and rhs compare equal.
Definition view.hpp:151
const_iterator iterator
Equivalent to const_iterator.
Definition view.hpp:55
const_iterator cbegin() const
Return a const iterator to the beginning of the range of BSON elements within this view.
Definition view.hpp:96
bool empty() const
Return true when the BSON bytes represents an empty view:
Definition view.hpp:86
v1::document::view::const_iterator const_iterator
A const iterator over the elements of a view.
Definition view.hpp:52
std::size_t size() const
Return the length of the BSON bytes being represented.
Definition view.hpp:76
const_iterator find(std::uint32_t i) const
Return a const iterator to the element within the represented BSON array at index i via key string co...
const_iterator cend() const
Return a const iterator to the end of the range of BSON elements within this view.
Definition view.hpp:101
v1::element::view operator[](std::uint32_t i) const
Return the first element within the represented BSON array whose key compares equal to i.
Definition view.hpp:139
view(std::uint8_t const *data)
Initialize with the given BSON bytes.
Definition view.hpp:65
const_iterator end() const
Return a const iterator to the end of the range of BSON elements within this view.
Definition view.hpp:111
view()=default
Initialize as an empty view.
A const iterator over the elements of a view.
Definition view.hpp:274
A non-owning, read-only BSON document.
Definition view.hpp:54
A non-owning, read-only BSON element.
Definition view.hpp:84
Declares entities representing a BSON array.
Declares entities whose ABI stability is guaranteed for documented symbols.
The top-level namespace within which all bsoncxx library entities are declared.
Declares bsoncxx::v1::array::view.
Provides bsoncxx::v1::document::view.
Provides bsoncxx::v1::element::view.