MongoDB C++ Driver
4.2.0
Loading...
Searching...
No Matches
id.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/v1/types/id-fwd.hpp
>
// IWYU pragma: export
18
19
//
20
21
#include <
bsoncxx/v1/detail/prelude.hpp
>
22
23
#include <
bsoncxx/v1/config/export.hpp
>
24
25
#include <cstdint>
26
#include <string>
27
28
namespace
bsoncxx
{
29
namespace
v1
{
30
namespace
types
{
31
39
enum class
id
: std::int8_t {
40
k_minkey
= -0x01,
41
k_double
= 0x01,
42
k_string
= 0x02,
43
k_document
= 0x03,
44
k_array
= 0x04,
45
k_binary
= 0x05,
46
k_undefined
= 0x06,
47
k_oid
= 0x07,
48
k_bool
= 0x08,
49
k_date
= 0x09,
50
k_null
= 0x0A,
51
k_regex
= 0x0B,
52
k_dbpointer
= 0x0C,
53
k_code
= 0x0D,
54
k_symbol
= 0x0E,
55
k_codewscope
= 0x0F,
56
k_int32
= 0x10,
57
k_timestamp
= 0x11,
58
k_int64
= 0x12,
59
k_decimal128
= 0x13,
60
k_maxkey
= 0x7F,
61
};
62
68
BSONCXX_ABI_EXPORT_CDECL
(std::string)
to_string
(
id
rhs);
69
77
enum class
binary_subtype
: std::uint8_t {
78
k_binary
= 0x00,
79
k_function
= 0x01,
80
k_binary_deprecated
= 0x02,
81
k_uuid_deprecated
= 0x03,
82
k_uuid
= 0x04,
83
k_md5
= 0x05,
84
k_encrypted
= 0x06,
85
k_column
= 0x07,
86
k_sensitive
= 0x08,
87
k_vector
= 0x09,
88
k_user
= 0x80,
89
};
90
98
BSONCXX_ABI_EXPORT_CDECL
(std::string)
to_string
(
binary_subtype
rhs);
99
100
}
// namespace types
101
}
// namespace v1
102
}
// namespace bsoncxx
103
104
#include <
bsoncxx/v1/detail/postlude.hpp
>
105
export.hpp
Provides macros to control the set of symbols exported in the ABI.
BSONCXX_ABI_EXPORT_CDECL
#define BSONCXX_ABI_EXPORT_CDECL(...)
Equivalent to BSONCXX_ABI_EXPORT with BSONCXX_ABI_CDECL.
Definition
export.hpp:52
postlude.hpp
The bsoncxx v1 macro guard postlude header.
prelude.hpp
The bsoncxx v1 macro guard prelude header.
bsoncxx::v1::types
Declares entities representing a BSON type value.
bsoncxx::v1::types::to_string
std::string to_string(id rhs)
Return the name of the enumerator (e.g. "double" given k_double).
bsoncxx::v1::types::binary_subtype
binary_subtype
Enumeration identifying a BSON binary subtype.
Definition
id.hpp:77
bsoncxx::v1::types::binary_subtype::k_uuid
@ k_uuid
UUID.
Definition
id.hpp:82
bsoncxx::v1::types::binary_subtype::k_binary_deprecated
@ k_binary_deprecated
Binary (Old).
Definition
id.hpp:80
bsoncxx::v1::types::binary_subtype::k_sensitive
@ k_sensitive
Sensitive.
Definition
id.hpp:86
bsoncxx::v1::types::binary_subtype::k_md5
@ k_md5
MD5.
Definition
id.hpp:83
bsoncxx::v1::types::binary_subtype::k_user
@ k_user
User defined (up to 0xFF, inclusive).
Definition
id.hpp:88
bsoncxx::v1::types::binary_subtype::k_function
@ k_function
Function.
Definition
id.hpp:79
bsoncxx::v1::types::binary_subtype::k_column
@ k_column
Compressed BSON column.
Definition
id.hpp:85
bsoncxx::v1::types::binary_subtype::k_uuid_deprecated
@ k_uuid_deprecated
UUID (Old).
Definition
id.hpp:81
bsoncxx::v1::types::binary_subtype::k_encrypted
@ k_encrypted
Encrypted BSON value.
Definition
id.hpp:84
bsoncxx::v1::types::binary_subtype::k_vector
@ k_vector
Vector.
Definition
id.hpp:87
bsoncxx::v1::types::id
id
Enumeration identifying a BSON type.
Definition
id.hpp:39
bsoncxx::v1::types::id::k_decimal128
@ k_decimal128
128-bit decimal floating point.
Definition
id.hpp:59
bsoncxx::v1::types::id::k_minkey
@ k_minkey
Min key.
Definition
id.hpp:40
bsoncxx::v1::types::id::k_double
@ k_double
64-bit binary floating point.
Definition
id.hpp:41
bsoncxx::v1::types::id::k_dbpointer
@ k_dbpointer
DBPointer.
Definition
id.hpp:52
bsoncxx::v1::types::id::k_int64
@ k_int64
64-bit integer.
Definition
id.hpp:58
bsoncxx::v1::types::id::k_codewscope
@ k_codewscope
JavaScript code with scope.
Definition
id.hpp:55
bsoncxx::v1::types::id::k_regex
@ k_regex
Regular expression.
Definition
id.hpp:51
bsoncxx::v1::types::id::k_string
@ k_string
UTF-8 string.
Definition
id.hpp:42
bsoncxx::v1::types::id::k_array
@ k_array
Array.
Definition
id.hpp:44
bsoncxx::v1::types::id::k_bool
@ k_bool
Boolean.
Definition
id.hpp:48
bsoncxx::v1::types::id::k_symbol
@ k_symbol
Symbol.
Definition
id.hpp:54
bsoncxx::v1::types::id::k_oid
@ k_oid
ObjectId.
Definition
id.hpp:47
bsoncxx::v1::types::id::k_date
@ k_date
UTC datetime.
Definition
id.hpp:49
bsoncxx::v1::types::id::k_int32
@ k_int32
32-bit integer.
Definition
id.hpp:56
bsoncxx::v1::types::id::k_timestamp
@ k_timestamp
Timestamp.
Definition
id.hpp:57
bsoncxx::v1::types::id::k_undefined
@ k_undefined
Undefined value.
Definition
id.hpp:46
bsoncxx::v1::types::id::k_code
@ k_code
JavaScript code.
Definition
id.hpp:53
bsoncxx::v1::types::id::k_document
@ k_document
Embedded document.
Definition
id.hpp:43
bsoncxx::v1::types::id::k_maxkey
@ k_maxkey
Max key.
Definition
id.hpp:60
bsoncxx::v1::types::id::k_binary
@ k_binary
Binary data.
Definition
id.hpp:45
bsoncxx::v1::types::id::k_null
@ k_null
Null value.
Definition
id.hpp:50
bsoncxx::v1
Declares entities whose ABI stability is guaranteed for documented symbols.
bsoncxx
The top-level namespace within which all bsoncxx library entities are declared.
id-fwd.hpp
Declares enumerations identifying the type of a BSON element.
bsoncxx
v1
types
id.hpp
Generated by
1.15.0