MongoDB C++ Driver
current
Loading...
Searching...
No Matches
bsoncxx
v_noabi
bsoncxx
builder
concatenate.hpp
Go to the documentation of this file.
1
// Copyright 2009-present 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/concatenate-fwd.hpp
>
18
19
#include <
bsoncxx/array/view_or_value.hpp
>
20
#include <
bsoncxx/document/view_or_value.hpp
>
21
22
#include <
bsoncxx/config/prelude.hpp
>
23
24
namespace
bsoncxx
{
25
namespace
v_noabi {
26
namespace
builder {
27
34
struct
concatenate_doc
{
35
document::view_or_value
doc;
36
43
operator
document::view
()
const
{
44
return
doc;
45
}
46
53
document::view
view
()
const
{
54
return
doc;
55
}
56
};
57
64
struct
concatenate_array
{
65
array::view_or_value
array
;
66
73
operator
array::view
()
const
{
74
return
array
;
75
}
76
83
array::view
view
()
const
{
84
return
array
;
85
}
86
};
87
101
inline
concatenate_doc
concatenate
(
document::view_or_value
doc) {
102
return
{std::move(doc)};
103
}
104
118
inline
concatenate_array
concatenate
(
array::view_or_value
array
) {
119
return
{std::move(
array
)};
120
}
121
122
}
// namespace builder
123
}
// namespace v_noabi
124
}
// namespace bsoncxx
125
126
namespace
bsoncxx
{
127
namespace
builder {
128
129
using ::bsoncxx::v_noabi::builder::concatenate;
130
131
}
// namespace builder
132
}
// namespace bsoncxx
133
134
#include <
bsoncxx/config/postlude.hpp
>
135
view_or_value.hpp
Provides bsoncxx::v_noabi::array::view_or_value.
postlude.hpp
The bsoncxx v_noabi macro guard postlude header.
prelude.hpp
The bsoncxx v_noabi macro guard prelude header.
bsoncxx::v_noabi::array::view
A read-only, non-owning view of a BSON document.
Definition
view.hpp:36
bsoncxx::v_noabi::builder::array
A JSON-like builder for creating arrays.
Definition
list.hpp:174
bsoncxx::v_noabi::builder::list::view
operator types::bson_value::view()
Provides a view of the underlying BSON value.
Definition
list.hpp:87
bsoncxx::v_noabi::document::view
A read-only, non-owning view of a BSON document.
Definition
view.hpp:35
bsoncxx::v_noabi::view_or_value< v_noabi::document::view, v_noabi::document::value >
concatenate-fwd.hpp
Provides concatenators for use with "streaming" BSON builder syntax.
view_or_value.hpp
Provides bsoncxx::v_noabi::document::view_or_value.
bsoncxx::v_noabi::builder::concatenate
concatenate_doc concatenate(document::view_or_value doc)
Helper method to concatenate a document.
Definition
concatenate.hpp:101
bsoncxx
The top-level namespace within which all bsoncxx library entities are declared.
bsoncxx::v_noabi::builder::concatenate_array
Container to concatenate an array.
Definition
concatenate.hpp:64
bsoncxx::v_noabi::builder::concatenate_array::view
array::view view() const
Accessor that provides a view of the wrapped concatenate array.
Definition
concatenate.hpp:83
bsoncxx::v_noabi::builder::concatenate_doc
Container to concatenate a document.
Definition
concatenate.hpp:34
bsoncxx::v_noabi::builder::concatenate_doc::view
document::view view() const
Accessor that provides a view of the wrapped concatenate document.
Definition
concatenate.hpp:53
Generated by
1.9.8