MongoDB C++ Driver mongocxx-4.0.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
36
43 operator document::view() const {
44 return doc;
45 }
46
54 return doc;
55 }
56};
57
66
73 operator array::view() const {
74 return array;
75 }
76
83 array::view view() const {
84 return array;
85 }
86};
87
102 return {std::move(doc)};
103}
104
119 return {std::move(array)};
120}
121
122} // namespace builder
123} // namespace v_noabi
124} // namespace bsoncxx
125
126namespace bsoncxx {
127namespace builder {
128
129using ::bsoncxx::v_noabi::builder::concatenate;
130
131} // namespace builder
132} // namespace bsoncxx
133
135
140
141#if defined(BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
142
143namespace bsoncxx {
144namespace builder {
145
148
151
152} // namespace builder
153} // namespace bsoncxx
154
155#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:175
operator types::bson_value::view()
Provides a view of the underlying BSON value.
Definition list.hpp:87
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:101
The top-level namespace within which all bsoncxx library entities are declared.
Container to concatenate an array.
Definition concatenate.hpp:64
array::view view() const
Accessor that provides a view of the wrapped concatenate array.
Definition concatenate.hpp:83
Container to concatenate a document.
Definition concatenate.hpp:34
document::view view() const
Accessor that provides a view of the wrapped concatenate document.
Definition concatenate.hpp:53