MongoDB C++ Driver
mongocxx-3.7.0
|
19 #include <type_traits>
21 #include <bsoncxx/types.hpp>
23 #include <bsoncxx/config/prelude.hpp>
26 BSONCXX_INLINE_NAMESPACE_BEGIN
33 namespace bson_value {
60 #define BSONCXX_ENUM(type, val) explicit view(b_##type) noexcept;
61 #include <bsoncxx/enums/type.hpp>
71 view& operator=(
const view&) noexcept;
111 BSONCXX_DEPRECATED
const b_string& get_utf8()
const;
135 const b_array& get_array()
const;
159 const b_oid& get_oid()
const;
167 const b_bool& get_bool()
const;
175 const b_date& get_date()
const;
183 const b_null& get_null()
const;
191 const b_regex& get_regex()
const;
207 const b_code& get_code()
const;
231 const b_int32& get_int32()
const;
247 const b_int64& get_int64()
const;
277 view(
const std::uint8_t* raw, std::uint32_t length, std::uint32_t offset, std::uint32_t keylen);
278 view(
void* internal_value) noexcept;
280 void _init(
void* internal_value) noexcept;
282 void BSONCXX_PRIVATE destroy() noexcept;
312 template <
typename T>
313 using not_view =
typename std::enable_if<
314 std::is_constructible<bson_value::view, T>::value &&
319 template <
typename T>
320 BSONCXX_INLINE not_view<T> operator==(
const bson_value::view& lhs, T&& rhs) {
324 template <
typename T>
325 BSONCXX_INLINE not_view<T> operator==(T&& lhs,
const bson_value::view& rhs) {
326 return bson_value::view{std::forward<T>(lhs)} == rhs;
329 template <
typename T>
330 BSONCXX_INLINE not_view<T> operator!=(
const bson_value::view& lhs, T&& rhs) {
331 return lhs != bson_value::view{std::forward<T>(rhs)};
334 template <
typename T>
335 BSONCXX_INLINE not_view<T> operator!=(T&& lhs,
const bson_value::view& rhs) {
336 return bson_value::view{std::forward<T>(lhs)} != rhs;
342 BSONCXX_INLINE_NAMESPACE_END
345 #include <bsoncxx/config/postlude.hpp>
A BSON array value.
Definition: types.hpp:197
A BSON ObjectId value.
Definition: types.hpp:262
Top level namespace for MongoDB C++ BSON functionality.
Definition: element.hpp:24
A BSON document value.
Definition: types.hpp:165
A BSON null value.
Definition: types.hpp:364
A BSON JavaScript code with scope value.
Definition: types.hpp:512
A BSON UTF-8 encoded string value.
Definition: types.hpp:122
A BSON 64-bit signed integer value.
Definition: types.hpp:596
A BSON binary data value.
Definition: types.hpp:222
A BSON Symbol value.
Definition: types.hpp:476
A BSON DBPointer value.
Definition: types.hpp:418
A BSON regex value.
Definition: types.hpp:380
A BSON max-key value.
Definition: types.hpp:667
A BSON replication timestamp value.
Definition: types.hpp:577
A BSON date value.
Definition: types.hpp:305
A BSON signed 32-bit integer value.
Definition: types.hpp:548
A BSON min-key value.
Definition: types.hpp:651
A variant view type that accesses values in serialized BSON documents.
Definition: element.hpp:76
A BSON JavaScript code value.
Definition: types.hpp:437
A BSON Decimal128 value.
Definition: types.hpp:621
type
An enumeration of each BSON type.
Definition: types.hpp:46
A BSON undefined value.
Definition: types.hpp:246
A variant owning type that represents any BSON type.
Definition: value.hpp:44
A BSON boolean value.
Definition: types.hpp:280
A BSON double value.
Definition: types.hpp:97
A view-only variant that can contain any BSON type.
Definition: view.hpp:44