#include <bsoncxx/v1/types/value.hpp>
A union of BSON type values.
Public Types | |
| enum class | errc |
| Errors codes which may be returned by bsoncxx::v1::types::value. More... | |
Public Member Functions | |
| value () | |
| Initialize with bsoncxx::v1::types::b_null. | |
| value (bool v) | |
| Initialize as a bsoncxx::v1::types::b_bool. | |
| value (char const *v) | |
| Initialize as a bsoncxx::v1::types::b_string. | |
| value (double v) | |
| Initialize as a bsoncxx::v1::types::b_double. | |
| value (std::chrono::milliseconds v) | |
| Initialize as a bsoncxx::v1::types::b_date. | |
| value (std::int32_t v) | |
| Initialize as a bsoncxx::v1::types::b_int32. | |
| value (std::int64_t v) | |
| Initialize as a bsoncxx::v1::types::b_int64. | |
| value (std::nullptr_t) | |
| Initialize as a bsoncxx::v1::types::b_null. | |
| value (std::string const &v) | |
| Initialize as a bsoncxx::v1::types::b_string. | |
| value (std::uint8_t const *data, std::size_t size) | |
| Initialize as a bsoncxx::v1::types::b_binary with bsoncxx::v1::types::binary_subtype::k_binary. | |
| value (std::uint8_t const *data, std::size_t size, v1::types::binary_subtype const sub_type) | |
| Initialize as a bsoncxx::v1::types::b_binary with subtype. | |
| value (std::vector< std::uint8_t > const &v) | |
| Initialize as a bsoncxx::v1::types::b_binary with bsoncxx::v1::types::binary_subtype::k_binary. | |
| value (std::vector< std::uint8_t > const &v, v1::types::binary_subtype subtype) | |
| Initialize with v as a bsoncxx::v1::types::b_binary with subtype. | |
| value (v1::array::view v) | |
| Initialize as a bsoncxx::v1::types::b_array. | |
| value (v1::decimal128 v) | |
| Initialize as a bsoncxx::v1::types::b_decimal128. | |
| value (v1::document::view v) | |
| Initialize as a bsoncxx::v1::types::b_document. | |
| value (v1::oid v) | |
| Initialize as a bsoncxx::v1::types::b_oid. | |
| value (v1::stdx::string_view c, v1::oid v) | |
| Initialize as a bsoncxx::v1::types::b_dbpointer. | |
| value (v1::stdx::string_view code, v1::document::view scope) | |
| Initialize as a bsoncxx::v1::types::b_codewscope. | |
| value (v1::stdx::string_view regex, v1::stdx::string_view options) | |
| Initialize as a bsoncxx::v1::types::b_regex. | |
| value (v1::stdx::string_view v) | |
| Initialize as a bsoncxx::v1::types::b_string. | |
| value (v1::types::view const &v) | |
| Initialize with a deep copy of the underlying BSON type value. | |
| value (value &&other) noexcept | |
| Move construction. | |
| value (value const &other) | |
| Copy construction. | |
| ~value () | |
| Destroy this object. | |
| operator v1::types::view () const | |
| Implicitly convert to this->view(). | |
| value & | operator= (value &&other) noexcept |
| Move assignment. | |
| value & | operator= (value const &other) |
| Copy assignment. | |
| v1::types::id | type_id () const |
| Return the type of the underlying BSON type value. | |
| v1::types::view | view () const |
| Return a view of the underlying BSON type value. | |
| value (v1::types::b_minkey v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_double v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_string v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_document v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_array v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_binary v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_undefined v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_oid v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_bool v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_date v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_null v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_regex v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_dbpointer v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_code v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_symbol v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_codewscope v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_int32 v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_timestamp v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_int64 v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_decimal128 v) | |
| Convert v as a deep copy. | |
| value (v1::types::b_maxkey v) | |
| Convert v as a deep copy. | |
| v1::types::b_minkey | get_minkey () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_double | get_double () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_string | get_string () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_document | get_document () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_array | get_array () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_binary | get_binary () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_undefined | get_undefined () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_oid | get_oid () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_bool | get_bool () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_date | get_date () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_null | get_null () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_regex | get_regex () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_dbpointer | get_dbpointer () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_code | get_code () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_symbol | get_symbol () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_codewscope | get_codewscope () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_int32 | get_int32 () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_timestamp | get_timestamp () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_int64 | get_int64 () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_decimal128 | get_decimal128 () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
| v1::types::b_maxkey | get_maxkey () const |
| Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()). | |
Static Public Member Functions | |
| static std::error_category const & | error_category () |
| The error category for bsoncxx::v1::types::value::errc. | |
Friends | |
| std::error_code | make_error_code (errc v) |
| Support implicit conversion to std::error_code. | |
| bool | operator!= (value const &lhs, value const &rhs) |
| Equivalent to !(lhs == rhs). | |
| bool | operator== (value const &lhs, value const &rhs) |
| Equivalent to lhs.view() == rhs.view(). | |
|
strong |
Errors codes which may be returned by bsoncxx::v1::types::value.
| Enumerator | |
|---|---|
| zero | Zero. |
| invalid_type | Requested BSON type is not supported. |
| invalid_length_u32 | Length is too long (exceeds UINT32_MAX). |
| bsoncxx::v1::types::value::~value | ( | ) |
Destroy this object.
|
noexcept |
Move construction.
| bsoncxx::v1::types::value::value | ( | value const & | other | ) |
Copy construction.
The copied BSON type value is allocated (when necessary) using bson_value_copy.
|
inline |
Initialize with bsoncxx::v1::types::b_null.
|
explicit |
Initialize with a deep copy of the underlying BSON type value.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_type if `v.type_id()` is not a supported value (not defined by BSONCXX_V1_TYPES_XMACRO). |
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
explicit |
Convert v as a deep copy.
The copied value is allocated (when necessary) using bson_malloc.
| bsoncxx::v1::exception | with bsoncxx::v1::types::value::errc::invalid_length_u32 if the length of any underlying BSON type value component is not representable as an std::uint32_t as required by the corresponding bsoncxx::v1::types::b_<type>. |
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_null.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_string.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_int32.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_int64.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_double.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_bool.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_oid.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_decimal128.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_date.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_document.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_array.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_binary with bsoncxx::v1::types::binary_subtype::k_binary.
|
inlineexplicit |
Initialize with v as a bsoncxx::v1::types::b_binary with subtype.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_dbpointer.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_codewscope.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_regex.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_string.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_string.
|
inlineexplicit |
Initialize as a bsoncxx::v1::types::b_binary with bsoncxx::v1::types::binary_subtype::k_binary.
|
explicit |
Initialize as a bsoncxx::v1::types::b_binary with subtype.
|
static |
The error category for bsoncxx::v1::types::value::errc.
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Equivalent to this->view().get_type() where get_type is the correct name for the requested BSON type value (e.g. this->view().get_double() given this->get_double()).
| bsoncxx::v1::exception | with bsoncxx::v1::types::view::errc::type_mismatch if the underlying BSON type value does not match the requested type. |
|
inline |
Implicitly convert to this->view().
Move assignment.
Copy assignment.
The copied value is allocated (when necessary) using bson_value_copy.
| v1::types::id bsoncxx::v1::types::value::type_id | ( | ) | const |
Return the type of the underlying BSON type value.
| v1::types::view bsoncxx::v1::types::value::view | ( | ) | const |
Return a view of the underlying BSON type value.
|
friend |
Support implicit conversion to std::error_code.
Equivalent to lhs.view() == rhs.view().