MongoDB C++ Driver 4.1.0
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
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
130
131} // namespace builder
132} // namespace bsoncxx
133
135
Provides bsoncxx::v_noabi::array::view_or_value.
The bsoncxx v_noabi macro guard postlude header.
The bsoncxx v_noabi macro guard prelude header.
A JSON-like builder for creating arrays.
Definition list.hpp:174
operator types::bson_value::view()
Provides a view of the underlying BSON value.
Definition list.hpp:87
Provides concatenators for use with "streaming" BSON builder syntax.
Provides bsoncxx::v_noabi::document::view_or_value.
Declares entities used to build BSON documents.
v_noabi::view_or_value< view, value > view_or_value
Equivalent to v_noabi::view_or_value<v_noabi::array::view, v_noabi::array::value>.
Definition view_or_value.hpp:31
concatenate_doc concatenate(document::view_or_value doc)
Helper method to concatenate a document.
Definition concatenate.hpp:101
v_noabi::view_or_value< v_noabi::document::view, v_noabi::document::value > view_or_value
Equivalent to v_noabi::view_or_value<v_noabi::document::view, v_noabi::document::value>.
Definition view_or_value.hpp:30
Declares entities whose ABI stability is NOT guaranteed.
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