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;
93 explicit element(
const std::uint8_t* raw, std::uint32_t length, std::uint32_t offset);
98 explicit operator bool()
const;
105 const std::uint8_t* raw()
const;
113 void raw(
const std::uint8_t* raw);
120 std::uint32_t length()
const;
128 void length(std::uint32_t length);
135 std::uint32_t offset()
const;
143 void offset(std::uint32_t offset);
150 bsoncxx::type type()
const;
157 stdx::string_view key()
const;
359 element operator[](stdx::string_view key)
const;
376 const std::uint8_t* _raw;
377 std::uint32_t _length;
378 std::uint32_t _offset;
383 BSONCXX_INLINE_NAMESPACE_END
386 #include <bsoncxx/config/postlude.hpp>
A BSON signed 32-bit integer value.
Definition: types.hpp:538
A BSON double value.
Definition: types.hpp:84
A BSON JavaScript code value.
Definition: types.hpp:465
A BSON null value.
Definition: types.hpp:346
A BSON regex value.
Definition: types.hpp:366
A BSON binary data value.
Definition: types.hpp:202
A BSON DBPointer value.
Definition: types.hpp:402
A BSON max-key value.
Definition: types.hpp:635
A BSON UTF-8 encoded string value.
Definition: types.hpp:109
A BSON date value.
Definition: types.hpp:286
A BSON min-key value.
Definition: types.hpp:615
A BSON JavaScript code value.
Definition: types.hpp:425
A BSON JavaScript code with scope value.
Definition: types.hpp:505
A BSON 64-bit signed integer value.
Definition: types.hpp:586
A BSON replication timestamp value.
Definition: types.hpp:567
A BSON document value.
Definition: types.hpp:145
A variant view type that accesses values in serialized BSON documents.
Definition: element.hpp:70
A BSON boolean value.
Definition: types.hpp:261
A variant view type that accesses values in serialized BSON arrays.
Definition: element.hpp:36
A BSON ObjectId value.
Definition: types.hpp:243
Definition: element.hpp:24
A BSON undefined value.
Definition: types.hpp:227
A BSON array value.
Definition: types.hpp:177
A variant that can contain any BSON type.
Definition: value.hpp:37