MongoDB C++ Driver
mongocxx-4.0.0
Loading...
Searching...
No Matches
mongocxx
v_noabi
mongocxx
result
gridfs
upload.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 <
mongocxx/result/gridfs/upload-fwd.hpp
>
18
19
#include <
bsoncxx/array/value.hpp
>
20
#include <
bsoncxx/types/bson_value/view.hpp
>
21
22
#include <
mongocxx/config/prelude.hpp
>
23
24
namespace
mongocxx
{
25
namespace
v_noabi {
26
namespace
result {
27
namespace
gridfs {
28
30
class
upload
{
31
public
:
32
MONGOCXX_ABI_EXPORT_CDECL
()
upload
(
bsoncxx::v_noabi::types::bson_value::view
id
);
33
39
MONGOCXX_ABI_EXPORT_CDECL
(
const
bsoncxx::v_noabi::types::bson_value::view
&)
id
()
const
;
40
41
friend
MONGOCXX_ABI_EXPORT_CDECL
(
bool
) operator==(
const
upload
&,
const
upload
&);
42
friend
MONGOCXX_ABI_EXPORT_CDECL
(
bool
) operator!=(
const
upload
&,
const
upload
&);
43
44
private
:
45
// Array with a single element, containing the value of the _id field for the inserted files
46
// collection document.
47
bsoncxx::v_noabi::array::value
_id_owned;
48
49
// Points into _id_owned.
50
bsoncxx::v_noabi::types::bson_value::view
_id;
51
};
52
53
}
// namespace gridfs
54
}
// namespace result
55
}
// namespace v_noabi
56
}
// namespace mongocxx
57
58
#include <
mongocxx/config/postlude.hpp
>
59
value.hpp
Provides bsoncxx::v_noabi::array::value.
bsoncxx::v_noabi::array::value
A read-only BSON array that owns its underlying buffer. When a array::value goes out of scope,...
Definition
value.hpp:36
bsoncxx::v_noabi::types::bson_value::view
A view-only variant that can contain any BSON type.
Definition
view.hpp:54
mongocxx::v_noabi::result::gridfs::upload
Class representing the result of a GridFS upload operation.
Definition
upload.hpp:30
mongocxx::v_noabi::result::gridfs::upload::id
const bsoncxx::v_noabi::types::bson_value::view & id() const
Gets the id of the uploaded GridFS file.
MONGOCXX_ABI_EXPORT_CDECL
#define MONGOCXX_ABI_EXPORT_CDECL(...)
Equivalent to MONGOCXX_ABI_EXPORT with MONGOCXX_ABI_CDECL.
Definition
fwd.hpp:204
postlude.hpp
The mongocxx macro guard postlude header.
prelude.hpp
The mongocxx macro guard prelude header.
mongocxx
The top-level namespace within which all mongocxx library entities are declared.
upload-fwd.hpp
Declares mongocxx::v_noabi::result::gridfs::upload.
view.hpp
Provides bsoncxx::v_noabi::types::bson_value::view.
Generated by
1.12.0