MongoDB C++ Driver
mongocxx-3.7.0
|
21 #include <bsoncxx/array/view_or_value.hpp>
22 #include <bsoncxx/document/view_or_value.hpp>
23 #include <bsoncxx/stdx/make_unique.hpp>
24 #include <bsoncxx/types/bson_value/view.hpp>
26 #include <bsoncxx/config/prelude.hpp>
29 BSONCXX_INLINE_NAMESPACE_BEGIN
32 namespace bson_value {
55 #define BSONCXX_ENUM(name, val) value(b_##name v);
56 #include <bsoncxx/enums/type.hpp>
72 value(stdx::string_view v);
107 value(std::chrono::milliseconds v);
112 value(std::nullptr_t);
177 value(stdx::string_view regex, stdx::string_view options);
198 value(
const type id, stdx::string_view v);
233 value(
const type id, uint64_t a, uint64_t b);
267 value(
void* internal_value);
269 friend value make_owning_bson(
void* internal_value);
271 class BSONCXX_PRIVATE impl;
272 std::unique_ptr<impl> _impl;
286 BSONCXX_INLINE
bool operator!=(
const value& lhs,
const value& rhs) {
287 return !(lhs == rhs);
302 return (lhs.
view() == rhs);
305 BSONCXX_INLINE
bool operator==(
const view& lhs,
const value& rhs) {
309 BSONCXX_INLINE
bool operator!=(
const value& lhs,
const view& rhs) {
310 return !(lhs == rhs);
313 BSONCXX_INLINE
bool operator!=(
const view& lhs,
const value& rhs) {
314 return !(lhs == rhs);
324 BSONCXX_INLINE_NAMESPACE_END
327 #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:301
Top level namespace for MongoDB C++ BSON functionality.
Definition: element.hpp:24
binary_sub_type
An enumeration of each BSON binary sub type.
Definition: types.hpp:66
A read-only, non-owning view of a BSON document.
Definition: view.hpp:40
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.
Represents a MongoDB ObjectId.
Definition: oid.hpp:38
Represents an IEEE 754-2008 BSON Decimal128 value in a platform-independent way.
Definition: decimal128.hpp:30
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.
type
An enumeration of each BSON type.
Definition: types.hpp:46
bool operator==(const value &lhs, const value &rhs)
Compares values for (in)-equality.
Definition: value.hpp:282
A variant owning type that represents any BSON type.
Definition: value.hpp:44
A read-only, non-owning view of a BSON document.
Definition: view.hpp:33
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.