MongoDB C++ Driver
4.1.0
Toggle main menu visibility
Main Page
Files
File List
File Members
All
Macros
Namespaces
Namespace List
Namespace Members
All
b
c
e
f
k
l
m
o
r
s
t
v
w
Functions
c
e
f
k
m
o
s
t
v
Variables
Typedefs
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
~
Variables
Typedefs
b
c
d
e
f
i
k
n
p
r
v
w
Enumerations
Related Symbols
o
Topics
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Pages
Loading...
Searching...
No Matches
bsoncxx
v_noabi
bsoncxx
builder
stream
document.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/stream/document-fwd.hpp
>
18
19
#include <
bsoncxx/builder/core.hpp
>
20
#include <
bsoncxx/builder/stream/key_context.hpp
>
21
#include <
bsoncxx/builder/stream/single_context.hpp
>
22
#include <
bsoncxx/document/value.hpp
>
23
#include <
bsoncxx/document/view.hpp
>
24
25
#include <
bsoncxx/config/prelude.hpp
>
26
27
namespace
bsoncxx
{
28
namespace
v_noabi
{
29
namespace
builder
{
30
namespace
stream
{
31
40
class
document
:
public
key_context
<> {
41
public
:
45
document
() :
key_context
<>(&_core), _core(false) {}
46
50
bsoncxx::v_noabi::document::view
view
()
const
{
51
return
_core.view_document();
52
}
50
bsoncxx::v_noabi::document::view
view
()
const
{
…
}
53
57
operator
bsoncxx::v_noabi::document::view
()
const
{
58
return
view
();
59
}
57
operator
bsoncxx::v_noabi::document::view
()
const
{
…
}
60
70
bsoncxx::v_noabi::document::value
extract
() {
71
return
_core.extract_document();
72
}
70
bsoncxx::v_noabi::document::value
extract
() {
…
}
73
77
void
clear
() {
78
_core.clear();
79
}
77
void
clear
() {
…
}
80
81
private
:
82
core
_core;
83
};
40
class
document
:
public
key_context
<> {
…
};
84
85
}
// namespace stream
86
}
// namespace builder
87
}
// namespace v_noabi
88
}
// namespace bsoncxx
89
90
#include <
bsoncxx/config/postlude.hpp
>
91
postlude.hpp
The bsoncxx v_noabi macro guard postlude header.
prelude.hpp
The bsoncxx v_noabi macro guard prelude header.
bsoncxx::builder::stream::document::document
document()
Default constructor.
Definition
document.hpp:45
bsoncxx::v_noabi::builder::stream::key_context<>::key_context
key_context(core *core)
Definition
key_context.hpp:59
bsoncxx::v_noabi::builder::core
A low-level interface for constructing BSON documents and arrays.
Definition
core.hpp:46
bsoncxx::v_noabi::builder::stream::document::view
bsoncxx::v_noabi::document::view view() const
Definition
document.hpp:50
bsoncxx::v_noabi::builder::stream::document::extract
bsoncxx::v_noabi::document::value extract()
Transfer ownership of the underlying document to the caller.
Definition
document.hpp:70
bsoncxx::v_noabi::builder::stream::document::clear
void clear()
Reset the underlying BSON to an empty document.
Definition
document.hpp:77
bsoncxx::v_noabi::builder::stream::document::document
document()
Default constructor.
Definition
document.hpp:45
bsoncxx::v_noabi::document::value
A read-only BSON document that owns its underlying buffer.
Definition
value.hpp:39
bsoncxx::v_noabi::document::view
A read-only, non-owning view of a BSON document.
Definition
view.hpp:35
core.hpp
Provides bsoncxx::v_noabi::builder::core.
value.hpp
Provides bsoncxx::v_noabi::document::value.
view.hpp
Provides bsoncxx::v_noabi::document::view.
key_context.hpp
Provides bsoncxx::v_noabi::builder::stream::key_context.
bsoncxx::v_noabi::builder::stream
Declares entities used with "streaming" BSON builder syntax.
bsoncxx::v_noabi::builder
Declares entities used to build BSON documents.
bsoncxx::v_noabi
Declares entities whose ABI stability is NOT guaranteed.
bsoncxx
The top-level namespace within which all bsoncxx library entities are declared.
single_context.hpp
Provides bsoncxx::v_noabi::builder::stream::single_context.
document-fwd.hpp
Declares bsoncxx::v_noabi::builder::stream::document.
Generated by
1.13.2