Loading...
Searching...
No Matches
bsoncxx::types::bson_value::view Class Reference

`#include <bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp>`

## Description

A non-owning variant that can contain any BSON type.

Deprecated
  Use bsoncxx::v_noabi::types::view instead (renamed).

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## Public Member Functions

| view () noexcept
| Default constructs a bson_value::view. The resulting view will be initialized to point at a bson_value of type k_null.
| view (v1::types::view const &v)
| Construct with the bsoncxx::v1 equivalent.
| operator v1::types::view () const
| Convert to the bsoncxx::v1 equivalent.
v_noabi::type | type () const
| Returns the type of the underlying BSON value stored in this object.
v_noabi::type | type_id () const
| Equivalent to type() const.
| view (v_noabi::types::b_minkey v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_double v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_string v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_document v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_array v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_binary v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_undefined v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_oid v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_bool v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_date v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_null v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_regex v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_dbpointer v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_code v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_symbol v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_codewscope v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_int32 v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_timestamp v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_int64 v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_decimal128 v) noexcept
| Construct a bson_value::view from the provided BSON type.
| view (v_noabi::types::b_maxkey v) noexcept
| Construct a bson_value::view from the provided BSON type.
v_noabi::types::b_minkey const & | get_minkey () const
| Return the underlying BSON type value.
v_noabi::types::b_double const & | get_double () const
| Return the underlying BSON type value.
v_noabi::types::b_string const & | get_string () const
| Return the underlying BSON type value.
v_noabi::types::b_document const & | get_document () const
| Return the underlying BSON type value.
v_noabi::types::b_array const & | get_array () const
| Return the underlying BSON type value.
v_noabi::types::b_binary const & | get_binary () const
| Return the underlying BSON type value.
v_noabi::types::b_undefined const & | get_undefined () const
| Return the underlying BSON type value.
v_noabi::types::b_oid const & | get_oid () const
| Return the underlying BSON type value.
v_noabi::types::b_bool const & | get_bool () const
| Return the underlying BSON type value.
v_noabi::types::b_date const & | get_date () const
| Return the underlying BSON type value.
v_noabi::types::b_null const & | get_null () const
| Return the underlying BSON type value.
v_noabi::types::b_regex const & | get_regex () const
| Return the underlying BSON type value.
v_noabi::types::b_dbpointer const & | get_dbpointer () const
| Return the underlying BSON type value.
v_noabi::types::b_code const & | get_code () const
| Return the underlying BSON type value.
v_noabi::types::b_symbol const & | get_symbol () const
| Return the underlying BSON type value.
v_noabi::types::b_codewscope const & | get_codewscope () const
| Return the underlying BSON type value.
v_noabi::types::b_int32 const & | get_int32 () const
| Return the underlying BSON type value.
v_noabi::types::b_timestamp const & | get_timestamp () const
| Return the underlying BSON type value.
v_noabi::types::b_int64 const & | get_int64 () const
| Return the underlying BSON type value.
v_noabi::types::b_decimal128 const & | get_decimal128 () const
| Return the underlying BSON type value.
v_noabi::types::b_maxkey const & | get_maxkey () const
| Return the underlying BSON type value.

## Related Symbols

(Note that these are not member symbols.)
bool | operator== (view const &lhs, view const &rhs)
| Compare two bson_value::views for equality.
bool | operator!= (view const &lhs, view const &rhs)
| Compare two bson_value::views for equality.
template<typename T>
detail::requires_t< bool, detail::is_bson_view_compatible< T > > | operator== (view const &lhs, T &&rhs)
| Compares a view with a type representable as a view.
template<typename T>
detail::requires_t< bool, detail::is_bson_view_compatible< T > > | operator== (T &&lhs, view const &rhs)
| Compares a view with a type representable as a view.
template<typename T>
detail::requires_t< bool, detail::is_bson_view_compatible< T > > | operator!= (view const &lhs, T &&rhs)
| Compares a view with a type representable as a view.
template<typename T>
detail::requires_t< bool, detail::is_bson_view_compatible< T > > | operator!= (T &&lhs, view const &rhs)
| Compares a view with a type representable as a view.

## Constructor & Destructor Documentation

## view() [1/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( |  | ) |

inline noexcept

Default constructs a bson_value::view. The resulting view will be initialized to point at a bson_value of type k_null.

## view() [2/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v1::types::view const & | v | ) |

inline

Construct with the bsoncxx::v1 equivalent.

## view() [3/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_minkey | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [4/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_double | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [5/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_string | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [6/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_document | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [7/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_array | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [8/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_binary | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [9/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_undefined | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [10/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_oid | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [11/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_bool | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [12/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_date | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [13/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_null | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [14/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_regex | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [15/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_dbpointer | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [16/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_code | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [17/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_symbol | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [18/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_codewscope | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [19/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_int32 | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [20/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_timestamp | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [21/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_int64 | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [22/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_decimal128 | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## view() [23/23]

bsoncxx::v_noabi::types::bson_value::view::view | ( | v_noabi::types::b_maxkey | v | ) |

inline explicit noexcept

