Просмотр исходного кода

doc: workaround for some idiosyncracies of doxygen

Michele Caini 6 лет назад
Родитель
Сommit
360734b447
2 измененных файлов с 84 добавлено и 5 удалено
  1. 44 2
      src/entt/entity/group.hpp
  2. 40 3
      src/entt/entity/view.hpp

+ 44 - 2
src/entt/entity/group.hpp

@@ -338,7 +338,28 @@ public:
         traverse(std::move(func), get_type_list{});
         traverse(std::move(func), get_type_list{});
     }
     }
 
 
-    /*! @copydoc each */
+    /**
+     * @brief Iterates entities and components and applies the given function
+     * object to them.
+     *
+     * The function object is invoked for each entity. It is provided with the
+     * entity itself and a set of references to non-empty components. The
+     * _constness_ of the components is as requested.<br/>
+     * The signature of the function must be equivalent to one of the following
+     * forms:
+     *
+     * @code{.cpp}
+     * void(const entity_type, Type &...);
+     * void(Type &...);
+     * @endcode
+     *
+     * @note
+     * Empty types aren't explicitly instantiated and therefore they are never
+     * returned during iterations.
+     *
+     * @tparam Func Type of the function object to invoke.
+     * @param func A valid function object.
+     */
     template<typename Func>
     template<typename Func>
     [[deprecated("use ::each instead")]]
     [[deprecated("use ::each instead")]]
     void less(Func func) const {
     void less(Func func) const {
@@ -756,7 +777,28 @@ public:
         traverse(std::move(func), owned_type_list{}, get_type_list{});
         traverse(std::move(func), owned_type_list{}, get_type_list{});
     }
     }
 
 
-    /*! @copydoc each */
+    /**
+     * @brief Iterates entities and components and applies the given function
+     * object to them.
+     *
+     * The function object is invoked for each entity. It is provided with the
+     * entity itself and a set of references to non-empty components. The
+     * _constness_ of the components is as requested.<br/>
+     * The signature of the function must be equivalent to one of the following
+     * forms:
+     *
+     * @code{.cpp}
+     * void(const entity_type, Type &...);
+     * void(Type &...);
+     * @endcode
+     *
+     * @note
+     * Empty types aren't explicitly instantiated and therefore they are never
+     * returned during iterations.
+     *
+     * @tparam Func Type of the function object to invoke.
+     * @param func A valid function object.
+     */
     template<typename Func>
     template<typename Func>
     [[deprecated("use ::each instead")]]
     [[deprecated("use ::each instead")]]
     void less(Func func) const {
     void less(Func func) const {

+ 40 - 3
src/entt/entity/view.hpp

@@ -435,7 +435,8 @@ public:
     }
     }
 
 
     /**
     /**
-     * @copybrief each
+     * @brief Iterates entities and components and applies the given function
+     * object to them.
      *
      *
      * The pool of the suggested component is used to lead the iterations. The
      * The pool of the suggested component is used to lead the iterations. The
      * returned entities will therefore respect the order of the pool associated
      * returned entities will therefore respect the order of the pool associated
@@ -455,14 +456,50 @@ public:
         traverse<Comp>(std::move(func), non_empty_type{});
         traverse<Comp>(std::move(func), non_empty_type{});
     }
     }
 
 
-    /*! @copydoc each */
+    /**
+     * @brief Iterates entities and components and applies the given function
+     * object to them.
+     *
+     * The function object is invoked for each entity. It is provided with the
+     * entity itself and a set of references to non-empty components. The
+     * _constness_ of the components is as requested.<br/>
+     * The signature of the function must be equivalent to one of the following
+     * forms:
+     *
+     * @code{.cpp}
+     * void(const entity_type, Type &...);
+     * void(Type &...);
+     * @endcode
+     *
+     * @note
+     * Empty types aren't explicitly instantiated and therefore they are never
+     * returned during iterations.
+     *
+     * @tparam Func Type of the function object to invoke.
+     * @param func A valid function object.
+     */
     template<typename Func>
     template<typename Func>
     [[deprecated("use ::each instead")]]
     [[deprecated("use ::each instead")]]
     void less(Func func) const {
     void less(Func func) const {
         each(std::move(func));
         each(std::move(func));
     }
     }
 
 
-    /*! @copydoc each */
+    /**
+     * @brief Iterates entities and components and applies the given function
+     * object to them.
+     *
+     * The pool of the suggested component is used to lead the iterations. The
+     * returned entities will therefore respect the order of the pool associated
+     * with that type.<br/>
+     * It is no longer guaranteed that the performance is the best possible, but
+     * there will be greater control over the order of iteration.
+     *
+     * @sa less
+     *
+     * @tparam Comp Type of component to use to enforce the iteration order.
+     * @tparam Func Type of the function object to invoke.
+     * @param func A valid function object.
+     */
     template<typename Comp, typename Func>
     template<typename Comp, typename Func>
     [[deprecated("use ::each instead")]]
     [[deprecated("use ::each instead")]]
     void less(Func func) const {
     void less(Func func) const {