MongoDB C++ Driver
mongocxx-3.6.0
|
19 #include <bsoncxx/types/bson_value/view.hpp>
21 #include <bsoncxx/config/prelude.hpp>
24 BSONCXX_INLINE_NAMESPACE_BEGIN
27 namespace bson_value {
73 value(
void* internal_value);
75 friend value make_owning_bson(
void* internal_value);
77 class BSONCXX_PRIVATE impl;
78 std::unique_ptr<impl> _impl;
92 BSONCXX_INLINE
bool operator!=(
const value& lhs,
const value& rhs) {
108 return (lhs.
view() == rhs);
111 BSONCXX_INLINE
bool operator==(
const view& lhs,
const value& rhs) {
115 BSONCXX_INLINE
bool operator!=(
const value& lhs,
const view& rhs) {
116 return !(lhs == rhs);
119 BSONCXX_INLINE
bool operator!=(
const view& lhs,
const value& rhs) {
120 return !(lhs == rhs);
130 BSONCXX_INLINE_NAMESPACE_END
133 #include <bsoncxx/config/postlude.hpp>
bool operator==(const value &lhs, const view &rhs)
Compares a value with a view for (in)-equality.
Definition: value.hpp:107
Top level namespace for MongoDB C++ BSON functionality.
Definition: element.hpp:24
std::uint32_t length() const
Getter for length of the raw bson bytes the element points to.
bson_value::view view() const noexcept
Get a view over the bson_value owned by this object.
const std::uint8_t * raw() const
Getter for the raw bson bytes the element points to.
A variant view type that accesses values in serialized BSON documents.
Definition: element.hpp:76
std::uint32_t keylen() const
Getter for the element's key length.
bool operator==(const value &lhs, const value &rhs)
Compares values for (in)-equality.
Definition: value.hpp:88
A variant owning type that represents any BSON type.
Definition: value.hpp:39
A view-only variant that can contain any BSON type.
Definition: view.hpp:44
std::uint32_t offset() const
Getter for the offset into the raw bson bytes the element points to.