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