20 #include <bsoncxx/stdx/string_view.hpp>
22 #include <bsoncxx/config/prelude.hpp>
25 BSONCXX_INLINE_NAMESPACE_BEGIN
27 enum class type : std::uint8_t;
28 enum class binary_sub_type : std::uint8_t;
92 explicit element(
const std::uint8_t* raw, std::uint32_t length, std::uint32_t offset);
97 explicit operator bool()
const;
104 const std::uint8_t* raw()
const;
112 void raw(
const std::uint8_t* raw);
119 std::uint32_t length()
const;
127 void length(std::uint32_t length);
134 std::uint32_t offset()
const;
142 void offset(std::uint32_t offset);
151 bsoncxx::type type()
const;
160 stdx::string_view key()
const;
360 element operator[](stdx::string_view key)
const;
375 const std::uint8_t* _raw;
376 std::uint32_t _length;
377 std::uint32_t _offset;
382 BSONCXX_INLINE_NAMESPACE_END
385 #include <bsoncxx/config/postlude.hpp>
A BSON signed 32-bit integer value.
Definition: types.hpp:531
A BSON double value.
Definition: types.hpp:84
A BSON Symbol value.
Definition: types.hpp:460
A BSON null value.
Definition: types.hpp:348
A BSON regex value.
Definition: types.hpp:364
A BSON binary data value.
Definition: types.hpp:204
A BSON DBPointer value.
Definition: types.hpp:400
A BSON max-key value.
Definition: types.hpp:620
A BSON UTF-8 encoded string value.
Definition: types.hpp:109
A BSON date value.
Definition: types.hpp:287
A BSON min-key value.
Definition: types.hpp:604
A BSON JavaScript code value.
Definition: types.hpp:419
A BSON JavaScript code with scope value.
Definition: types.hpp:498
A BSON 64-bit signed integer value.
Definition: types.hpp:579
A BSON replication timestamp value.
Definition: types.hpp:560
A BSON document value.
Definition: types.hpp:147
A variant view type that accesses values in serialized BSON documents.
Definition: element.hpp:70
A BSON boolean value.
Definition: types.hpp:262
A variant view type that accesses values in serialized BSON arrays.
Definition: element.hpp:36
A BSON ObjectId value.
Definition: types.hpp:244
Definition: element.hpp:24
A BSON undefined value.
Definition: types.hpp:228
A BSON array value.
Definition: types.hpp:179
A variant that can contain any BSON type.
Definition: value.hpp:37