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);
152 bsoncxx::type type()
const;
161 stdx::string_view key()
const;
374 element operator[](stdx::string_view key)
const;
393 const std::uint8_t* _raw;
394 std::uint32_t _length;
395 std::uint32_t _offset;
400 BSONCXX_INLINE_NAMESPACE_END
403 #include <bsoncxx/config/postlude.hpp>
A BSON signed 32-bit integer value.
Definition: types.hpp:532
A BSON double value.
Definition: types.hpp:85
A BSON Symbol value.
Definition: types.hpp:461
A BSON null value.
Definition: types.hpp:349
A BSON regex value.
Definition: types.hpp:365
A BSON binary data value.
Definition: types.hpp:205
A BSON DBPointer value.
Definition: types.hpp:401
A BSON max-key value.
Definition: types.hpp:652
A BSON UTF-8 encoded string value.
Definition: types.hpp:110
A BSON date value.
Definition: types.hpp:288
A BSON min-key value.
Definition: types.hpp:636
A BSON JavaScript code value.
Definition: types.hpp:420
A BSON JavaScript code with scope value.
Definition: types.hpp:499
A BSON 64-bit signed integer value.
Definition: types.hpp:580
A BSON replication timestamp value.
Definition: types.hpp:561
A BSON document value.
Definition: types.hpp:148
A variant view type that accesses values in serialized BSON documents.
Definition: element.hpp:71
A BSON boolean value.
Definition: types.hpp:263
A variant view type that accesses values in serialized BSON arrays.
Definition: element.hpp:36
A BSON ObjectId value.
Definition: types.hpp:245
Definition: element.hpp:24
A BSON undefined value.
Definition: types.hpp:229
A BSON array value.
Definition: types.hpp:180
A variant that can contain any BSON type.
Definition: value.hpp:37
A BSON Decimal128 value.
Definition: types.hpp:605