MongoDB C++ Driver mongocxx-3.11.0
Loading...
Searching...
No Matches
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
18
21
23
24namespace bsoncxx {
25namespace v_noabi {
26namespace builder {
27
34
41 operator document::view() const {
42 return doc;
43 }
44
52 return doc;
53 }
54};
55
62
69 operator array::view() const {
70 return array;
71 }
72
79 array::view view() const {
80 return array;
81 }
82};
83
98 return {std::move(doc)};
99}
100
115 return {std::move(array)};
116}
117
118} // namespace builder
119} // namespace v_noabi
120} // namespace bsoncxx
121
122namespace bsoncxx {
123namespace builder {
124
125using ::bsoncxx::v_noabi::builder::concatenate;
126
127} // namespace builder
128} // namespace bsoncxx
129
131
136
137#if defined(BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
138
139namespace bsoncxx {
140namespace builder {
141
144
147
148} // namespace builder
149} // namespace bsoncxx
150
151#endif // defined(BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
Provides bsoncxx::v_noabi::array::view_or_value.
The bsoncxx macro guard postlude header.
The bsoncxx macro guard prelude header.
bsoncxx::v_noabi::builder::array
Definition list-fwd.hpp:50
A read-only, non-owning view of a BSON document.
Definition view.hpp:36
A JSON-like builder for creating arrays.
Definition list.hpp:185
operator bson_value::view()
Provides a view of the underlying BSON value.
Definition list.hpp:97
A read-only, non-owning view of a BSON document.
Definition view.hpp:35
Provides concatenators for use with "streaming" BSON builder syntax.
Provides bsoncxx::v_noabi::document::view_or_value.
v_noabi::builder::concatenate_doc concatenate(v_noabi::document::view_or_value doc)
bsoncxx::v_noabi::builder::concatenate(v_noabi::document::view_or_value doc)
concatenate_doc concatenate(document::view_or_value doc)
Helper method to concatenate a document.
Definition concatenate.hpp:97
The top-level namespace within which all bsoncxx library entities are declared.
Container to concatenate an array. Use this with the array stream builder in order to pass an array i...
Definition concatenate.hpp:60
array::view view() const
Accessor that provides a view of the wrapped concatenate array.
Definition concatenate.hpp:79
Container to concatenate a document. Use it by constructing an instance with the document to be conca...
Definition concatenate.hpp:32
document::view view() const
Accessor that provides a view of the wrapped concatenate document.
Definition concatenate.hpp:51