MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
bsoncxx::builder::basic::array Class Reference

#include <bsoncxx/v_noabi/bsoncxx/builder/basic/array.hpp>

Description

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

Public Member Functions

 array ()
 Default constructor.
 array (array &&arr) noexcept
 Move constructor.
 ~array ()=default
 Destructor.
void clear ()
 Reset the underlying BSON to an empty array.
v_noabi::array::value extract ()
 Transfer ownership of the underlying array to the caller.
 operator v_noabi::array::view () const
 Conversion operator that provides a view of the current builder contents.
arrayoperator= (array &&arr) noexcept
 Move assignment operator.
v_noabi::array::view view () const
Public Member Functions inherited from bsoncxx::v_noabi::builder::basic::sub_array
 sub_array (core *core)
 Default constructor.
void append ()
 Inductive base-case for the variadic append(...).
template<typename Arg, typename... Args>
void append (Arg &&a, Args &&... args)
 Appends multiple BSON values.

Constructor & Destructor Documentation

◆ array() [1/2]

Default constructor.

◆ array() [2/2]

bsoncxx::v_noabi::builder::basic::array::array ( array && arr)
inlinenoexcept

Move constructor.

◆ ~array()

Member Function Documentation

◆ clear()

Reset the underlying BSON to an empty array.

◆ extract()

Transfer ownership of the underlying array to the caller.

Returns
An array::value with ownership of the array.
Warning
After calling extract() it is illegal to call any methods on this class, unless it is subsequenly moved into.

◆ operator v_noabi::array::view()

bsoncxx::v_noabi::builder::basic::array::operator v_noabi::array::view ( ) const
inline

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

Returns
A view of the current builder contents.

◆ operator=()

array & bsoncxx::v_noabi::builder::basic::array::operator= ( array && arr)
inlinenoexcept

Move assignment operator.

◆ view()

Returns
A view of the BSON array.

The documentation for this class was generated from the following file:
  • bsoncxx/v_noabi/bsoncxx/builder/basic/array.hpp