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 types::bson_value::view ()
| Provides a view of the underlying BSON value.
types::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

  value | the BSON value

See also
  - bsoncxx::v_noabi::types::bson_value::value.

## 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

  init | the 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
  - bsoncxx::v_noabi::builder::document
  - bsoncxx::v_noabi::builder::array

## Member Function Documentation

## operator types::bson_value::view()

bsoncxx::v_noabi::builder::list::operator types::bson_value::view | ( |  | ) |

inline

Provides a view of the underlying BSON value.

See also
  - bsoncxx::v_noabi::types::bson_value::view.

## view()

types::bson_value::view bsoncxx::v_noabi::builder::list::view | ( |  | ) |

inline

Provides a view of the underlying BSON value.

See also
  - bsoncxx::v_noabi::types::bson_value::view.

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

- bsoncxx/v_noabi/bsoncxx/builder/list.hpp