Construct a bson_value::view from the provided BSON type.

## Member Function Documentation

## get_array()

v_noabi::types::b_array const & bsoncxx::v_noabi::types::bson_value::view::get_array | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_binary()

v_noabi::types::b_binary const & bsoncxx::v_noabi::types::bson_value::view::get_binary | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_bool()

v_noabi::types::b_bool const & bsoncxx::v_noabi::types::bson_value::view::get_bool | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_code()

v_noabi::types::b_code const & bsoncxx::v_noabi::types::bson_value::view::get_code | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_codewscope()

v_noabi::types::b_codewscope const & bsoncxx::v_noabi::types::bson_value::view::get_codewscope | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_date()

v_noabi::types::b_date const & bsoncxx::v_noabi::types::bson_value::view::get_date | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_dbpointer()

v_noabi::types::b_dbpointer const & bsoncxx::v_noabi::types::bson_value::view::get_dbpointer | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_decimal128()

v_noabi::types::b_decimal128 const & bsoncxx::v_noabi::types::bson_value::view::get_decimal128 | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_document()

v_noabi::types::b_document const & bsoncxx::v_noabi::types::bson_value::view::get_document | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_double()

v_noabi::types::b_double const & bsoncxx::v_noabi::types::bson_value::view::get_double | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_int32()

v_noabi::types::b_int32 const & bsoncxx::v_noabi::types::bson_value::view::get_int32 | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_int64()

v_noabi::types::b_int64 const & bsoncxx::v_noabi::types::bson_value::view::get_int64 | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_maxkey()

v_noabi::types::b_maxkey const & bsoncxx::v_noabi::types::bson_value::view::get_maxkey | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_minkey()

v_noabi::types::b_minkey const & bsoncxx::v_noabi::types::bson_value::view::get_minkey | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_null()

v_noabi::types::b_null const & bsoncxx::v_noabi::types::bson_value::view::get_null | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_oid()

v_noabi::types::b_oid const & bsoncxx::v_noabi::types::bson_value::view::get_oid | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_regex()

v_noabi::types::b_regex const & bsoncxx::v_noabi::types::bson_value::view::get_regex | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_string()

v_noabi::types::b_string const & bsoncxx::v_noabi::types::bson_value::view::get_string | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_symbol()

v_noabi::types::b_symbol const & bsoncxx::v_noabi::types::bson_value::view::get_symbol | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_timestamp()

v_noabi::types::b_timestamp const & bsoncxx::v_noabi::types::bson_value::view::get_timestamp | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## get_undefined()

v_noabi::types::b_undefined const & bsoncxx::v_noabi::types::bson_value::view::get_undefined | ( |  | ) | const

Return the underlying BSON type value.

Warning
  Calling the wrong get_<type> method will cause an exception to be thrown.

## operator v1::types::view()

bsoncxx::v_noabi::types::bson_value::view::operator v1::types::view | ( |  | ) | const

inline explicit

Convert to the bsoncxx::v1 equivalent.

## type()

v_noabi::type bsoncxx::v_noabi::types::bson_value::view::type | ( |  | ) | const

inline

Returns the type of the underlying BSON value stored in this object.

Deprecated
  Use type_id() const instead (renamed).

## type_id()

v_noabi::type bsoncxx::v_noabi::types::bson_value::view::type_id | ( |  | ) | const

inline

Equivalent to type() const.

To support incremental migration to bsoncxx::v1::types::view.

## Friends And Related Symbol Documentation

## operator!=() [1/3]

template<typename T>

detail::requires_t< bool, detail::is_bson_view_compatible< T > > operator!= | ( | T && | lhs,
|  | view const & | rhs )

related

Compares a view with a type representable as a view.

Constraints
  - bsoncxx::v_noabi::types::bson_value::view is constructible from T.

## operator!=() [2/3]

template<typename T>

detail::requires_t< bool, detail::is_bson_view_compatible< T > > operator!= | ( | view const & | lhs,
|  | T && | rhs )

related

Compares a view with a type representable as a view.

Constraints
  - bsoncxx::v_noabi::types::bson_value::view is constructible from T.

## operator!= [3/3]

bool operator!= | ( | view const & | lhs,
|  | view const & | rhs )

friend

Compare two bson_value::views for equality.

## operator==() [1/3]

template<typename T>

detail::requires_t< bool, detail::is_bson_view_compatible< T > > operator== | ( | T && | lhs,
|  | view const & | rhs )

related

Compares a view with a type representable as a view.

Constraints
  - bsoncxx::v_noabi::types::bson_value::view is constructible from T.

## operator==() [2/3]

template<typename T>

detail::requires_t< bool, detail::is_bson_view_compatible< T > > operator== | ( | view const & | lhs,
|  | T && | rhs )

related

Compares a view with a type representable as a view.

Constraints
  - bsoncxx::v_noabi::types::bson_value::view is constructible from T.

## operator== [3/3]

bool operator== | ( | view const & | lhs,
|  | view const & | rhs )

friend

Compare two bson_value::views for equality.

The documentation for this class was generated from the following file:

- bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp