Loading...
Searching...
No Matches
bsoncxx::v_noabi::builder::basic::document Class Reference

`#include <bsoncxx/v_noabi/bsoncxx/builder/basic/document.hpp>`

## Description

A traditional builder-style interface for constructing a BSON document.

## Public Member Functions

| document ()
| Default constructor.
| document (document &&doc) noexcept
| Move constructor.
void | clear ()
| Reset the underlying BSON to an empty document.
v_noabi::document::value | extract ()
| Transfer ownership of the underlying document to the caller.
| operator v_noabi::document::view () const
| Conversion operator that provides a view of the current builder contents.
document & | operator= (document &&doc) noexcept
| Move assignment operator.
v_noabi::document::view | view () const
Public Member Functions inherited from bsoncxx::v_noabi::builder::basic::sub_document
void | append ()
| Inductive base-case for the variadic append(...).
template<typename Arg, typename... Args>
void | append (Arg &&a, Args &&... args)
| Appends multiple basic::kvp key-value pairs.

## Constructor & Destructor Documentation

## document() [1/2]

bsoncxx::v_noabi::builder::basic::document::document | ( |  | ) |

inline

Default constructor.

## document() [2/2]

bsoncxx::v_noabi::builder::basic::document::document | ( | document && | doc | ) |

inline noexcept

Move constructor.

## Member Function Documentation

## clear()

void bsoncxx::v_noabi::builder::basic::document::clear | ( |  | ) |

inline

Reset the underlying BSON to an empty document.

## extract()

v_noabi::document::value bsoncxx::v_noabi::builder::basic::document::extract | ( |  | ) |

inline

Transfer ownership of the underlying document to the caller.

Returns
  A document::value with ownership of the document.

Warning
  After calling extract() it is illegal to call any methods on this class, unless it is subsequently moved into.

## operator v_noabi::document::view()

bsoncxx::v_noabi::builder::basic::document::operator v_noabi::document::view | ( |  | ) | const

inline

Conversion operator that provides a view of the current builder contents.

Returns
  A view of the current builder contents.

## operator=()

document & bsoncxx::v_noabi::builder::basic::document::operator= | ( | document && | doc | ) |

inline noexcept

Move assignment operator.

## view()

v_noabi::document::view bsoncxx::v_noabi::builder::basic::document::view | ( |  | ) | const

inline

Returns
  A view of the BSON document.

The documentation for this class was generated from the following file:

- bsoncxx/v_noabi/bsoncxx/builder/basic/document.hpp