17 #include <bsoncxx/array/value.hpp>
18 #include <bsoncxx/array/view.hpp>
19 #include <bsoncxx/builder/basic/impl.hpp>
20 #include <bsoncxx/builder/basic/kvp.hpp>
21 #include <bsoncxx/builder/basic/sub_array.hpp>
22 #include <bsoncxx/builder/core.hpp>
24 #include <bsoncxx/config/prelude.hpp>
27 inline namespace v_noabi {
51 _core = std::move(arr._core);
58 BSONCXX_INLINE bsoncxx::array::view
view()
const {
68 BSONCXX_INLINE
operator bsoncxx::array::view()
const {
81 BSONCXX_INLINE bsoncxx::array::value
extract() {
106 template <
typename... Args>
107 bsoncxx::array::value BSONCXX_CALL make_array(Args&&... args) {
109 array.append(std::forward<Args>(args)...);
111 return array.extract();
119 #include <bsoncxx/config/postlude.hpp>
A JSON-like builder for creating arrays.
Definition: list.hpp:166
A traditional builder-style interface for constructing a BSON array.
Definition: array.hpp:35
void clear()
Reset the underlying BSON to an empty array.
Definition: array.hpp:88
array & operator=(array &&arr) noexcept
Move assignment operator.
Definition: array.hpp:50
bsoncxx::array::value extract()
Transfer ownership of the underlying array to the caller.
Definition: array.hpp:81
array(array &&arr) noexcept
Move constructor.
Definition: array.hpp:45
bsoncxx::array::view view() const
Definition: array.hpp:58
array()
Default constructor.
Definition: array.hpp:40
An internal class of builder::basic.
Definition: sub_array.hpp:39
sub_array(core *core)
Default constructor.
Definition: sub_array.hpp:44
A low-level interface for constructing BSON documents and arrays.
Definition: core.hpp:43
void clear()
Deletes the contents of the underlying BSON datum.
array::view view_array() const
Gets a view over the array.
array::value extract_array()
Transfers ownership of the underlying document to the caller.
The top-level namespace for bsoncxx library entities.
Definition: element.hpp:24