refs #91 Doxygen fixes in containers, predicates, and plugins.

Fixed PREDEFINED config in Doxyfile, so Doxygen only sees the variadic predicates.
This commit is contained in:
Mathew Sutcliffe
2014-02-08 14:11:15 +00:00
parent e46a883f08
commit c966d487f0
6 changed files with 30 additions and 10 deletions

View File

@@ -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 <class I> static ConstForwardIterator fromImpl(I i) { return ConstForwardIterator(new Pimpl<I>(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 <class I> static ConstBidirectionalIterator fromImpl(I i) { return ConstBidirectionalIterator(new Pimpl<I>(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 <class I> static BidirectionalIterator fromImpl(I i) { return BidirectionalIterator(new Pimpl<I>(std::move(i))); }

View File

@@ -92,6 +92,7 @@ namespace BlackMisc
*/
struct TPluginDeleter
{
//! Delete a plugin
static void cleanup(IPlugin *plugin)
{
if (plugin) {

View File

@@ -23,42 +23,58 @@ namespace BlackMisc
namespace Private
{
//! \internal
//! For internal use of BlackMisc::Predicates
template <class...> struct MemberEqual;
//! For internal use of BlackMisc::Predicates
template <class T, class M, class V> struct MemberEqual<T, M, V>
{
//! \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 <class T, class M, class V, class... Tail> struct MemberEqual<T, M, V, Tail...>
{
//! \brief
//! @{
MemberEqual<T, M, V> head;
MemberEqual<T, Tail...> 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 <class...> struct MemberLess;
//! For internal use of BlackMisc::Predicates
template <class T, class M> struct MemberLess<T, M>
{
//! \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 <class T, class M, class... Tail> struct MemberLess<T, M, Tail...>
{
//! \brief
//! @{
MemberLess<T, M> head;
MemberLess<T, Tail...> 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

View File

@@ -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 <class K1, class V1>
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 <class K1, class V1>
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 <class K1, class V1>