Skip to content

Commit 1c74ce0

Browse files
authored
CXX-3069 document headers and root namespace redeclarations (mongocxx) (#1184)
* Add missing documentation for mongocxx::stdx * CXX-3069 document headers and redeclarations (mongocxx)
1 parent 289c250 commit 1c74ce0

File tree

202 files changed

+2381
-12
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

202 files changed

+2381
-12
lines changed

src/mongocxx/include/mongocxx/fwd.hpp

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,3 +76,14 @@
7676
/// @namespace mongocxx::result::gridfs
7777
/// Declares entities representing the result of GridFS commands.
7878
///
79+
80+
///
81+
/// @namespace mongocxx::stdx
82+
/// Redeclares @ref bsoncxx C++17 standard library polyfills in the @ref mongocxx library namespace
83+
/// for internal use.
84+
///
85+
/// @deprecated Use @ref bsoncxx::stdx instead.
86+
///
87+
/// @warning These redeclarations are for internal use only! Users should reference entities
88+
/// declared in @ref bsoncxx directly, not through @ref mongocxx.
89+
///

src/mongocxx/include/mongocxx/v_noabi/mongocxx/bulk_write-fwd.hpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,19 @@ using ::mongocxx::v_noabi::bulk_write;
3131
} // namespace mongocxx
3232

3333
#include <mongocxx/config/postlude.hpp>
34+
35+
///
36+
/// @file
37+
/// Declares @ref mongocxx::v_noabi::bulk_write.
38+
///
39+
40+
#if defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
41+
42+
namespace mongocxx {
43+
44+
/// @ref mongocxx::v_noabi::bulk_write
45+
class bulk_write {};
46+
47+
} // namespace mongocxx
48+
49+
#endif // defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)

src/mongocxx/include/mongocxx/v_noabi/mongocxx/bulk_write.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -117,3 +117,8 @@ class bulk_write {
117117
} // namespace mongocxx
118118

119119
#include <mongocxx/config/postlude.hpp>
120+
121+
///
122+
/// @file
123+
/// Provides @ref mongocxx::v_noabi::bulk_write.
124+
///

src/mongocxx/include/mongocxx/v_noabi/mongocxx/change_stream-fwd.hpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,19 @@ using ::mongocxx::v_noabi::change_stream;
3131
} // namespace mongocxx
3232

3333
#include <mongocxx/config/postlude.hpp>
34+
35+
///
36+
/// @file
37+
/// Declares @ref mongocxx::v_noabi::change_stream.
38+
///
39+
40+
#if defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
41+
42+
namespace mongocxx {
43+
44+
/// @ref mongocxx::v_noabi::change_stream
45+
class change_stream {};
46+
47+
} // namespace mongocxx
48+
49+
#endif // defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)

src/mongocxx/include/mongocxx/v_noabi/mongocxx/change_stream.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,3 +221,8 @@ class change_stream::iterator {
221221
} // namespace mongocxx
222222

223223
#include <mongocxx/config/postlude.hpp>
224+
225+
///
226+
/// @file
227+
/// Provides @ref mongocxx::v_noabi::change_stream.
228+
///

src/mongocxx/include/mongocxx/v_noabi/mongocxx/client-fwd.hpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,19 @@ using ::mongocxx::v_noabi::client;
3131
} // namespace mongocxx
3232

3333
#include <mongocxx/config/postlude.hpp>
34+
35+
///
36+
/// @file
37+
/// Declares @ref mongocxx::v_noabi::client.
38+
///
39+
40+
#if defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
41+
42+
namespace mongocxx {
43+
44+
/// @ref mongocxx::v_noabi::client
45+
class client {};
46+
47+
} // namespace mongocxx
48+
49+
#endif // defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)

src/mongocxx/include/mongocxx/v_noabi/mongocxx/client.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,3 +463,8 @@ MONGOCXX_INLINE mongocxx::v_noabi::database client::operator[](
463463
} // namespace mongocxx
464464

465465
#include <mongocxx/config/postlude.hpp>
466+
467+
///
468+
/// @file
469+
/// Provides @ref mongocxx::v_noabi::client.
470+
///

src/mongocxx/include/mongocxx/v_noabi/mongocxx/client_encryption-fwd.hpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,19 @@ using ::mongocxx::v_noabi::client_encryption;
3131
} // namespace mongocxx
3232

3333
#include <mongocxx/config/postlude.hpp>
34+
35+
///
36+
/// @file
37+
/// Declares @ref mongocxx::v_noabi::client_encryption.
38+
///
39+
40+
#if defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
41+
42+
namespace mongocxx {
43+
44+
/// @ref mongocxx::v_noabi::client_encryption
45+
class client_encryption {};
46+
47+
} // namespace mongocxx
48+
49+
#endif // defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)

