|
MongoDB C++ Driver mongocxx-3.11.1
|
#include <bsoncxx/v_noabi/bsoncxx/array/view.hpp>
A read-only, non-owning view of a BSON document.
Classes | |
| class | const_iterator |
| A const iterator over the contents of an array view. More... | |
Public Member Functions | |
| view () | |
| Default constructs a view. The resulting view will be initialized to point at an empty BSON array. | |
| view (const std::uint8_t *data, std::size_t length) | |
| Constructs a view from a buffer. The caller is responsible for ensuring that the lifetime of the resulting view is a subset of the buffer's. | |
| const_iterator | begin () const |
| const_iterator | cbegin () const |
| const_iterator | cend () const |
| const std::uint8_t * | data () const |
| Access the raw bytes of the underlying array. | |
| bool | empty () const |
| Checks if the underlying buffer is empty, i.e. it is equivalent to the trivial array '[]'. | |
| const_iterator | end () const |
| const_iterator | find (std::uint32_t i) const |
| Indexes into this BSON array. If the index is out-of-bounds, a past-the-end iterator will be returned. As BSON represents arrays as documents, the runtime of find() is linear in the length of the array. | |
| std::size_t | length () const |
| Gets the length of the underlying buffer. | |
| operator document::view () const | |
| Conversion operator unwrapping a document::view. | |
| element | operator[] (std::uint32_t i) const |
| Indexes into this BSON array. If the index is out-of-bounds, the invalid array::element will be returned. As BSON represents arrays as documents, the runtime of operator[] is linear in the length of the array. | |
Related Symbols | |
(Note that these are not member symbols.) | |
| bool | operator== (view, view) |
| Compare two views for (in)-equality. | |
| bool | operator!= (view, view) |
| Compare two views for (in)-equality. | |
| bsoncxx::v_noabi::array::view::view | ( | ) |
Default constructs a view. The resulting view will be initialized to point at an empty BSON array.
| bsoncxx::v_noabi::array::view::view | ( | const std::uint8_t * | data, |
| std::size_t | length ) |
Constructs a view from a buffer. The caller is responsible for ensuring that the lifetime of the resulting view is a subset of the buffer's.
| data | A buffer containing a valid BSON array. |
| length | The size of the buffer, in bytes. |
| const_iterator bsoncxx::v_noabi::array::view::begin | ( | ) | const |
| const_iterator bsoncxx::v_noabi::array::view::cbegin | ( | ) | const |
| const_iterator bsoncxx::v_noabi::array::view::cend | ( | ) | const |
| const std::uint8_t * bsoncxx::v_noabi::array::view::data | ( | ) | const |
Access the raw bytes of the underlying array.
| bool bsoncxx::v_noabi::array::view::empty | ( | ) | const |
Checks if the underlying buffer is empty, i.e. it is equivalent to the trivial array '[]'.
| const_iterator bsoncxx::v_noabi::array::view::end | ( | ) | const |
| const_iterator bsoncxx::v_noabi::array::view::find | ( | std::uint32_t | i | ) | const |
Indexes into this BSON array. If the index is out-of-bounds, a past-the-end iterator will be returned. As BSON represents arrays as documents, the runtime of find() is linear in the length of the array.
| i | The index of the element. |
| std::size_t bsoncxx::v_noabi::array::view::length | ( | ) | const |
Gets the length of the underlying buffer.
| bsoncxx::v_noabi::array::view::operator document::view | ( | ) | const |
Conversion operator unwrapping a document::view.
| element bsoncxx::v_noabi::array::view::operator[] | ( | std::uint32_t | i | ) | const |
Indexes into this BSON array. If the index is out-of-bounds, the invalid array::element will be returned. As BSON represents arrays as documents, the runtime of operator[] is linear in the length of the array.
| i | The index of the element. |