17 #include <bsoncxx/builder/basic/impl.hpp>
18 #include <bsoncxx/builder/basic/kvp.hpp>
19 #include <bsoncxx/builder/basic/sub_document.hpp>
20 #include <bsoncxx/builder/core.hpp>
21 #include <bsoncxx/document/value.hpp>
22 #include <bsoncxx/document/view.hpp>
24 #include <bsoncxx/config/prelude.hpp>
27 inline namespace v_noabi {
54 _core = std::move(doc._core);
61 BSONCXX_INLINE bsoncxx::document::view
view()
const {
71 BSONCXX_INLINE
operator bsoncxx::document::view()
const {
84 BSONCXX_INLINE bsoncxx::document::value
extract() {
109 template <
typename... Args>
110 bsoncxx::document::value BSONCXX_CALL make_document(Args&&... args) {
112 document.append(std::forward<Args>(args)...);
122 #include <bsoncxx/config/postlude.hpp>
A traditional builder-style interface for constructing a BSON document.
Definition: document.hpp:37
bsoncxx::document::value extract()
Transfer ownership of the underlying document to the caller.
Definition: document.hpp:84
bsoncxx::document::view view() const
Definition: document.hpp:61
document(document &&doc) noexcept
Move constructor.
Definition: document.hpp:47
document & operator=(document &&doc) noexcept
Move assignment operator.
Definition: document.hpp:53
document()
Default constructor.
Definition: document.hpp:42
void clear()
Reset the underlying BSON to an empty document.
Definition: document.hpp:91
An internal class of builder::basic.
Definition: sub_document.hpp:39
A low-level interface for constructing BSON documents and arrays.
Definition: core.hpp:43
void clear()
Deletes the contents of the underlying BSON datum.
document::value extract_document()
Transfers ownership of the underlying document to the caller.
document::view view_document() const
Gets a view over the document.
A JSON-like builder for creating documents.
Definition: list.hpp:142
The top-level namespace for bsoncxx library entities.
Definition: element.hpp:24