Loading...
Searching...
No Matches
id.hpp
Go to the documentation of this file.
// Copyright 2009-present MongoDB, Inc.
//
// Licensed under the Apache License, Version 2.0 (the "License");
// you may not use this file except in compliance with the License.
// You may obtain a copy of the License at
//
// http://www.apache.org/licenses/LICENSE-2.0
//
// Unless required by applicable law or agreed to in writing, software
// distributed under the License is distributed on an "AS IS" BASIS,
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#pragma once
#include <bsoncxx/v1/types/id-fwd.hpp> // IWYU pragma: export
//
#include <bsoncxx/v1/detail/prelude.hpp>
#include <bsoncxx/v1/config/export.hpp>
#include <cstdint>
#include <string>
namespace bsoncxx {
namespace v1 {
namespace types {
enum class id : std::int8_t {
k_minkey = -0x01,
k_double = 0x01,
k_string = 0x02,
k_document = 0x03,
k_array = 0x04,
k_binary = 0x05,
k_undefined = 0x06,
k_oid = 0x07,
k_bool = 0x08,
k_date = 0x09,
k_null = 0x0A,
k_regex = 0x0B,
k_dbpointer = 0x0C,
k_code = 0x0D,
k_symbol = 0x0E,
k_codewscope = 0x0F,
k_int32 = 0x10,
k_timestamp = 0x11,
k_int64 = 0x12,
k_decimal128 = 0x13,
k_maxkey = 0x7F,
};
BSONCXX_ABI_EXPORT_CDECL(std::string) to_string(id rhs);
enum class binary_subtype : std::uint8_t {
k_binary = 0x00,
k_function = 0x01,
k_binary_deprecated = 0x02,
k_uuid_deprecated = 0x03,
k_uuid = 0x04,
k_md5 = 0x05,
k_encrypted = 0x06,
k_column = 0x07,
k_sensitive = 0x08,
k_vector = 0x09,
k_user = 0x80,
};
BSONCXX_ABI_EXPORT_CDECL(std::string) to_string(binary_subtype rhs);
} // namespace types
} // namespace v1
} // namespace bsoncxx
#include <bsoncxx/v1/detail/postlude.hpp>
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:71
bsoncxx::v1::types::binary_subtype::k_uuid
@ k_uuid
UUID.
Definition id.hpp:76
bsoncxx::v1::types::binary_subtype::k_binary_deprecated
@ k_binary_deprecated
Binary (Old).
Definition id.hpp:74
bsoncxx::v1::types::binary_subtype::k_sensitive
@ k_sensitive
Sensitive.
Definition id.hpp:80
bsoncxx::v1::types::binary_subtype::k_md5
@ k_md5
MD5.
Definition id.hpp:77
bsoncxx::v1::types::binary_subtype::k_user
@ k_user
User defined (up to 0xFF, inclusive).
Definition id.hpp:82
bsoncxx::v1::types::binary_subtype::k_function
@ k_function
Function.
Definition id.hpp:73
bsoncxx::v1::types::binary_subtype::k_column
@ k_column
Compressed BSON column.
Definition id.hpp:79
bsoncxx::v1::types::binary_subtype::k_uuid_deprecated
@ k_uuid_deprecated
UUID (Old).
Definition id.hpp:75
bsoncxx::v1::types::binary_subtype::k_encrypted
@ k_encrypted
Encrypted BSON value.
Definition id.hpp:78
bsoncxx::v1::types::binary_subtype::k_vector
@ k_vector
Vector.
Definition id.hpp:81
bsoncxx::v1::types::id
id
Enumeration identifying a BSON type.
Definition id.hpp:37
bsoncxx::v1::types::id::k_decimal128
@ k_decimal128
128-bit decimal floating point.
Definition id.hpp:57
bsoncxx::v1::types::id::k_minkey
@ k_minkey
Min key.
Definition id.hpp:38
bsoncxx::v1::types::id::k_double
@ k_double
64-bit binary floating point.
Definition id.hpp:39
bsoncxx::v1::types::id::k_dbpointer
@ k_dbpointer
DBPointer.
Definition id.hpp:50
bsoncxx::v1::types::id::k_int64
@ k_int64
64-bit integer.
Definition id.hpp:56
bsoncxx::v1::types::id::k_codewscope
@ k_codewscope
JavaScript code with scope.
Definition id.hpp:53
bsoncxx::v1::types::id::k_regex
@ k_regex
Regular expression.
Definition id.hpp:49
bsoncxx::v1::types::id::k_string
@ k_string
UTF-8 string.
Definition id.hpp:40
bsoncxx::v1::types::id::k_array
@ k_array
Array.
Definition id.hpp:42
bsoncxx::v1::types::id::k_bool
@ k_bool
Boolean.
Definition id.hpp:46
bsoncxx::v1::types::id::k_symbol
@ k_symbol
Symbol.
Definition id.hpp:52
bsoncxx::v1::types::id::k_oid
@ k_oid
ObjectId.
Definition id.hpp:45
bsoncxx::v1::types::id::k_date
@ k_date
UTC datetime.
Definition id.hpp:47
bsoncxx::v1::types::id::k_int32
@ k_int32
32-bit integer.
Definition id.hpp:54
bsoncxx::v1::types::id::k_timestamp
@ k_timestamp
Timestamp.
Definition id.hpp:55
bsoncxx::v1::types::id::k_undefined
@ k_undefined
Undefined value.
Definition id.hpp:44
bsoncxx::v1::types::id::k_code
@ k_code
JavaScript code.
Definition id.hpp:51
bsoncxx::v1::types::id::k_document
@ k_document
Embedded document.
Definition id.hpp:41
bsoncxx::v1::types::id::k_maxkey
@ k_maxkey
Max key.
Definition id.hpp:58
bsoncxx::v1::types::id::k_binary
@ k_binary
Binary data.
Definition id.hpp:43
bsoncxx::v1::types::id::k_null
@ k_null
Null value.
Definition id.hpp:48
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.