diff --git a/docs/Doxyfile.cmake.in b/docs/Doxyfile.cmake.in index 48333731e..d6f2304a8 100644 --- a/docs/Doxyfile.cmake.in +++ b/docs/Doxyfile.cmake.in @@ -1621,7 +1621,7 @@ INCLUDE_FILE_PATTERNS = # undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED := Q_COMPILER_VARIADIC_TEMPLATES +PREDEFINED = Q_COMPILER_VARIADIC_TEMPLATES:=1 # 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. diff --git a/docs/Doxyfile.qmake b/docs/Doxyfile.qmake index d62853b5f..f41bad53d 100644 --- a/docs/Doxyfile.qmake +++ b/docs/Doxyfile.qmake @@ -1621,7 +1621,7 @@ INCLUDE_FILE_PATTERNS = # undefined via #undef or recursively expanded use the := operator # instead of the = operator. -PREDEFINED := Q_COMPILER_VARIADIC_TEMPLATES +PREDEFINED = Q_COMPILER_VARIADIC_TEMPLATES:=1 # 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. diff --git a/src/blackmisc/iterator.h b/src/blackmisc/iterator.h index f5dfdda0f..bf4fa57c1 100644 --- a/src/blackmisc/iterator.h +++ b/src/blackmisc/iterator.h @@ -66,8 +66,8 @@ namespace BlackMisc /*! * \brief Create a new iterator with a specific implementation type. - * \tparam C Becomes the iterator's implementation type. - * \param c Initial value for the iterator. The value is copied. + * \tparam I Becomes the iterator's implementation type. + * \param i Initial value for the iterator. The value is copied. */ template static ConstForwardIterator fromImpl(I i) { return ConstForwardIterator(new Pimpl(std::move(i))); } @@ -214,8 +214,8 @@ namespace BlackMisc /*! * \brief Create a new iterator with a specific implementation type. - * \tparam C Becomes the iterator's implementation type. - * \param c Initial value for the iterator. The value is copied. + * \tparam I Becomes the iterator's implementation type. + * \param i Initial value for the iterator. The value is copied. */ template static ConstBidirectionalIterator fromImpl(I i) { return ConstBidirectionalIterator(new Pimpl(std::move(i))); } @@ -421,8 +421,8 @@ namespace BlackMisc /*! * \brief Create a new iterator with a specific implementation type. - * \tparam C Becomes the iterator's implementation type. - * \param c Initial value for the iterator. The value is copied. + * \tparam I Becomes the iterator's implementation type. + * \param i Initial value for the iterator. The value is copied. */ template static BidirectionalIterator fromImpl(I i) { return BidirectionalIterator(new Pimpl(std::move(i))); } diff --git a/src/blackmisc/plugins.h b/src/blackmisc/plugins.h index 6e4182cd4..ad7c26598 100644 --- a/src/blackmisc/plugins.h +++ b/src/blackmisc/plugins.h @@ -92,6 +92,7 @@ namespace BlackMisc */ struct TPluginDeleter { + //! Delete a plugin static void cleanup(IPlugin *plugin) { if (plugin) { diff --git a/src/blackmisc/predicates.h b/src/blackmisc/predicates.h index 4ec229a7b..4dae75be6 100644 --- a/src/blackmisc/predicates.h +++ b/src/blackmisc/predicates.h @@ -23,42 +23,58 @@ namespace BlackMisc namespace Private { - //! \internal + //! For internal use of BlackMisc::Predicates template struct MemberEqual; + //! For internal use of BlackMisc::Predicates template struct MemberEqual { + //! \brief + //! @{ M m; V v; MemberEqual(M m_, V v_) : m(m_), v(v_) {} bool operator()(const T &obj) const { return (obj.*m)() == v; } + //! @} }; + //! For internal use of BlackMisc::Predicates template struct MemberEqual { + //! \brief + //! @{ MemberEqual head; MemberEqual tail; MemberEqual(M m, V v, Tail... tail_) : head(m, v), tail(tail_...) {} bool operator()(const T &obj) const { return head(obj) && tail(obj); } + //! @} }; - //! \internal + //! For internal use of BlackMisc::Predicates template struct MemberLess; + //! For internal use of BlackMisc::Predicates template struct MemberLess { + //! \brief + //! @{ M m; MemberLess(M m_) : m(m_) {} bool operator()(const T &a, const T &b) const { return (a.*m)() < (b.*m)(); } bool isStable(const T &a, const T &b) const { return (a.*m)() != (b.*m)(); } + //! @} }; + //! For internal use of BlackMisc::Predicates template struct MemberLess { + //! \brief + //! @{ MemberLess head; MemberLess tail; MemberLess(M m, Tail... tail_) : head(m), tail(tail_...) {} bool operator()(const T &a, const T &b) const { return head.isStable(a, b) ? head(a, b) : tail(a, b); } + //! @} }; } //namespace Private diff --git a/src/blackmisc/sequence.h b/src/blackmisc/sequence.h index 95a2e7a48..59502f271 100644 --- a/src/blackmisc/sequence.h +++ b/src/blackmisc/sequence.h @@ -243,6 +243,7 @@ namespace BlackMisc * \brief Modify by applying a value map to each element matching a particular key/value pair. * \param key1 A pointer to a member function of T. * \param value1 Will be compared to the return value of key1. + * \param newValues Values from this map will be put into each matching element. */ template void applyIf(K1 key1, V1 value1, const CValueMap &newValues) @@ -288,6 +289,7 @@ namespace BlackMisc * \brief Replace elements matching a particular key/value pair. * \param key1 A pointer to a member function of T. * \param value1 Will be compared to the return value of key1. + * \param replacement All matching elements will be replaced by copies of this one. */ template void replaceIf(K1 key1, V1 value1, const T &replacement) @@ -320,6 +322,7 @@ namespace BlackMisc * \brief Replace elements matching a particular key/value pair. If there is no match, push the new element on the end. * \param key1 A pointer to a member function of T. * \param value1 Will be compared to the return value of key1. + * \param replacement All matching elements will be replaced by copies of this one, or a copy will be added. * \pre The sequence must be initialized. */ template