34#include <system_error>
88 alignas(BSONCXX_PRIVATE_MAX_ALIGN_T) std::array<unsigned char, 32> _storage;
168#pragma push_macro("X")
170#define X(_name, _value) BSONCXX_ABI_EXPORT_CDECL(v1::types::b_##_name) get_##_name() const;
184#pragma pop_macro("X")
260 explicit view(impl i);
268struct std::is_error_code_enum<
bsoncxx::v1::element::view::errc> : true_type {};
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.
A non-owning, read-only BSON element.
Definition view.hpp:84
v1::types::view type_view() const
Return a view of the underlying BSON type value.
view(view const &other) noexcept
Copy (or move) construction.
std::uint32_t length() const
Return the "length" component of the underlying BSON bytes.
v1::types::value type_value() const
Return a deep copy of the underlying BSON type value.
v1::types::id type_id() const
Return the type.
std::uint32_t keylen() const
Return the "keylen" component of the underlying BSON bytes.
v1::stdx::string_view key() const
Return the key.
std::uint8_t const * raw() const
Return the "raw" component of the underlying BSON bytes.
static std::error_category const & error_category()
The error category for bsoncxx::v1::element::view::errc.
std::uint32_t offset() const
Return the "offset" component of the underlying BSON bytes.
friend std::error_code make_error_code(errc v)
Support implicit conversion to std::error_code.
Definition view.hpp:253
view()
Initialize as an invalid element without any associated BSON bytes.
v1::element::view operator[](std::uint32_t idx) const
Return the first element within the represented BSON array whose key compares equal to i.
errc
Errors codes which may be returned by bsoncxx::v1::element::view.
Definition view.hpp:235
@ invalid_view
View is invalid.
Definition view.hpp:237
@ zero
Zero.
Definition view.hpp:236
@ invalid_data
Data is invalid.
Definition view.hpp:238
~view()
Destroy this object.
v1::element::view operator[](v1::stdx::string_view key) const
Return the first element within the represented BSON document whose key compares equal to key.
A polyfill for std::string_view.
Definition string_view.hpp:412
A union of BSON type values.
Definition value.hpp:54
A non-owning, read-only union of BSON type values.
Definition view.hpp:1023
Declares entities representing a BSON element.
Declares C++17 standard library polyfills.
Declares entities representing a BSON type value.
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::element::view.
Provides std::string_view-related polyfills for library API usage.
Declares enumerations identifying the type of a BSON element.
#define BSONCXX_V1_TYPES_XMACRO(X)
X-macro over the name and value of BSON types.
Definition id-fwd.hpp:44
Declares bsoncxx::v1::types::value.
Declares non-owning, read-only entities representing a BSON type value.