src/mongocxx/include/mongocxx/v_noabi/mongocxx/client_encryption.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,3 +284,8 @@ class client_encryption {
284284
} // namespace mongocxx
285285

286286
#include <mongocxx/config/postlude.hpp>
287+
288+
///
289+
/// @file
290+
/// Provides @ref mongocxx::v_noabi::client_encryption.
291+
///

src/mongocxx/include/mongocxx/v_noabi/mongocxx/client_session-fwd.hpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,19 @@ using ::mongocxx::v_noabi::client_session;
3131
} // namespace mongocxx
3232

3333
#include <mongocxx/config/postlude.hpp>
34+
35+
///
36+
/// @file
37+
/// Declares @ref mongocxx::v_noabi::client_session.
38+
///
39+
40+
#if defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
41+
42+
namespace mongocxx {
43+
44+
/// @ref mongocxx::v_noabi::client_session
45+
class client_session {};
46+
47+
} // namespace mongocxx
48+
49+
#endif // defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)

src/mongocxx/include/mongocxx/v_noabi/mongocxx/client_session.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -219,3 +219,8 @@ class client_session {
219219
} // namespace mongocxx
220220

221221
#include <mongocxx/config/postlude.hpp>
222+
223+
///
224+
/// @file
225+
/// Provides @ref mongocxx::v_noabi::client_session.
226+
///

src/mongocxx/include/mongocxx/v_noabi/mongocxx/collection-fwd.hpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,19 @@ using ::mongocxx::v_noabi::collection;
3131
} // namespace mongocxx
3232

3333
#include <mongocxx/config/postlude.hpp>
34+
35+
///
36+
/// @file
37+
/// Declares @ref mongocxx::v_noabi::collection.
38+
///
39+
40+
#if defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
41+
42+
namespace mongocxx {
43+
44+
/// @ref mongocxx::v_noabi::collection
45+
class collection {};
46+
47+
} // namespace mongocxx
48+
49+
#endif // defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)

src/mongocxx/include/mongocxx/v_noabi/mongocxx/collection.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1972,3 +1972,8 @@ MONGOCXX_INLINE stdx::optional<result::insert_many> collection::insert_many(
19721972
} // namespace mongocxx
19731973

19741974
#include <mongocxx/config/postlude.hpp>
1975+
1976+
///
1977+
/// @file
1978+
/// Provides @ref mongocxx::v_noabi::collection.
1979+
///

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,3 +32,10 @@
3232
#define MONGOCXX_CALL
3333

3434
#endif
35+
36+
///
37+
/// @file
38+
/// Provides macros for internal use.
39+
///
40+
/// @warning For internal use only!
41+
///

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

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,3 +60,15 @@
6060
// prelude.hpp
6161
#undef MONGOCXX_UNREACHABLE
6262
#pragma pop_macro("MONGOCXX_UNREACHABLE")
63+
64+
///
65+
/// @file
66+
/// The mongocxx macro guard postlude header.
67+
///
68+
/// @warning For internal use only!
69+
///
70+
/// This header uses macro pragmas to guard macros defined by the mongocxx library for internal use
71+
/// by "popping" their prior definition onto the stack after use by mongocxx headers.
72+
///
73+
/// @see mongocxx/v_noabi/mongocxx/config/prelude.hpp
74+
///

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

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,3 +63,22 @@
6363
#pragma push_macro("MONGOCXX_UNREACHABLE")
6464
#undef MONGOCXX_UNREACHABLE
6565
#define MONGOCXX_UNREACHABLE std::abort()
66+
67+
///
68+
/// @file
69+
/// The mongocxx macro guard prelude header.
70+
///
71+
/// @warning For internal use only!
72+
///
73+
/// @par "Includes" @parblock
74+
/// @li @ref mongocxx/v_noabi/mongocxx/config/compiler.hpp
75+
/// @li @ref mongocxx-v_noabi-mongocxx-config-config-hpp
76+
/// @li @ref mongocxx-v_noabi-mongocxx-config-export-hpp
77+
/// @li @ref mongocxx-v_noabi-mongocxx-config-version-hpp
78+
/// @endparblock
79+
///
80+
/// This header uses macro pragmas to guard macros defined by the mongocxx library for internal use
81+
/// by "pushing" their prior definition onto the stack before use by mongocxx headers.
82+
///
83+
/// @see mongocxx/v_noabi/mongocxx/config/postlude.hpp
84+
///

src/mongocxx/include/mongocxx/v_noabi/mongocxx/cursor-fwd.hpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,19 @@ using ::mongocxx::v_noabi::cursor;
3131
} // namespace mongocxx
3232

3333
#include <mongocxx/config/postlude.hpp>
34+
35+
///
36+
/// @file
37+
/// Declares @ref mongocxx::v_noabi::cursor.
38+
///
39+
40+
#if defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
41+
42+
namespace mongocxx {
43+
44+
/// @ref mongocxx::v_noabi::cursor
45+
class cursor {};
46+
47+
} // namespace mongocxx
48+
49+
#endif // defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)

