Skip to content

Commit 1baf35c

Browse files
authored
CXX-3069 document directories, namespaces, and generated headers (#1173)
1 parent ae07bd2 commit 1baf35c

File tree

8 files changed

+802
-5
lines changed

8 files changed

+802
-5
lines changed

src/bsoncxx/include/bsoncxx/fwd.hpp

Lines changed: 77 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,83 @@
1616
#error "This file is for documentation purposes only. It should not be included."
1717
#endif // !defined(BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
1818

19+
///
20+
/// @file
21+
/// For documentation purposes only.
22+
///
23+
/// This header is not intended to be includable.
24+
///
25+
/// @note This header is shadowed by @ref bsoncxx/v_noabi/bsoncxx/fwd.hpp per include directory
26+
/// search ordering.
27+
///
28+
29+
///
30+
/// @dir bsoncxx/include/bsoncxx
31+
/// Provides headers declaring entities in @ref bsoncxx
32+
///
33+
1934
///
2035
/// @namespace bsoncxx
21-
/// The top-level namespace for bsoncxx library entities.
36+
/// The top-level namespace within which all bsoncxx library entities are declared.
37+
///
38+
/// In addition to declaring ABI namespaces (`v_noabi`, `v1`, etc.), this namespace also provides
39+
/// "redeclarations" of entities within ABI namespaces. These redeclarations are intended to be the
40+
/// preferred method for using bsoncxx library entities when ABI stability of the bsoncxx library is
41+
/// NOT a requirement by the user. See [Root Namespace
42+
/// Redeclarations](https://www.mongodb.com/docs/languages/cpp/cpp-driver/current/api-abi-versioning/abi-versioning/#std-label-cpp-abi-root-namespace-redec).
43+
///
44+
45+
///
46+
/// @namespace bsoncxx::array
47+
/// Declares entities representing a BSON array.
48+
///
49+
50+
///
51+
/// @namespace bsoncxx::builder
52+
/// Declares entities used to build BSON documents.
53+
///
54+
55+
///
56+
/// @namespace bsoncxx::builder::basic
57+
/// Declares entities used with "basic" BSON builder syntax.
58+
///
59+
60+
///
61+
/// @namespace bsoncxx::builder::stream
62+
/// Declares entities used with "streaming" BSON builder syntax.
63+
///
64+
65+
///
66+
/// @namespace bsoncxx::document
67+
/// Declares entities representing a BSON document.
68+
///
69+
70+
///
71+
/// @namespace bsoncxx::exception
72+
/// Declares entities related to bsoncxx exceptions and error codes.
73+
///
74+
75+
///
76+
/// @namespace bsoncxx::stdx
77+
/// Declares C++17 standard library polyfills.
78+
///
79+
80+
///
81+
/// @namespace bsoncxx::string
82+
/// Declares entities related to handling string types.
83+
///
84+
85+
///
86+
/// @namespace bsoncxx::types
87+
/// Declares entities representing BSON value types.
88+
///
89+
90+
///
91+
/// @namespace bsoncxx::types::bson_value
92+
/// Declares entities representing any BSON value type.
93+
///
94+
95+
///
96+
/// @namespace std
97+
/// The top-level namespace reserved for the C++ standard library.
2298
///

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/compiler.hpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,3 +44,10 @@ BSONCXX_DISABLE_WARNING(MSVC(5275));
4444

4545
#define BSONCXX_INLINE inline BSONCXX_PRIVATE
4646
#define BSONCXX_CALL BSONCXX_IF_MSVC(__cdecl)
47+
48+
///
49+
/// @file
50+
/// Provides macros for internal use.
51+
///
52+
/// @warning For internal use only!
53+
///

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/postlude.hpp

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,3 +101,15 @@ static_assert(false, "BSONCXX_ENUM must be undef'ed");
101101
#pragma pop_macro("BSONCXX_IF_GNU_LIKE")
102102

103103
#pragma pop_macro("BSONCXX_FWD")
104+
105+
///
106+
/// @file
107+
/// The bsoncxx macro guard postlude header.
108+
///
109+
/// @warning For internal use only!
110+
///
111+
/// This header uses macro pragmas to guard macros defined by the bsoncxx library for internal use
112+
/// by "popping" their prior definition onto the stack after use by bsoncxx headers.
113+
///
114+
/// @see bsoncxx/v_noabi/bsoncxx/config/prelude.hpp
115+
///

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -120,3 +120,23 @@
120120
// CXX-2769: out-of-place, but remains for backward compatibility.
121121
#pragma push_macro("BSONCXX_ENUM")
122122
#undef BSONCXX_ENUM
123+
124+
///
125+
/// @file
126+
/// The bsoncxx macro guard prelude header.
127+
///
128+
/// @warning For internal use only!
129+
///
130+
/// @par "Includes" @parblock
131+
/// @li @ref bsoncxx/v_noabi/bsoncxx/config/compiler.hpp
132+
/// @li @ref bsoncxx-v_noabi-bsoncxx-config-config-hpp
133+
/// @li @ref bsoncxx-v_noabi-bsoncxx-config-export-hpp
134+
/// @li @ref bsoncxx/v_noabi/bsoncxx/config/util.hpp
135+
/// @li @ref bsoncxx-v_noabi-bsoncxx-config-version-hpp
136+
/// @endparblock
137+
///
138+
/// This header uses macro pragmas to guard macros defined by the bsoncxx library for internal use
139+
/// by "pushing" their prior definition onto the stack before use by bsoncxx headers.
140+
///
141+
/// @see bsoncxx/v_noabi/bsoncxx/config/postlude.hpp
142+
///

src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/util.hpp

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -135,3 +135,9 @@
135135

136136
#define BSONCXX_FWD(...) static_cast<decltype(__VA_ARGS__)&&>(__VA_ARGS__)
137137

138+
///
139+
/// @file
140+
/// Provides macros for internal use.
141+
///
142+
/// @warning For internal use only!
143+
///

0 commit comments

Comments
 (0)