MongoDB C++ Driver
mongocxx-3.10.2
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Enumerations
Classes
Class List
Class Index
Class Hierarchy
Class Members
All
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Functions
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
z
~
Typedefs
Enumerations
Related Functions
Files
File List
Examples
•
All
Classes
Namespaces
Functions
Typedefs
Enumerations
Enumerator
Friends
Pages
src
bsoncxx
include
bsoncxx
v_noabi
bsoncxx
builder
stream
array.hpp
1
// Copyright 2014 MongoDB Inc.
2
//
3
// Licensed under the Apache License, Version 2.0 (the "License");
4
// you may not use this file except in compliance with the License.
5
// You may obtain a copy of the License at
6
//
7
// http://www.apache.org/licenses/LICENSE-2.0
8
//
9
// Unless required by applicable law or agreed to in writing, software
10
// distributed under the License is distributed on an "AS IS" BASIS,
11
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
// See the License for the specific language governing permissions and
13
// limitations under the License.
14
15
#pragma once
16
17
#include <bsoncxx/builder/stream/array-fwd.hpp>
18
19
#include <bsoncxx/array/value.hpp>
20
#include <bsoncxx/array/view.hpp>
21
#include <bsoncxx/builder/core.hpp>
22
#include <bsoncxx/builder/stream/array_context.hpp>
23
#include <bsoncxx/builder/stream/key_context.hpp>
24
#include <bsoncxx/builder/stream/single_context.hpp>
25
#include <bsoncxx/builder/stream/value_context.hpp>
26
27
#include <bsoncxx/config/prelude.hpp>
28
29
namespace
bsoncxx
{
30
namespace
v_noabi {
31
namespace
builder {
32
namespace
stream {
33
42
class
array
:
public
array_context
<> {
43
public
:
47
BSONCXX_INLINE
array
() :
array_context
<>(&_core), _core(true) {}
48
52
BSONCXX_INLINE
bsoncxx::v_noabi::array::view
view
()
const
{
53
return
_core.
view_array
();
54
}
55
59
BSONCXX_INLINE
operator
bsoncxx::v_noabi::array::view
()
const
{
60
return
view
();
61
}
62
72
BSONCXX_INLINE
bsoncxx::v_noabi::array::value
extract
() {
73
return
_core.
extract_array
();
74
}
75
79
BSONCXX_INLINE
void
clear
() {
80
_core.
clear
();
81
}
82
83
private
:
84
core
_core;
85
};
86
87
}
// namespace stream
88
}
// namespace builder
89
}
// namespace v_noabi
90
}
// namespace bsoncxx
91
92
#include <bsoncxx/config/postlude.hpp>
bsoncxx::v_noabi::array::value
A read-only BSON array that owns its underlying buffer.
Definition:
value.hpp:36
bsoncxx::v_noabi::array::view
A read-only, non-owning view of a BSON document.
Definition:
view.hpp:36
bsoncxx::v_noabi::builder::core
A low-level interface for constructing BSON documents and arrays.
Definition:
core.hpp:45
bsoncxx::v_noabi::builder::core::clear
void clear()
Deletes the contents of the underlying BSON datum.
bsoncxx::v_noabi::builder::core::view_array
bsoncxx::v_noabi::array::view view_array() const
Gets a view over the array.
bsoncxx::v_noabi::builder::core::extract_array
bsoncxx::v_noabi::array::value extract_array()
Transfers ownership of the underlying document to the caller.
bsoncxx::v_noabi::builder::stream::array_context
A stream context which expects any number of values.
Definition:
array_context.hpp:51
bsoncxx::v_noabi::builder::stream::array
A streaming interface for constructing a BSON array.
Definition:
array.hpp:42
bsoncxx::v_noabi::builder::stream::array::array
array()
Default constructor.
Definition:
array.hpp:47
bsoncxx::v_noabi::builder::stream::array::view
bsoncxx::v_noabi::array::view view() const
Definition:
array.hpp:52
bsoncxx::v_noabi::builder::stream::array::extract
bsoncxx::v_noabi::array::value extract()
Transfer ownership of the underlying array to the caller.
Definition:
array.hpp:72
bsoncxx::v_noabi::builder::stream::array::clear
void clear()
Reset the underlying BSON to an empty array.
Definition:
array.hpp:79
bsoncxx
The top-level namespace for bsoncxx library entities.
Definition:
element-fwd.hpp:19
Generated by
1.9.1