diff --git a/.clang-format b/.clang-format index 281a4725a5..41a2d0fb3c 100644 --- a/.clang-format +++ b/.clang-format @@ -5,6 +5,7 @@ BasedOnStyle: Google BinPackArguments: false BinPackParameters: false ColumnLimit: 100 +CommentPragmas: '^\s*@(addtogroup|copydoc|defgroup|fn|ref)' Cpp11BracedListStyle: true DerivePointerAlignment: false IncludeBlocks: Regroup diff --git a/Doxyfile b/Doxyfile index 6637949b3c..3a3d9ce66d 100644 --- a/Doxyfile +++ b/Doxyfile @@ -160,7 +160,8 @@ FULL_PATH_NAMES = YES # will be relative from the directory where doxygen is started. # This tag requires that the tag FULL_PATH_NAMES is set to YES. -STRIP_FROM_PATH = +STRIP_FROM_PATH = src/bsoncxx/include \ + src/mongocxx/include # The STRIP_FROM_INC_PATH tag can be used to strip a user-defined part of the # path mentioned in the documentation of a class, which tells the reader which @@ -638,7 +639,7 @@ SORT_MEMBER_DOCS = YES # this will also influence the order of the classes in the class list. # The default value is: NO. -SORT_BRIEF_DOCS = NO +SORT_BRIEF_DOCS = YES # If the SORT_MEMBERS_CTORS_1ST tag is set to YES then doxygen will sort the # (brief and detailed) documentation of class members so that constructors and @@ -650,14 +651,14 @@ SORT_BRIEF_DOCS = NO # detailed member documentation. # The default value is: NO. -SORT_MEMBERS_CTORS_1ST = NO +SORT_MEMBERS_CTORS_1ST = YES # If the SORT_GROUP_NAMES tag is set to YES then doxygen will sort the hierarchy # of group names into alphabetical order. If set to NO the group names will # appear in their defined order. # The default value is: NO. -SORT_GROUP_NAMES = NO +SORT_GROUP_NAMES = YES # If the SORT_BY_SCOPE_NAME tag is set to YES, the class list will be sorted by # fully-qualified names, including namespaces. If set to NO, the class list will @@ -667,7 +668,7 @@ SORT_GROUP_NAMES = NO # list. # The default value is: NO. -SORT_BY_SCOPE_NAME = NO +SORT_BY_SCOPE_NAME = YES # If the STRICT_PROTO_MATCHING option is enabled and doxygen fails to do proper # type resolution of all parameters of a function it will reject a match between @@ -2212,11 +2213,13 @@ INCLUDE_FILE_PATTERNS = PREDEFINED = BSONCXX_API= \ BSONCXX_CALL= \ BSONCXX_DEPRECATED \ - BSONCXX_INLINE= \ + BSONCXX_INLINE=inline \ + BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR= \ MONGOCXX_API= \ MONGOCXX_CALL= \ - MONGOCXX_DEPRECATED \ - MONGOCXX_INLINE= + MONGOCXX_DEPRECATED= \ + MONGOCXX_INLINE=inline \ + MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR= # If the MACRO_EXPANSION and EXPAND_ONLY_PREDEF tags are set to YES then this # tag can be used to specify a list of macro names that should be expanded. The diff --git a/src/bsoncxx/include/bsoncxx/fwd.hpp b/src/bsoncxx/include/bsoncxx/fwd.hpp new file mode 100644 index 0000000000..797d21a163 --- /dev/null +++ b/src/bsoncxx/include/bsoncxx/fwd.hpp @@ -0,0 +1,22 @@ +// 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. + +#if !defined(BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR) +#error "This file is for documentation purposes only. It should not be included." +#endif // !defined(BSONCXX_PRIVATE_DOXYGEN_PREPROCESSOR) + +/// +/// @namespace bsoncxx +/// The top-level namespace for bsoncxx library entities. +/// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/array/element.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/array/element.hpp index f469b9f44a..8a95f424bd 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/array/element.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/array/element.hpp @@ -88,33 +88,25 @@ class element : private document::element { BSONCXX_PRIVATE explicit element(const stdx::string_view key); }; -/// -/// @{ /// /// Convenience methods to compare for equality against a bson_value. /// -/// Returns true if this element contains a bson_value that matches. -/// -/// @relates element +/// Compares equal if this element contains a matching bson_value. Otherwise, compares unequal. /// +/// @{ + +/// @relatesalso bsoncxx::v_noabi::array::element BSONCXX_API bool BSONCXX_CALL operator==(const element& elem, const types::bson_value::view& v); + +/// @relatesalso bsoncxx::v_noabi::array::element BSONCXX_API bool BSONCXX_CALL operator==(const types::bson_value::view& v, const element& elem); -/// -/// @} -/// -/// -/// @{ -/// -/// Convenience methods to compare for equality against a bson_value. -/// -/// Returns false if this element contains a bson_value that matches. -/// -/// @relates element -/// +/// @relatesalso bsoncxx::v_noabi::array::element BSONCXX_API bool BSONCXX_CALL operator!=(const element& elem, const types::bson_value::view& v); + +/// @relatesalso bsoncxx::v_noabi::array::element BSONCXX_API bool BSONCXX_CALL operator!=(const types::bson_value::view& v, const element& elem); -/// + /// @} /// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/array/view.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/array/view.hpp index f50d037a00..12a001b05c 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/array/view.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/array/view.hpp @@ -130,15 +130,13 @@ class view { operator document::view() const; /// - /// @{ + /// @relates bsoncx::v_noabi::document::view /// /// Compare two views for (in)-equality /// - /// @relates view - /// + /// @{ friend BSONCXX_API bool BSONCXX_CALL operator==(view, view); friend BSONCXX_API bool BSONCXX_CALL operator!=(view, view); - /// /// @} /// @@ -173,15 +171,13 @@ class view::const_iterator { const_iterator operator++(int); /// - /// @{ - /// - /// Compare two const_iterators for (in)-equality + /// @relates bsoncxx::v_noabi::array::view::const_iterator /// - /// @relates view::const_iterator + /// Compare two const_iterators for (in)-equality. /// + /// @{ friend BSONCXX_API bool BSONCXX_CALL operator==(const const_iterator&, const const_iterator&); friend BSONCXX_API bool BSONCXX_CALL operator!=(const const_iterator&, const const_iterator&); - /// /// @} /// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/array/view_or_value.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/array/view_or_value.hpp index 56e180ffab..85457a00bd 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/array/view_or_value.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/array/view_or_value.hpp @@ -25,7 +25,10 @@ namespace bsoncxx { namespace v_noabi { namespace array { -using view_or_value = ::bsoncxx::v_noabi::view_or_value; +/// +/// Equivalent to `v_noabi::view_or_value`. +/// +using view_or_value = v_noabi::view_or_value; } // namespace array } // namespace v_noabi diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/concatenate.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/concatenate.hpp index 629d473475..ab7e17c2ea 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/concatenate.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/concatenate.hpp @@ -82,32 +82,30 @@ struct concatenate_array { }; /// -/// Helper method to concatenate a document. Use this with the document stream -/// builder to merge an existing document's fields with a new document's. +/// Helper method to concatenate a document. /// -/// @param doc A document to be concatenated. +/// Use this with the document stream builder to merge an existing document's fields with a new +/// document's. +/// +/// @param doc The document to concatenate. /// /// @return concatenate_doc A concatenating struct. /// -/// @relatesalso concatenate_doc +/// @see bsoncxx::v_noabi::builder::concatenate_doc +/// +/// @note An overload accepting @ref v_noabi::array::view_or_value and returning a @ref +/// concatenate_array is also declared in this scope. /// BSONCXX_INLINE concatenate_doc concatenate(document::view_or_value doc) { return {std::move(doc)}; } -/// -/// Method to concatenate an array with a new array. Use this with the array stream -/// builder to merge an existing array's fields with a new array. -/// -/// @param array An array to be concatenated. -/// -/// @return concatenate_array A concatenating struct. -/// -/// @relatesalso concatenate_array -/// +// Why is Doxygen unable to parse this overload correctly??? +// @cond DOXYGEN_DISABLE "warning: no matching file member found for ..." BSONCXX_INLINE concatenate_array concatenate(array::view_or_value array) { return {std::move(array)}; } +// @endcond } // namespace builder } // namespace v_noabi diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/array.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/array.hpp index 501db4f7bf..b2dcffa8fa 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/array.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/array.hpp @@ -32,12 +32,12 @@ namespace builder { namespace stream { /// -/// A streaming interface for constructing -/// a BSON array. +/// A streaming interface for constructing a BSON array. /// -/// @note Use of the stream builder is discouraged. See -/// https://www.mongodb.com/docs/languages/cpp/drivers/current/working-with-bson/#basic-builder for -/// more details. +/// @warning Use of the stream builder is discouraged. See +/// [Working with +/// BSON](https://www.mongodb.com/docs/languages/cpp/cpp-driver/current/working-with-bson/#basic-builder) +/// for more details. /// class array : public array_context<> { public: diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/array_context.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/array_context.hpp index 834a9b13ce..25be67c638 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/array_context.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/array_context.hpp @@ -167,7 +167,7 @@ class array_context { /// /// Conversion operator for single_context. /// - /// @relatesalso single_context + /// @see bsoncxx::v_noabi::builder::stream::single_context /// BSONCXX_INLINE operator single_context(); diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/document.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/document.hpp index 2b250a7cb2..d55f4daa5f 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/document.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/document.hpp @@ -30,12 +30,12 @@ namespace builder { namespace stream { /// -/// A streaming interface for constructing -/// a BSON document. +/// A streaming interface for constructing a BSON document. /// -/// @note Use of the stream builder is discouraged. See -/// https://www.mongodb.com/docs/languages/cpp/drivers/current/working-with-bson/#basic-builder for -/// more details. +/// @warning Use of the stream builder is discouraged. See +/// [Working with +/// BSON](https://www.mongodb.com/docs/languages/cpp/cpp-driver/current/working-with-bson/#basic-builder) +/// for more details. /// class document : public key_context<> { public: diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/value_context.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/value_context.hpp index a30967dade..db293b3dcc 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/value_context.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/builder/stream/value_context.hpp @@ -108,7 +108,7 @@ class value_context { /// /// Conversion operator for single_context. /// - /// @relatesalso single_context + /// @see bsoncxx::v_noabi::builder::stream::single_context /// operator single_context(); diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp index 9c4dd387dc..cbafb8e1df 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/prelude.hpp @@ -120,21 +120,3 @@ // CXX-2769: out-of-place, but remains for backward compatibility. #pragma push_macro("BSONCXX_ENUM") #undef BSONCXX_ENUM - -// Doxygen does not account for generated header files. -// Document globally applicable macros and namespaces here. - -/// -/// @namespace bsoncxx -/// The top-level namespace for bsoncxx library entities. -/// - -/// -/// @namespace bsoncxx::v_noabi -/// Entities declared in this namespace do not have a stable ABI. -/// - -/// -/// @namespace bsoncxx::v_noabi::stdx -/// Declares polyfills for C++17 forward compatibility. -/// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/util.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/util.hpp index 045c8c80a9..b56309b444 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/util.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/config/util.hpp @@ -7,6 +7,7 @@ #define BSONCXX_STRINGIFY_IMPL(...) #__VA_ARGS__ /** + * @internal * @brief Token-paste two macro arguments, after macro expansion */ #define BSONCXX_CONCAT(A, ...) BSONCXX_CONCAT_IMPL(A, __VA_ARGS__) diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/decimal128.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/decimal128.hpp index 22ccb414ab..5bdb8c4c93 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/decimal128.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/decimal128.hpp @@ -65,15 +65,13 @@ class decimal128 { std::string to_string() const; /// - /// @{ + /// @relates bsoncxx::v_noabi::decimal128 /// /// Relational operators for decimal128 /// - /// @relates decimal128 - /// + /// @{ friend BSONCXX_API bool BSONCXX_CALL operator==(const decimal128& lhs, const decimal128& rhs); friend BSONCXX_API bool BSONCXX_CALL operator!=(const decimal128& lhs, const decimal128& rhs); - /// /// @} /// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/element.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/element.hpp index 588518081a..8240b5dd0b 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/element.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/element.hpp @@ -40,7 +40,7 @@ namespace document { /// interrogated by calling type(), the key can be extracted by calling key() and /// a specific value can be extracted through get_X() accessors. /// -/// @relatesalso array::element +/// @see bsoncxx::v_noabi::array::element /// class element { public: @@ -386,33 +386,25 @@ class element { stdx::optional _key; }; -/// -/// @{ /// /// Convenience methods to compare for equality against a bson_value. /// -/// Returns true if this element contains a bson_value that matches. -/// -/// @relates element +/// Compares equal if the element contains a matching bson_value. Otherwise, compares unequal. /// +/// @{ + +/// @relatesalso bsoncxx::v_noabi::document::element BSONCXX_API bool BSONCXX_CALL operator==(const element& elem, const types::bson_value::view& v); + +/// @relatesalso bsoncxx::v_noabi::document::element BSONCXX_API bool BSONCXX_CALL operator==(const types::bson_value::view& v, const element& elem); -/// -/// @} -/// -/// -/// @{ -/// -/// Convenience methods to compare for equality against a bson_value. -/// -/// Returns false if this element contains a bson_value that matches. -/// -/// @relates element -/// +/// @relatesalso bsoncxx::v_noabi::document::element BSONCXX_API bool BSONCXX_CALL operator!=(const element& elem, const types::bson_value::view& v); + +/// @relatesalso bsoncxx::v_noabi::document::element BSONCXX_API bool BSONCXX_CALL operator!=(const types::bson_value::view& v, const element& elem); -/// + /// @} /// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/value.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/value.hpp index a9eed97cc8..622d77d4b8 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/value.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/value.hpp @@ -249,22 +249,21 @@ BSONCXX_INLINE value::operator document::view() const noexcept { return view(); } -/// -/// @{ /// /// Compares two document values for (in)-equality. /// -/// @relates document::value -/// +/// @{ + +/// @relatesalso bsoncxx::v_noabi::document::value BSONCXX_INLINE bool operator==(const value& lhs, const value& rhs) { return (lhs.view() == rhs.view()); } +/// @relatesalso bsoncxx::v_noabi::document::value BSONCXX_INLINE bool operator!=(const value& lhs, const value& rhs) { return !(lhs == rhs); } -/// /// @} /// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/view.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/view.hpp index 585a4f5da8..af1b5e5f62 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/view.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/view.hpp @@ -129,15 +129,13 @@ class view { bool empty() const; /// - /// @{ - /// - /// Compare two document views for (in)-equality + /// @relates bsoncxx::v_noabi::document::view /// - /// @relates view + /// Compare two document views for (in)-equality. /// + /// @{ friend BSONCXX_API bool BSONCXX_CALL operator==(view, view); friend BSONCXX_API bool BSONCXX_CALL operator!=(view, view); - /// /// @} /// @@ -173,15 +171,13 @@ class view::const_iterator { const_iterator operator++(int); /// - /// @{ - /// - /// Compares two const_iterators for (in)-equality + /// @relates bsoncxx::v_noabi::document::view::const_iterator /// - /// @relates view::const_iterator + /// Compares two const_iterators for (in)-equality. /// + /// @{ friend BSONCXX_API bool BSONCXX_CALL operator==(const const_iterator&, const const_iterator&); friend BSONCXX_API bool BSONCXX_CALL operator!=(const const_iterator&, const const_iterator&); - /// /// @} /// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/view_or_value.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/view_or_value.hpp index 6dd2248af4..ca9083218b 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/view_or_value.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/document/view_or_value.hpp @@ -24,7 +24,10 @@ namespace bsoncxx { namespace v_noabi { namespace document { -using view_or_value = bsoncxx::v_noabi::view_or_value; +/// +/// Equivalent to `v_noabi::view_or_value`. +/// +using view_or_value = v_noabi::view_or_value; } // namespace document } // namespace v_noabi diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/fwd.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/fwd.hpp index e19ae26b47..3e8d100d49 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/fwd.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/fwd.hpp @@ -46,3 +46,13 @@ #include #include #include + +/// +/// @namespace bsoncxx::v_noabi +/// Entities declared in this namespace do not have a stable ABI. +/// + +/// +/// @namespace bsoncxx::v_noabi::stdx +/// Declares polyfills for C++17 forward compatibility. +/// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/oid.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/oid.hpp index bb6e66673a..bf516cec32 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/oid.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/oid.hpp @@ -86,23 +86,22 @@ class oid { } /// - /// @{ - /// - /// Relational operators for OIDs + /// @relates bsoncxx::v_noabi::oid /// - /// @relates oid + /// Relational operators for OIDs. /// + /// @{ friend BSONCXX_API bool BSONCXX_CALL operator<(const oid& lhs, const oid& rhs); friend BSONCXX_API bool BSONCXX_CALL operator>(const oid& lhs, const oid& rhs); friend BSONCXX_API bool BSONCXX_CALL operator<=(const oid& lhs, const oid& rhs); friend BSONCXX_API bool BSONCXX_CALL operator>=(const oid& lhs, const oid& rhs); friend BSONCXX_API bool BSONCXX_CALL operator==(const oid& lhs, const oid& rhs); friend BSONCXX_API bool BSONCXX_CALL operator!=(const oid& lhs, const oid& rhs); - /// /// @} /// /// + /// @memberof bsoncxx::v_noabi::oid /// Extracts the timestamp portion of the underlying ObjectId. /// /// @return A std::time_t initialized to the timestamp. diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/string/view_or_value.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/string/view_or_value.hpp index 1d7709c8b6..771af24ce7 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/string/view_or_value.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/string/view_or_value.hpp @@ -93,28 +93,30 @@ class view_or_value : public bsoncxx::v_noabi::view_or_value -#undef BSONCXX_ENUM +/// +/// @relatesalso bsoncxx::v_noabi::types::b_double +/// +/// free function comparator for b_double +/// +inline bool operator!=(const b_double& lhs, const b_double& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_string +/// +/// free function comparator for b_string +/// +inline bool operator!=(const b_string& lhs, const b_string& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_document +/// +/// free function comparator for b_document +/// +inline bool operator!=(const b_document& lhs, const b_document& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_array +/// +/// free function comparator for b_array +/// +inline bool operator!=(const b_array& lhs, const b_array& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_binary +/// +/// free function comparator for b_binary +/// +inline bool operator!=(const b_binary& lhs, const b_binary& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_undefined +/// +/// free function comparator for b_undefined +/// +inline bool operator!=(const b_undefined& lhs, const b_undefined& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_oid +/// +/// free function comparator for b_oid +/// +inline bool operator!=(const b_oid& lhs, const b_oid& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_bool +/// +/// free function comparator for b_bool +/// +inline bool operator!=(const b_bool& lhs, const b_bool& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_date +/// +/// free function comparator for b_date +/// +inline bool operator!=(const b_date& lhs, const b_date& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_null +/// +/// free function comparator for b_null +/// +inline bool operator!=(const b_null& lhs, const b_null& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_regex +/// +/// free function comparator for b_regex +/// +inline bool operator!=(const b_regex& lhs, const b_regex& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_dbpointer +/// +/// free function comparator for b_dbpointer +/// +inline bool operator!=(const b_dbpointer& lhs, const b_dbpointer& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_code +/// +/// free function comparator for b_code +/// +inline bool operator!=(const b_code& lhs, const b_code& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_symbol +/// +/// free function comparator for b_symbol +/// +inline bool operator!=(const b_symbol& lhs, const b_symbol& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_codewscope +/// +/// free function comparator for b_codewscope +/// +inline bool operator!=(const b_codewscope& lhs, const b_codewscope& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_int32 +/// +/// free function comparator for b_int32 +/// +inline bool operator!=(const b_int32& lhs, const b_int32& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_timestamp +/// +/// free function comparator for b_timestamp +/// +inline bool operator!=(const b_timestamp& lhs, const b_timestamp& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_int64 +/// +/// free function comparator for b_int64 +/// +inline bool operator!=(const b_int64& lhs, const b_int64& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_decimal128 +/// +/// free function comparator for b_decimal128 +/// +inline bool operator!=(const b_decimal128& lhs, const b_decimal128& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_minkey +/// +/// free function comparator for b_minkey +/// +inline bool operator!=(const b_minkey& lhs, const b_minkey& rhs) { + return !(lhs == rhs); +} + +/// +/// @relatesalso bsoncxx::v_noabi::types::b_maxkey +/// +/// free function comparator for b_maxkey +/// +inline bool operator!=(const b_maxkey& lhs, const b_maxkey& rhs) { + return !(lhs == rhs); +} } // namespace types } // namespace v_noabi diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/value.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/value.hpp index edf23553cf..0bc5c6e9e8 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/value.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/value.hpp @@ -41,7 +41,7 @@ namespace bson_value { /// For accessors into this type and to extract the various BSON types out, /// please use bson_value::view. /// -/// @relatesalso bson_value::view +/// @see bsoncxx::v_noabi::bson_value::view /// class value { public: @@ -275,49 +275,49 @@ class value { std::unique_ptr _impl; }; -/// -/// @{ /// /// Compares values for (in)-equality. /// -/// @relates bson_value::value -/// +/// @{ + +/// @relatesalso bsoncxx::v_noabi::types::bson_value::value BSONCXX_INLINE bool operator==(const value& lhs, const value& rhs) { return (lhs.view() == rhs.view()); } +/// @relatesalso bsoncxx::v_noabi::types::bson_value::value BSONCXX_INLINE bool operator!=(const value& lhs, const value& rhs) { return !(lhs == rhs); } -/// /// @} /// -/// -/// @{ /// /// Compares a value with a view for (in)-equality. /// -/// @relates bson_value::value -/// +/// @{ + +/// @relatesalso bsoncxx::v_noabi::types::bson_value::value BSONCXX_INLINE bool operator==(const value& lhs, const view& rhs) { return (lhs.view() == rhs); } +/// @relatesalso bsoncxx::v_noabi::types::bson_value::value BSONCXX_INLINE bool operator==(const view& lhs, const value& rhs) { return (rhs == lhs); } +/// @relatesalso bsoncxx::v_noabi::types::bson_value::value BSONCXX_INLINE bool operator!=(const value& lhs, const view& rhs) { return !(lhs == rhs); } +/// @relatesalso bsoncxx::v_noabi::types::bson_value::value BSONCXX_INLINE bool operator!=(const view& lhs, const value& rhs) { return !(lhs == rhs); } -/// /// @} /// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp index e5b5b7f59b..3b34d03fcb 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/types/bson_value/view.hpp @@ -70,17 +70,15 @@ class view { ~view(); /// - /// @{ + /// @relates bsoncxx::v_noabi::types::bson_value::view /// /// Compare two bson_value::views for equality /// - /// @relates bson_value::view - /// + /// @{ friend BSONCXX_API bool BSONCXX_CALL operator==(const bson_value::view&, const bson_value::view&); friend BSONCXX_API bool BSONCXX_CALL operator!=(const bson_value::view&, const bson_value::view&); - /// /// @} /// diff --git a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/view_or_value.hpp b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/view_or_value.hpp index c48f8a71ea..fbe9d65c95 100644 --- a/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/view_or_value.hpp +++ b/src/bsoncxx/include/bsoncxx/v_noabi/bsoncxx/view_or_value.hpp @@ -145,74 +145,80 @@ class view_or_value { }; /// -/// @{ -/// -/// Compare view_or_value objects for (in)-equality -/// -/// @relates: view_or_value +/// Compare view_or_value objects for (in)-equality. /// +/// @{ + +/// @relatesalso bsoncxx::v_noabi::view_or_value template BSONCXX_INLINE bool operator==(const view_or_value& lhs, const view_or_value& rhs) { return lhs.view() == rhs.view(); } +/// @relatesalso bsoncxx::v_noabi::view_or_value template BSONCXX_INLINE bool operator!=(const view_or_value& lhs, const view_or_value& rhs) { return !(lhs == rhs); } -/// + /// @} /// -/// -/// @{ /// /// Mixed (in)-equality operators for view_or_value against View or Value types /// -/// @relates view_or_value -/// +/// @{ + +/// @relatesalso bsoncxx::v_noabi::view_or_value template BSONCXX_INLINE bool operator==(const view_or_value& lhs, View rhs) { return lhs.view() == rhs; } +/// @relatesalso bsoncxx::v_noabi::view_or_value template BSONCXX_INLINE bool operator==(View lhs, const view_or_value& rhs) { return rhs == lhs; } +/// @relatesalso bsoncxx::v_noabi::view_or_value template BSONCXX_INLINE bool operator!=(const view_or_value& lhs, View rhs) { return !(lhs == rhs); } +/// @relatesalso bsoncxx::v_noabi::view_or_value template BSONCXX_INLINE bool operator!=(View lhs, const view_or_value& rhs) { return !(rhs == lhs); } +/// @relatesalso bsoncxx::v_noabi::view_or_value template BSONCXX_INLINE bool operator==(const view_or_value& lhs, const Value& rhs) { return lhs.view() == View(rhs); } +/// @relatesalso bsoncxx::v_noabi::view_or_value template BSONCXX_INLINE bool operator==(const Value& lhs, const view_or_value& rhs) { return rhs == lhs; } +/// @relatesalso bsoncxx::v_noabi::view_or_value template BSONCXX_INLINE bool operator!=(const view_or_value& lhs, const Value& rhs) { return !(lhs == rhs); } +/// @relatesalso bsoncxx::v_noabi::view_or_value template BSONCXX_INLINE bool operator!=(const Value& lhs, const view_or_value& rhs) { return !(rhs == lhs); } -/// + /// @} /// diff --git a/src/bsoncxx/lib/CMakeLists.txt b/src/bsoncxx/lib/CMakeLists.txt index 8bab5f4697..f2ac5b00ff 100644 --- a/src/bsoncxx/lib/CMakeLists.txt +++ b/src/bsoncxx/lib/CMakeLists.txt @@ -22,6 +22,7 @@ set(bsoncxx_sources_v_noabi bsoncxx/v_noabi/bsoncxx/document/value.cpp bsoncxx/v_noabi/bsoncxx/document/view.cpp bsoncxx/v_noabi/bsoncxx/exception/error_code.cpp + bsoncxx/v_noabi/bsoncxx/fwd.cpp bsoncxx/v_noabi/bsoncxx/json.cpp bsoncxx/v_noabi/bsoncxx/oid.cpp bsoncxx/v_noabi/bsoncxx/private/itoa.cpp @@ -34,6 +35,7 @@ set(bsoncxx_sources_v_noabi list(APPEND bsoncxx_sources ${bsoncxx_sources_v_noabi} + bsoncxx/fwd.cpp ) list(TRANSFORM bsoncxx_sources PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/") set(bsoncxx_sources "${bsoncxx_sources}" PARENT_SCOPE) @@ -69,6 +71,7 @@ endif() set_dist_list(src_bsoncxx_lib_DIST CMakeLists.txt ${bsoncxx_sources_v_noabi} + bsoncxx/fwd.cpp bsoncxx/v_noabi/bsoncxx/config/config.hpp.in bsoncxx/v_noabi/bsoncxx/config/private/config.hh.in bsoncxx/v_noabi/bsoncxx/config/private/postlude.hh diff --git a/src/bsoncxx/lib/bsoncxx/fwd.cpp b/src/bsoncxx/lib/bsoncxx/fwd.cpp new file mode 100644 index 0000000000..e480b60905 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/fwd.cpp @@ -0,0 +1,16 @@ +// 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. + +// Validate that is included, not . +#include diff --git a/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/fwd.cpp b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/fwd.cpp new file mode 100644 index 0000000000..82aeefe1a3 --- /dev/null +++ b/src/bsoncxx/lib/bsoncxx/v_noabi/bsoncxx/fwd.cpp @@ -0,0 +1,15 @@ +// 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. + +#include diff --git a/src/mongocxx/include/mongocxx/fwd.hpp b/src/mongocxx/include/mongocxx/fwd.hpp new file mode 100644 index 0000000000..64a4196b1f --- /dev/null +++ b/src/mongocxx/include/mongocxx/fwd.hpp @@ -0,0 +1,22 @@ +// 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. + +#if !defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR) +#error "This file is for documentation purposes only. It should not be included." +#endif // !defined(MONGOCXX_PRIVATE_DOXYGEN_PREPROCESSOR) + +/// +/// @namespace mongocxx +/// The top-level namespace for mongocxx library entities. +/// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/change_stream.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/change_stream.hpp index f0c90ce318..a2e1cbd599 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/change_stream.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/change_stream.hpp @@ -194,19 +194,19 @@ class change_stream::iterator { MONGOCXX_PRIVATE explicit iterator(iter_type type, const change_stream* change_stream); /// - /// @{ + /// @relates bsoncxx::v_noabi::change_stream::iterator /// - /// Compare two iterators for (in)-equality. Iterators compare equal if - /// they point to the same underlying change_stream or if both are exhausted. + /// Compare two iterators for (in)-equality. /// - /// @relates iterator + /// Iterators compare equal if they point to the same underlying change_stream or if both are + /// exhausted. /// + /// @{ friend MONGOCXX_API bool MONGOCXX_CALL operator==(const change_stream::iterator&, const change_stream::iterator&) noexcept; friend MONGOCXX_API bool MONGOCXX_CALL operator!=(const change_stream::iterator&, const change_stream::iterator&) noexcept; - /// /// @} /// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/client.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/client.hpp index 421de6e7c0..0c099055ff 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/client.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/client.hpp @@ -218,9 +218,6 @@ class client { bsoncxx::v_noabi::string::view_or_value name) const&; MONGOCXX_INLINE mongocxx::v_noabi::database operator[]( bsoncxx::v_noabi::string::view_or_value name) const&& = delete; - - /// - /// @{ /// /// Enumerates the databases in the client. /// @@ -334,10 +331,6 @@ class client { const client_session& session, const bsoncxx::v_noabi::document::view_or_value filter = {}) const; - /// - /// @} - /// - /// /// Create a client session for a sequence of operations. /// @@ -351,9 +344,8 @@ class client { client_session start_session(const options::client_session& options = {}); /// - /// @{ + /// Get a change stream on this client with an empty pipeline. /// - /// Gets a change stream on this client with an empty pipeline. /// Change streams are only supported with a "majority" read concern or no read concern. /// /// @param options @@ -366,6 +358,10 @@ class client { /// change_stream watch(const options::change_stream& options = {}); + /// + /// Get a change stream on this client with an empty pipeline. + /// + /// Change streams are only supported with a "majority" read concern or no read concern. /// /// @param session /// The mongocxx::v_noabi::client_session with which to perform the watch operation. @@ -380,7 +376,8 @@ class client { change_stream watch(const client_session& session, const options::change_stream& options = {}); /// - /// Gets a change stream on this client. + /// Get a change stream on this client. + /// /// Change streams are only supported with a "majority" read concern or no read concern. /// /// @param pipe @@ -398,7 +395,9 @@ class client { change_stream watch(const pipeline& pipe, const options::change_stream& options = {}); /// - /// Gets a change stream on this client. + /// Get a change stream on this client. + /// + /// Change streams are only supported with a "majority" read concern or no read concern. /// /// @param session /// The mongocxx::v_noabi::client_session with which to perform the watch operation. @@ -416,10 +415,6 @@ class client { const pipeline& pipe, const options::change_stream& options = {}); - /// - /// @} - /// - /// /// Prevents resource cleanup in the child process from interfering /// with the parent process after forking. diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/collection.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/collection.hpp index ac95526226..316e56060b 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/collection.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/collection.hpp @@ -140,8 +140,6 @@ class collection { /// explicit operator bool() const noexcept; - /// - /// @{ /// /// Runs an aggregation framework pipeline against this collection. /// @@ -188,12 +186,7 @@ class collection { cursor aggregate(const client_session& session, const pipeline& pipeline, const options::aggregate& options = options::aggregate()); - /// - /// @} - /// - /// - /// @{ /// /// Creates a new bulk operation to be executed against this collection. /// The lifetime of the bulk_write is independent of the collection. @@ -220,12 +213,7 @@ class collection { /// mongocxx::v_noabi::bulk_write create_bulk_write(const client_session& session, const options::bulk_write& options = {}); - /// - /// @} - /// - /// - /// @{ /// /// Sends a write to the server as a bulk write operation. /// @@ -275,12 +263,7 @@ class collection { const client_session& session, const model::write& write, const options::bulk_write& options = options::bulk_write()); - /// - /// @} - /// - /// - /// @{ /// /// Sends a container of writes to the server as a bulk write operation. /// @@ -334,12 +317,7 @@ class collection { const client_session& session, const container_type& writes, const options::bulk_write& options = options::bulk_write()); - /// - /// @} - /// - /// - /// @{ /// /// Sends writes starting at @c begin and ending at @c end to the server as a bulk write /// operation. @@ -398,12 +376,7 @@ class collection { write_model_iterator_type begin, write_model_iterator_type end, const options::bulk_write& options = options::bulk_write()); - /// - /// @} - /// - /// - /// @{ /// /// Counts the number of documents matching the provided filter. /// @@ -453,12 +426,7 @@ class collection { std::int64_t count_documents(const client_session& session, bsoncxx::v_noabi::document::view_or_value filter, const options::count& options = options::count()); - /// - /// @} - /// - /// - /// @{ /// /// Returns an estimate of the number of documents in the collection. /// @@ -476,12 +444,7 @@ class collection { /// std::int64_t estimated_document_count( const options::estimated_document_count& options = options::estimated_document_count()); - /// - /// @} - /// - /// - /// @{ /// /// Creates an index over the collection for the provided keys with the provided options. /// @@ -533,12 +496,6 @@ class collection { bsoncxx::v_noabi::document::view_or_value index_options = {}, options::index_view operation_options = options::index_view{}); - /// - /// @} - /// - - /// - /// @{ /// /// Deletes all matching documents from the collection. /// @@ -582,12 +539,6 @@ class collection { bsoncxx::v_noabi::document::view_or_value filter, const options::delete_options& options = options::delete_options()); - /// - /// @} - /// - - /// - /// @{ /// /// Deletes a single matching document from the collection. /// @@ -631,12 +582,6 @@ class collection { bsoncxx::v_noabi::document::view_or_value filter, const options::delete_options& options = options::delete_options()); - /// - /// @} - /// - - /// - /// @{ /// /// Finds the distinct values for a specified field across the collection. /// @@ -646,11 +591,11 @@ class collection { /// Document view representing the documents for which the distinct operation will apply. /// @param options /// Optional arguments, see options::distinct. - + /// /// @return mongocxx::v_noabi::cursor having the distinct values for the specified /// field. If the operation fails, the cursor throws /// mongocxx::v_noabi::query_exception when the returned cursor is iterated. - + /// /// @see https://www.mongodb.com/docs/manual/reference/command/distinct/ /// cursor distinct(bsoncxx::v_noabi::string::view_or_value name, @@ -668,11 +613,11 @@ class collection { /// Document view representing the documents for which the distinct operation will apply. /// @param options /// Optional arguments, see options::distinct. - + /// /// @return mongocxx::v_noabi::cursor having the distinct values for the specified /// field. If the operation fails, the cursor throws /// mongocxx::v_noabi::query_exception when the returned cursor is iterated. - + /// /// @see https://www.mongodb.com/docs/manual/reference/command/distinct/ /// cursor distinct(const client_session& session, @@ -680,12 +625,6 @@ class collection { bsoncxx::v_noabi::document::view_or_value filter, const options::distinct& options = options::distinct()); - /// - /// @} - /// - - /// - /// @{ /// /// Drops this collection and all its contained documents from the database. /// @@ -734,12 +673,6 @@ class collection { write_concern = {}, bsoncxx::v_noabi::document::view_or_value collection_options = {}); - /// - /// @} - /// - - /// - /// @{ /// /// Finds the documents in this collection which match the provided filter. /// @@ -783,8 +716,6 @@ class collection { bsoncxx::v_noabi::document::view_or_value filter, const options::find& options = options::find()); - /// - /// @{ /// /// Finds a single document in this collection that match the provided filter. /// @@ -824,12 +755,6 @@ class collection { bsoncxx::v_noabi::document::view_or_value filter, const options::find& options = options::find()); - /// - /// @} - /// - - /// - /// @{ /// /// Finds a single document matching the filter, deletes it, and returns the original. /// @@ -875,12 +800,6 @@ class collection { bsoncxx::v_noabi::document::view_or_value filter, const options::find_one_and_delete& options = options::find_one_and_delete()); - /// - /// @} - /// - - /// - /// @{ /// /// Finds a single document matching the filter, replaces it, and returns either the original /// or the replacement document. @@ -934,12 +853,6 @@ class collection { bsoncxx::v_noabi::document::view_or_value replacement, const options::find_one_and_replace& options = options::find_one_and_replace()); - /// - /// @} - /// - - /// - /// @{ /// /// Finds a single document matching the filter, updates it, and returns either the original /// or the newly-updated document. @@ -1099,12 +1012,6 @@ class collection { std::initializer_list<_empty_doc_tag> update, const options::find_one_and_update& options = options::find_one_and_update()); - /// - /// @} - /// - - /// - /// @{ /// /// Inserts a single document into the collection. If the document is missing an identifier /// (@c _id field) one will be generated for it. @@ -1119,8 +1026,11 @@ class collection { /// disengaged. /// /// @throws mongocxx::v_noabi::bulk_write_exception if the operation fails. + /// stdx::optional insert_one( bsoncxx::v_noabi::document::view_or_value document, const options::insert& options = {}); + + /// /// /// Inserts a single document into the collection. If the document is missing an identifier /// (@c _id field) one will be generated for it. @@ -1137,16 +1047,12 @@ class collection { /// disengaged. /// /// @throws mongocxx::v_noabi::bulk_write_exception if the operation fails. + /// stdx::optional insert_one( const client_session& session, bsoncxx::v_noabi::document::view_or_value document, const options::insert& options = {}); - /// - /// @} - /// - /// - /// @{ /// /// Inserts multiple documents into the collection. If any of the documents are missing /// identifiers the driver will generate them. @@ -1201,8 +1107,6 @@ class collection { const container_type& container, const options::insert& options = options::insert()); - /// - /// @{ /// /// Inserts multiple documents into the collection. If any of the documents are missing /// identifiers the driver will generate them. @@ -1259,12 +1163,8 @@ class collection { document_view_iterator_type begin, document_view_iterator_type end, const options::insert& options = options::insert()); - /// - /// @} - /// /// - /// @{ /// /// Returns a list of the indexes currently on this collection. /// @@ -1290,10 +1190,6 @@ class collection { /// cursor list_indexes(const client_session& session) const; - /// - /// @} - /// - /// /// Returns the name of this collection. /// @@ -1351,10 +1247,6 @@ class collection { bool drop_target_before_rename = false, const bsoncxx::v_noabi::stdx::optional& write_concern = {}); - /// - /// @} - /// - /// /// Sets the read_concern for this collection. Changes will not have any effect on existing /// cursors or other read operations which use the previously-set read concern. @@ -1396,8 +1288,6 @@ class collection { /// mongocxx::v_noabi::read_preference read_preference() const; - /// - /// @{ /// /// Replaces a single document matching the provided filter in this collection. /// @@ -1451,8 +1341,6 @@ class collection { bsoncxx::v_noabi::document::view_or_value replacement, const options::replace& options = options::replace{}); - /// - /// @{ /// /// Updates multiple documents matching the provided filter in this collection. /// @@ -1606,12 +1494,6 @@ class collection { std::initializer_list<_empty_doc_tag> update, const options::update& options = options::update()); - /// - /// @} - /// - - /// - /// @{ /// /// Updates a single document matching the provided filter in this collection. /// @@ -1765,10 +1647,6 @@ class collection { std::initializer_list<_empty_doc_tag> update, const options::update& options = options::update()); - /// - /// @} - /// - /// /// Sets the write_concern for this collection. Changes will not have any effect on existing /// write operations. @@ -1787,10 +1665,10 @@ class collection { /// /// Gets an index_view to the collection. + /// index_view indexes(); /// - /// @{ /// /// Gets a change stream on this collection with an empty pipeline. /// Change streams are only supported with a "majority" read concern or no read concern. @@ -1855,12 +1733,9 @@ class collection { const pipeline& pipe, const options::change_stream& options = {}); - /// - /// @} - /// - /// /// Gets a search_index_view to the collection. + /// search_index_view search_indexes(); private: diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp index 1f02a6c95d..7b25d75831 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/config/prelude.hpp @@ -63,16 +63,3 @@ #pragma push_macro("MONGOCXX_UNREACHABLE") #undef MONGOCXX_UNREACHABLE #define MONGOCXX_UNREACHABLE std::abort() - -// Doxygen does not account for generated header files. -// Document globally applicable macros and namespaces here. - -/// -/// @namespace mongocxx -/// The top-level namespace for mongocxx library entities. -/// - -/// -/// @namespace mongocxx::v_noabi -/// Entities declared in this namespace do not have a stable ABI. -/// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/cursor.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/cursor.hpp index 3c27f1df2f..32d4d08280 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/cursor.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/cursor.hpp @@ -162,16 +162,14 @@ class cursor::iterator { friend ::mongocxx::v_noabi::cursor; /// - /// @{ + /// @relates mongocxx::v_noabi::mongocxx::cursor::iterator /// - /// Compare two iterators for (in)-equality. Iterators compare equal if + /// Compare two iterators for (in)-equality. Iterators compare equal if /// they point to the same underlying cursor or if both are exhausted. /// - /// @relates iterator - /// + /// @{ friend MONGOCXX_API bool MONGOCXX_CALL operator==(const iterator&, const iterator&); friend MONGOCXX_API bool MONGOCXX_CALL operator!=(const iterator&, const iterator&); - /// /// @} /// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/database.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/database.hpp index e3f2effca5..da0cb2d1ee 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/database.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/database.hpp @@ -83,8 +83,6 @@ class database { /// explicit operator bool() const noexcept; - /// - /// @{ /// /// Runs an aggregation framework pipeline against this database for /// pipeline stages that do not require an underlying collection, @@ -135,12 +133,7 @@ class database { cursor aggregate(const client_session& session, const pipeline& pipeline, const options::aggregate& options = options::aggregate()); - /// - /// @} - /// - /// - /// @{ /// /// Runs a command against this database. /// @@ -181,12 +174,7 @@ class database { /// bsoncxx::v_noabi::document::value run_command(bsoncxx::v_noabi::document::view_or_value command, uint32_t server_id); - /// - /// @} - /// - /// - /// @{ /// /// Explicitly creates a collection in this database with the specified options. /// @@ -333,12 +321,6 @@ class database { const options::create_collection_deprecated& collection_options, const stdx::optional& write_concern = {}); - /// - /// @} - /// - - /// - /// @{ /// /// Drops the database and all its collections. /// @@ -373,9 +355,6 @@ class database { void drop(const client_session& session, const bsoncxx::v_noabi::stdx::optional& write_concern = {}); - /// - /// @} - /// /// /// Checks whether this database contains a collection having the given name. @@ -389,8 +368,6 @@ class database { /// bool has_collection(bsoncxx::v_noabi::string::view_or_value name) const; - /// - /// @{ /// /// Enumerates the collections in this database. /// @@ -452,10 +429,6 @@ class database { std::vector list_collection_names( const client_session& session, bsoncxx::v_noabi::document::view_or_value filter = {}); - /// - /// @} - /// - /// /// Get the name of this database. /// @@ -562,8 +535,6 @@ class database { gridfs::bucket gridfs_bucket( const options::gridfs::bucket& options = options::gridfs::bucket()) const; - /// - /// @{ /// /// Gets a change stream on this database with an empty pipeline. /// Change streams are only supported with a "majority" read concern or no read concern. @@ -628,10 +599,6 @@ class database { const pipeline& pipe, const options::change_stream& options = {}); - /// - /// @} - /// - private: friend ::mongocxx::v_noabi::client_encryption; friend ::mongocxx::v_noabi::client; diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/topology_description.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/topology_description.hpp index 7aa8d6dc3f..992ef12b61 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/topology_description.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/events/topology_description.hpp @@ -72,27 +72,21 @@ class topology_description { /// using const_iterator = container::const_iterator; - /// - /// @{ /// /// Returns an iterator to the beginning. /// + /// @{ iterator begin() noexcept; const_iterator begin() const noexcept; - - /// /// @} /// - /// - /// @{ /// /// Returns an iterator to the end. /// + /// @{ iterator end() noexcept; const_iterator end() const noexcept; - - /// /// @} /// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/exception/operation_exception.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/exception/operation_exception.hpp index 82a1e3adcc..3ab192f025 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/exception/operation_exception.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/exception/operation_exception.hpp @@ -50,16 +50,14 @@ class operation_exception : public exception { bsoncxx::v_noabi::document::value&& raw_server_error, std::string what_arg = ""); - /// - /// @{ /// /// The optional raw bson error document from the server. /// /// @returns The raw server error, if it is available. /// + /// @{ const stdx::optional& raw_server_error() const; stdx::optional& raw_server_error(); - /// /// @} /// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/fwd.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/fwd.hpp index c4935dccce..a6701dcc92 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/fwd.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/fwd.hpp @@ -111,3 +111,8 @@ #include #include #include + +/// +/// @namespace mongocxx::v_noabi +/// Entities declared in this namespace do not have a stable ABI. +/// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/gridfs/bucket.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/gridfs/bucket.hpp index baeeea152b..61ae3469d6 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/gridfs/bucket.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/gridfs/bucket.hpp @@ -99,8 +99,6 @@ class bucket { /// explicit operator bool() const noexcept; - /// - /// @{ /// /// Opens a gridfs::uploader to create a new GridFS file. The id of the file will be /// automatically generated as an ObjectId. @@ -163,12 +161,7 @@ class bucket { uploader open_upload_stream(const client_session& session, stdx::string_view filename, const options::gridfs::upload& options = {}); - /// - /// @} - /// - /// - /// @{ /// /// Opens a gridfs::uploader to create a new GridFS file. /// @@ -237,12 +230,7 @@ class bucket { bsoncxx::v_noabi::types::bson_value::view id, stdx::string_view filename, const options::gridfs::upload& options = {}); - /// - /// @} - /// - /// - /// @{ /// /// Creates a new GridFS file by uploading bytes from an input stream. The id of the file will /// be automatically generated as an ObjectId. @@ -336,12 +324,7 @@ class bucket { stdx::string_view filename, std::istream* source, const options::gridfs::upload& options = {}); - /// - /// @} - /// - /// - /// @{ /// /// Creates a new GridFS file with a user-supplied unique id by uploading bytes from an input /// stream. @@ -437,12 +420,7 @@ class bucket { stdx::string_view filename, std::istream* source, const options::gridfs::upload& options = {}); - /// - /// @} - /// - /// - /// @{ /// /// Opens a gridfs::downloader to read a GridFS file. /// @@ -481,12 +459,7 @@ class bucket { /// downloader open_download_stream(const client_session& session, bsoncxx::v_noabi::types::bson_value::view id); - /// - /// @} - /// - /// - /// @{ /// /// Downloads the contents of a stored GridFS file from the bucket and writes it to a stream. /// @@ -511,8 +484,7 @@ class bucket { std::ostream* destination); /// - /// @copydoc download_to_stream(bsoncxx::v_noabi::types::bson_value::view id, std::ostream* - /// destination) + /// @copydoc download_to_stream(bsoncxx::v_noabi::types::bson_value::view id, std::ostream* destination) /// /// @param start The byte offset to the beginning of content to download. /// @param end The byte offset to the end of content to download. @@ -549,25 +521,18 @@ class bucket { bsoncxx::v_noabi::types::bson_value::view id, std::ostream* destination); - // clang-format off /// /// @copydoc download_to_stream(const client_session& session, bsoncxx::v_noabi::types::bson_value::view id, std::ostream* destination) /// /// @param start The byte offset to the beginning of content to download. /// @param end The byte offset to the end of content to download. /// - // clang-format on void download_to_stream(const client_session& session, bsoncxx::v_noabi::types::bson_value::view id, std::ostream* destination, std::size_t start, std::size_t end); - /// - /// @} - /// - /// - /// @{ /// /// Deletes a GridFS file from the bucket. /// @@ -596,12 +561,7 @@ class bucket { /// if an error occurs when removing file data or chunk data from the database. /// void delete_file(const client_session& session, bsoncxx::v_noabi::types::bson_value::view id); - /// - /// @} - /// - /// - /// @{ /// /// Finds the documents in the files collection of the bucket which match the provided filter. /// @@ -648,9 +608,6 @@ class bucket { cursor find(const client_session& session, bsoncxx::v_noabi::document::view_or_value filter, const options::find& options = {}); - /// - /// @} - /// /// /// Gets the name of the GridFS bucket. diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/hint.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/hint.hpp index 23578e822c..1c74bd6ea0 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/hint.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/hint.hpp @@ -53,19 +53,23 @@ class hint { explicit hint(bsoncxx::v_noabi::string::view_or_value index); /// - /// @{ + /// @relates mongocxx::v_noabi::hint /// - /// Compare this hint to a string for (in)-equality + /// Convenience methods to compare for equality against an index name. /// - /// @relates hint + /// Compares equal if the hint contains a matching index name. Otherwise, compares unequal. /// friend MONGOCXX_API bool MONGOCXX_CALL operator==(const hint& index_hint, std::string index); - friend MONGOCXX_API bool MONGOCXX_CALL operator==(const hint& index_hint, - bsoncxx::v_noabi::document::view index); /// - /// @} + /// @relates mongocxx::v_noabi::hint + /// + /// Convenience methods to compare for equality against an index document. + /// + /// Compares equal if the hint contains a matching index document. Otherwise, compares unequal. /// + friend MONGOCXX_API bool MONGOCXX_CALL operator==(const hint& index_hint, + bsoncxx::v_noabi::document::view index); /// /// Returns a types::bson_value::view representing this hint. @@ -91,54 +95,41 @@ class hint { }; /// -/// Convenience methods to compare for equality against an index name. +/// Convenience methods to compare against an index name. /// -/// Return true if this hint contains an index name that matches. -/// -/// @relates hint +/// Compares equal if the hint contains a matching index name. Otherwise, compares unequal. /// +/// @{ + +/// @relatesalso mongocxx::v_noabi::hint MONGOCXX_API bool MONGOCXX_CALL operator==(std::string index, const hint& index_hint); -/// -/// @{ -/// -/// Convenience methods to compare for inequality against an index name. -/// -/// Return true if this hint contains an index name that matches. -/// -/// @relates hint -/// +/// @relatesalso mongocxx::v_noabi::hint MONGOCXX_API bool MONGOCXX_CALL operator!=(const hint& index_hint, std::string index); + +/// @relatesalso mongocxx::v_noabi::hint MONGOCXX_API bool MONGOCXX_CALL operator!=(std::string index, const hint& index_index); -/// + /// @} /// /// /// Convenience methods to compare for equality against an index document. /// -/// Return true if this hint contains an index document that matches. -/// -/// @relates hint +/// Compares equal if the hint contains a matching index document. Otherwise, compares unequal. /// +/// @{ + +/// @relatesalso mongocxx::v_noabi::hint MONGOCXX_API bool MONGOCXX_CALL operator==(bsoncxx::v_noabi::document::view index, const hint& index_hint); - -/// -/// @{ -/// -/// Convenience methods to compare for equality against an index document. -/// -/// Return true if this hint contains an index document that matches. -/// -/// -/// @relates hint -/// +/// @relatesalso mongocxx::v_noabi::hint MONGOCXX_API bool MONGOCXX_CALL operator!=(const hint& index_hint, bsoncxx::v_noabi::document::view index); +/// @relatesalso mongocxx::v_noabi::hint MONGOCXX_API bool MONGOCXX_CALL operator!=(bsoncxx::v_noabi::document::view index, const hint& index_hint); -/// + /// @} /// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/index_view.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/index_view.hpp index 664f51d2f7..1521038881 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/index_view.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/index_view.hpp @@ -45,8 +45,6 @@ class index_view { index_view(const index_view&) = delete; index_view& operator=(const index_view&) = delete; - /// - /// @{ /// /// Returns a cursor over all the indexes. /// @@ -60,12 +58,6 @@ class index_view { /// cursor list(const client_session& session); - /// - /// @} - /// - - /// - /// @{ /// /// Creates an index. A convenience method that calls create_many. /// @@ -121,12 +113,6 @@ class index_view { const bsoncxx::v_noabi::document::view_or_value& index_options = {}, const options::index_view& options = options::index_view{}); - /// - /// @} - /// - - /// - /// @{ /// /// Creates an index. A convenience method that calls create_many. /// @@ -173,12 +159,6 @@ class index_view { const index_model& index, const options::index_view& options = options::index_view{}); - /// - /// @} - /// - - /// - /// @{ /// /// Adds a container of indexes to the collection. /// @@ -226,12 +206,6 @@ class index_view { const std::vector& indexes, const options::index_view& options = options::index_view{}); - /// - /// @} - /// - - /// - /// @{ /// /// Drops a single index by name. /// @@ -273,12 +247,6 @@ class index_view { stdx::string_view name, const options::index_view& options = options::index_view{}); - /// - /// @} - /// - - /// - /// @{ /// /// Attempts to drop a single index from the collection given the keys and options. /// @@ -336,12 +304,6 @@ class index_view { const bsoncxx::v_noabi::document::view_or_value& index_options = {}, const options::index_view& options = options::index_view{}); - /// - /// @} - /// - - /// - /// @{ /// /// Attempts to drop a single index from the collection given an index model. /// @@ -389,12 +351,6 @@ class index_view { const index_model& index, const options::index_view& options = options::index_view{}); - /// - /// @} - /// - - /// - /// @{ /// /// Drops all indexes in the collection. /// @@ -426,10 +382,6 @@ class index_view { void drop_all(const client_session& session, const options::index_view& options = options::index_view{}); - /// - /// @} - /// - private: friend ::mongocxx::v_noabi::collection; class MONGOCXX_PRIVATE impl; diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/model/update_many.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/model/update_many.hpp index 25d97db915..47b0fbbabd 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/model/update_many.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/model/update_many.hpp @@ -50,8 +50,6 @@ class update_many { }; public: - /// - /// @{ /// /// Constructs an update operation that will modify all documents matching the filter. /// @@ -84,10 +82,6 @@ class update_many { update_many(bsoncxx::v_noabi::document::view_or_value filter, std::initializer_list<_empty_doc_tag> update); - /// - /// @} - /// - /// /// Gets the filter. /// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/model/update_one.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/model/update_one.hpp index b852531b21..c0cc057c6d 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/model/update_one.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/model/update_one.hpp @@ -50,8 +50,6 @@ class update_one { }; public: - /// - /// @{ /// /// Constructs an update operation that will modify a single document matching the filter. /// @@ -84,10 +82,6 @@ class update_one { update_one(bsoncxx::v_noabi::document::view_or_value filter, std::initializer_list<_empty_doc_tag> update); - /// - /// @} - /// - /// /// Gets the filter /// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/model/write.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/model/write.hpp index e67ebbb473..b8efca1222 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/model/write.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/model/write.hpp @@ -87,8 +87,7 @@ class write { ~write(); /// - /// Returns the current type of this write. You must call this - /// method before calling any of the get methods below. + /// Returns the current type of this write. /// write_type type() const; diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/read_concern.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/read_concern.hpp index dec208a7b9..e7fdc226e4 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/read_concern.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/read_concern.hpp @@ -163,15 +163,13 @@ class read_concern { friend ::mongocxx::v_noabi::uri; /// - /// @{ + /// @relates mongocxx::v_noabi::read_concern /// /// Compares two read_concern objects for (in)-equality. /// - /// @relates: read_concern - /// + /// @{ friend MONGOCXX_API bool MONGOCXX_CALL operator==(const read_concern&, const read_concern&); friend MONGOCXX_API bool MONGOCXX_CALL operator!=(const read_concern&, const read_concern&); - /// /// @} /// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/read_preference.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/read_preference.hpp index cc6d63e581..1901a83df3 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/read_preference.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/read_preference.hpp @@ -291,17 +291,15 @@ class read_preference { friend ::mongocxx::v_noabi::uri; /// - /// @{ + /// @relates mongocxx::v_noabi::read_preference /// /// Compares two read_preference objects for (in)-equality. /// - /// @relates: read_preference - /// + /// @{ friend MONGOCXX_API bool MONGOCXX_CALL operator==(const read_preference&, const read_preference&); friend MONGOCXX_API bool MONGOCXX_CALL operator!=(const read_preference&, const read_preference&); - /// /// @} /// diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/search_index_view.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/search_index_view.hpp index 9f2d989607..cb0a2e26d2 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/search_index_view.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/search_index_view.hpp @@ -30,8 +30,6 @@ class search_index_view { ~search_index_view(); - /// - /// @{ /// /// Returns a cursor over all the search indexes. /// @@ -84,12 +82,6 @@ class search_index_view { bsoncxx::v_noabi::string::view_or_value name, const options::aggregate& options = options::aggregate()); - /// - /// @} - /// - - /// - /// @{ /// /// This is a convenience method for creating a single search index with a default name. /// @@ -164,12 +156,6 @@ class search_index_view { /// std::string create_one(const client_session& session, const search_index_model& model); - /// - /// @} - /// - - /// - /// @{ /// /// Creates multiple search indexes in the collection. /// @@ -193,12 +179,6 @@ class search_index_view { std::vector create_many(const client_session& session, const std::vector& models); - /// - /// @} - /// - - /// - /// @{ /// /// Drops a single search index from the collection by the index name. /// @@ -217,12 +197,6 @@ class search_index_view { /// void drop_one(const client_session& session, bsoncxx::v_noabi::string::view_or_value name); - /// - /// @} - /// - - /// - /// @{ /// /// Updates a single search index from the collection by the search index name. /// @@ -248,10 +222,6 @@ class search_index_view { bsoncxx::v_noabi::string::view_or_value name, bsoncxx::v_noabi::document::view_or_value definition); - /// - /// @} - /// - private: friend ::mongocxx::v_noabi::collection; diff --git a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/write_concern.hpp b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/write_concern.hpp index 324c7eaf67..16f059c43a 100644 --- a/src/mongocxx/include/mongocxx/v_noabi/mongocxx/write_concern.hpp +++ b/src/mongocxx/include/mongocxx/v_noabi/mongocxx/write_concern.hpp @@ -253,15 +253,13 @@ class write_concern { friend ::mongocxx::v_noabi::uri; /// - /// @{ + /// @relates mongocxx::v_noabi::write_concern /// /// Compares two write_concern objects for (in)-equality. /// - /// @relates: write_concern - /// + /// @{ friend MONGOCXX_API bool MONGOCXX_CALL operator==(const write_concern&, const write_concern&); friend MONGOCXX_API bool MONGOCXX_CALL operator!=(const write_concern&, const write_concern&); - /// /// @} /// diff --git a/src/mongocxx/lib/CMakeLists.txt b/src/mongocxx/lib/CMakeLists.txt index eba06782bd..a7fbada786 100644 --- a/src/mongocxx/lib/CMakeLists.txt +++ b/src/mongocxx/lib/CMakeLists.txt @@ -38,6 +38,7 @@ set(mongocxx_sources_v_noabi mongocxx/v_noabi/mongocxx/exception/error_code.cpp mongocxx/v_noabi/mongocxx/exception/operation_exception.cpp mongocxx/v_noabi/mongocxx/exception/server_error_code.cpp + mongocxx/v_noabi/mongocxx/fwd.cpp mongocxx/v_noabi/mongocxx/gridfs/bucket.cpp mongocxx/v_noabi/mongocxx/gridfs/downloader.cpp mongocxx/v_noabi/mongocxx/gridfs/uploader.cpp @@ -110,6 +111,7 @@ set(mongocxx_sources_v_noabi list(APPEND mongocxx_sources ${mongocxx_sources_v_noabi} + mongocxx/fwd.cpp ) list(TRANSFORM mongocxx_sources PREPEND "${CMAKE_CURRENT_SOURCE_DIR}/") set(mongocxx_sources "${mongocxx_sources}" PARENT_SCOPE) @@ -157,6 +159,7 @@ endif() set_dist_list(src_mongocxx_lib_DIST CMakeLists.txt ${mongocxx_sources_v_noabi} + mongocxx/fwd.cpp mongocxx/v_noabi/mongocxx/config/config.hpp.in mongocxx/v_noabi/mongocxx/config/private/config.hh.in mongocxx/v_noabi/mongocxx/config/private/postlude.hh diff --git a/src/mongocxx/lib/mongocxx/fwd.cpp b/src/mongocxx/lib/mongocxx/fwd.cpp new file mode 100644 index 0000000000..b14d35fc0c --- /dev/null +++ b/src/mongocxx/lib/mongocxx/fwd.cpp @@ -0,0 +1,16 @@ +// 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. + +// Validate that is included, not . +#include diff --git a/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/fwd.cpp b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/fwd.cpp new file mode 100644 index 0000000000..371c40a764 --- /dev/null +++ b/src/mongocxx/lib/mongocxx/v_noabi/mongocxx/fwd.cpp @@ -0,0 +1,15 @@ +// 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. + +#include