MongoDB C++ Driver 4.2.0
Loading...
Searching...
No Matches
id-fwd.hpp File Reference

Description

Declares enumerations identifying the type of a BSON element.

Go to the source code of this file.

Namespaces

namespace  bsoncxx
 The top-level namespace within which all bsoncxx library entities are declared.
namespace  bsoncxx::v1
 Declares entities whose ABI stability is guaranteed for documented symbols.
namespace  bsoncxx::v1::types
 Declares entities representing a BSON type value.

Macros

#define BSONCXX_V1_BINARY_SUBTYPES_XMACRO(X)
 X-macro over the name and value of BSON binary subtypes.
#define BSONCXX_V1_TYPES_XMACRO(X)
 X-macro over the name and value of BSON types.

Macro Definition Documentation

◆ BSONCXX_V1_BINARY_SUBTYPES_XMACRO

#define BSONCXX_V1_BINARY_SUBTYPES_XMACRO ( X)
Value:
X(binary, 0x00) \
X(function, 0x01) \
X(binary_deprecated, 0x02) \
X(uuid_deprecated, 0x03) \
X(uuid, 0x04) \
X(md5, 0x05) \
X(encrypted, 0x06) \
X(column, 0x07) \
X(sensitive, 0x08) \
X(vector, 0x09) \
X(user, 0x80)

X-macro over the name and value of BSON binary subtypes.

Important
The addition of new expansions to this X-macro ARE NOT considered an API breaking change. The modification or removal of existing expansions to this X-macro ARE considered an API breaking change. This X-macro MUST be used in a manner that is compatible with these API compatibility guidelines!
Example
#define EXAMPLE(name, value) std::cout << #name << ": " << value << '\n';
void print_bson_binary_subtypes() {
// Expands to:
// std::cout << ("binary") << ": " << (0x00) << '\n';
// std::cout << ("function") << ": " << (0x01) << '\n';
// ...
}
#define BSONCXX_V1_BINARY_SUBTYPES_XMACRO(X)
X-macro over the name and value of BSON binary subtypes.
Definition id-fwd.hpp:91
Parameters
Xthe user-defined macro to be expanded.

◆ BSONCXX_V1_TYPES_XMACRO

#define BSONCXX_V1_TYPES_XMACRO ( X)
Value:
X(minkey, -0x01) \
X(double, 0x01) \
X(string, 0x02) \
X(document, 0x03) \
X(array, 0x04) \
X(binary, 0x05) \
X(undefined, 0x06) \
X(oid, 0x07) \
X(bool, 0x08) \
X(date, 0x09) \
X(null, 0x0A) \
X(regex, 0x0B) \
X(dbpointer, 0x0C) \
X(code, 0x0D) \
X(symbol, 0x0E) \
X(codewscope, 0x0F) \
X(int32, 0x10) \
X(timestamp, 0x11) \
X(int64, 0x12) \
X(decimal128, 0x13) \
X(maxkey, 0x7F)

X-macro over the name and value of BSON types.

Important
The addition of new expansions to this X-macro ARE NOT considered an API breaking change. The modification or removal of existing expansions to this X-macro ARE considered an API breaking change. This X-macro MUST be used in a manner that is compatible with these API compatibility guidelines!
Example
#define EXAMPLE(name, value) std::cout << (#name) << ": " << (value) << '\n';
void print_bson_types() {
// Expands to:
// std::cout << ("double") << ": " << (0x01) << '\n';
// std::cout << ("string") << ": " << (0x02) << '\n';
// ...
}
#define BSONCXX_V1_TYPES_XMACRO(X)
X-macro over the name and value of BSON types.
Definition id-fwd.hpp:44
Parameters
Xthe user-defined macro to be expanded.