src/mongocxx/include/mongocxx/v_noabi/mongocxx/cursor.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,3 +185,8 @@ class cursor::iterator {
185185
} // namespace mongocxx
186186

187187
#include <mongocxx/config/postlude.hpp>
188+
189+
///
190+
/// @file
191+
/// Provides @ref mongocxx::v_noabi::cursor.
192+
///

src/mongocxx/include/mongocxx/v_noabi/mongocxx/database-fwd.hpp

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,19 @@ using ::mongocxx::v_noabi::database;
3131
} // namespace mongocxx
3232

3333
#include <mongocxx/config/postlude.hpp>
34+
35+
///
36+
/// @file
37+
/// Declares @ref mongocxx::v_noabi::database.
38+
///
39+
40+
#if defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
41+
42+
namespace mongocxx {
43+
44+
/// @ref mongocxx::v_noabi::database
45+
class database {};
46+
47+
} // namespace mongocxx
48+
49+
#endif // defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)

src/mongocxx/include/mongocxx/v_noabi/mongocxx/database.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -657,3 +657,8 @@ MONGOCXX_INLINE mongocxx::v_noabi::collection database::operator[](
657657
} // namespace mongocxx
658658

659659
#include <mongocxx/config/postlude.hpp>
660+
661+
///
662+
/// @file
663+
/// Provides @ref mongocxx::v_noabi::database.
664+
///

src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/command_failed_event-fwd.hpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,21 @@ using ::mongocxx::v_noabi::events::command_failed_event;
3535
} // namespace mongocxx
3636

3737
#include <mongocxx/config/postlude.hpp>
38+
39+
///
40+
/// @file
41+
/// Declares @ref mongocxx::v_noabi::events::command_failed_event.
42+
///
43+
44+
#if defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
45+
46+
namespace mongocxx {
47+
namespace events {
48+
49+
/// @ref mongocxx::v_noabi::events::command_failed_event
50+
class command_failed_event {};
51+
52+
} // namespace events
53+
} // namespace mongocxx
54+
55+
#endif // defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)

src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/command_failed_event.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,8 @@ class command_failed_event {
114114
} // namespace mongocxx
115115

116116
#include <mongocxx/config/postlude.hpp>
117+
118+
///
119+
/// @file
120+
/// Provides @ref mongocxx::v_noabi::events::command_failed_event.
121+
///

src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/command_started_event-fwd.hpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,21 @@ using ::mongocxx::v_noabi::events::command_started_event;
3535
} // namespace mongocxx
3636

3737
#include <mongocxx/config/postlude.hpp>
38+
39+
///
40+
/// @file
41+
/// Declares @ref mongocxx::v_noabi::events::command_started_event.
42+
///
43+
44+
#if defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
45+
46+
namespace mongocxx {
47+
namespace events {
48+
49+
/// @ref mongocxx::v_noabi::events::command_started_event
50+
class command_started_event {};
51+
52+
} // namespace events
53+
} // namespace mongocxx
54+
55+
#endif // defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)

src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/command_started_event.hpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,3 +114,8 @@ class command_started_event {
114114
} // namespace mongocxx
115115

116116
#include <mongocxx/config/postlude.hpp>
117+
118+
///
119+
/// @file
120+
/// Provides @ref mongocxx::v_noabi::events::command_started_event.
121+
///

src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/command_succeeded_event-fwd.hpp

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,3 +35,21 @@ using ::mongocxx::v_noabi::events::command_succeeded_event;
3535
} // namespace mongocxx
3636

3737
#include <mongocxx/config/postlude.hpp>
38+
39+
///
40+
/// @file
41+
/// Declares @ref mongocxx::v_noabi::events::command_succeeded_event.
42+
///
43+
44+
#if defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)
45+
46+
namespace mongocxx {
47+
namespace events {
48+
49+
/// @ref mongocxx::v_noabi::events::command_succeeded_event
50+
class command_succeeded_event {};
51+
52+
} // namespace events
53+
} // namespace mongocxx
54+
55+
#endif // defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR)

src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/command_succeeded_event.hpp

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ namespace events {
3737
class command_succeeded_event {
3838
public:
3939
MONGOCXX_PRIVATE explicit command_succeeded_event(const void* event);
40-
4140
///
4241
/// Destroys a command_succeeded_event.
4342
///
@@ -114,3 +113,8 @@ class command_succeeded_event {
114113
} // namespace mongocxx
115114

116115
#include <mongocxx/config/postlude.hpp>
116+
117+
///
118+
/// @file
119+
/// Provides @ref mongocxx::v_noabi::events::command_succeeded_event.
120+
///

0 commit comments

Comments
 (0)