81 explicit operator bool()
const {
82 return _view.operator bool();
90 std::uint8_t
const*
raw()
const {
100 return _view.length();
109 return _view.offset();
118 return _view.keylen();
139#pragma push_macro("X")
141#define X(_name, _value) BSONCXX_ABI_EXPORT_CDECL(v_noabi::types::b_##_name) get_##_name() const;
152#pragma pop_macro("X")
238 return !(lhs == rhs);
243 return !(lhs == rhs);
274using v_noabi::document::operator==;
275using v_noabi::document::operator!=;
Declares bsoncxx::v_noabi::array::element.
#define BSONCXX_ABI_EXPORT_CDECL(...)
Equivalent to BSONCXX_ABI_EXPORT with BSONCXX_ABI_CDECL.
Definition export.hpp:52
The bsoncxx v_noabi macro guard postlude header.
The bsoncxx v_noabi macro guard prelude header.
element()=default
Construct an invalid element.
A non-owning, read-only BSON element.
Definition view.hpp:84
A polyfill for std::string_view.
Definition string_view.hpp:412
A variant view type that accesses values in serialized BSON arrays.
Definition element.hpp:46
A variant view type that accesses values in serialized BSON documents.
Definition element.hpp:52
v_noabi::types::bson_value::view get_value() const
Getter for a types::bson_value::view variant wrapper of the value portion of the element.
element operator[](v1::stdx::string_view key) const
If this element is a document, finds the first element of the document with the provided key....
std::uint32_t keylen() const
Getter for the element's key length.
Definition element.hpp:117
v_noabi::array::element operator[](std::uint32_t i) const
If this element is an array, indexes into this BSON array. If the index is out-of-bounds,...
v1::stdx::string_view key() const
Getter for the element's key.
v_noabi::types::bson_value::value type_value() const
Equivalent to get_owning_value() const.
std::uint8_t const * raw() const
Getter for the raw bson bytes the element points to.
Definition element.hpp:90
bool operator==(element const &lhs, v_noabi::types::bson_value::view const &rhs)
Convenience methods to compare for equality against a bson_value.
std::uint32_t length() const
Getter for length of the raw bson bytes the element points to.
Definition element.hpp:99
std::uint32_t offset() const
Getter for the offset into the raw bson bytes the element points to.
Definition element.hpp:108
element()=default
Construct an invalid element.
bool operator==(v_noabi::types::bson_value::view const &lhs, element const &rhs)
Convenience methods to compare for equality against a bson_value.
Definition element.hpp:232
element(v1::element::view const &v)
Construct with the bsoncxx::v1 equivalent.
Definition element.hpp:68
v_noabi::types::bson_value::view type_view() const
Equivalent to get_value() const.
bool operator!=(v_noabi::types::bson_value::view const &lhs, element const &rhs)
Convenience methods to compare for equality against a bson_value.
Definition element.hpp:242
v_noabi::types::bson_value::value get_owning_value() const
Getter for a types::bson_value::value variant wrapper of the value portion of the element....
v_noabi::type type() const
Getter for the type of the element.
bool operator!=(element const &lhs, v_noabi::types::bson_value::view const &rhs)
Convenience methods to compare for equality against a bson_value.
Definition element.hpp:237
An owning variant type that represents any BSON type.
Definition value.hpp:57
A non-owning variant that can contain any BSON type.
Definition view.hpp:62
Declares bsoncxx::v_noabi::document::element.
Declares entities representing a BSON document.
Declares entities representing a BSON document.
Declares entities whose ABI stability is NOT guaranteed.
type
An enumeration of each BSON type.
Definition types.hpp:47
v1::element::view to_v1(v_noabi::array::element const &v)
Convert to the bsoncxx::v1 equivalent of v.
Definition element.hpp:132
The top-level namespace within which all bsoncxx library entities are declared.
Declares entities used to represent BSON types.
Provides bsoncxx::v1::element::view.
#define BSONCXX_V1_TYPES_XMACRO(X)
X-macro over the name and value of BSON types.
Definition id-fwd.hpp:44
Declares bsoncxx::v_noabi::document::view.
Provides std::optional-related polyfills for library API usage.
Provides std::string_view-related polyfills for library API usage.
Declares bsoncxx::v_noabi::types::bson_value::value.
Declares bsoncxx::v_noabi::types::bson_value::view.