MongoDB C++ Driver mongocxx-3.11.0
Loading...
Searching...
No Matches
bsoncxx::v_noabi::builder::list Class Reference

#include <bsoncxx/v_noabi/bsoncxx/builder/list.hpp>

Description

A JSON-like builder for creating documents and arrays.

Public Member Functions

 list ()
 Creates an empty document.
 
 list (initializer_list_t init)
 Creates a BSON document, if possible. Otherwise, it will create a BSON array. A document is possible if:
 
template<typename T >
 list (T value)
 Creates a bsoncxx::v_noabi::builder::list from a value of type T. T must be a bsoncxx::v_noabi::types::bson_value::value or implicitly convertible to a bsoncxx::v_noabi::types::bson_value::value.
 
 operator bson_value::view ()
 Provides a view of the underlying BSON value.
 
bson_value::view view ()
 Provides a view of the underlying BSON value.
 

Constructor & Destructor Documentation

◆ list() [1/3]

bsoncxx::v_noabi::builder::list::list ( )
inline

Creates an empty document.

◆ list() [2/3]

template<typename T >
bsoncxx::v_noabi::builder::list::list ( T value)
inline

Creates a bsoncxx::v_noabi::builder::list from a value of type T. T must be a bsoncxx::v_noabi::types::bson_value::value or implicitly convertible to a bsoncxx::v_noabi::types::bson_value::value.

Parameters
valuethe BSON value
See also

◆ list() [3/3]

bsoncxx::v_noabi::builder::list::list ( initializer_list_t init)
inline

Creates a BSON document, if possible. Otherwise, it will create a BSON array. A document is possible if:

Parameters
initthe initializer list used to construct the BSON document or array
Note
to enforce the creation of a BSON document or array use the bsoncxx::v_noabi::builder::document or bsoncxx::v_noabi::builder::array constructor, respectively.
See also

Member Function Documentation

◆ operator bson_value::view()

bsoncxx::v_noabi::builder::list::operator bson_value::view ( )
inline

Provides a view of the underlying BSON value.

See also

◆ view()

bson_value::view bsoncxx::v_noabi::builder::list::view ( )
inline

Provides a view of the underlying BSON value.

See also

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