[go: up one dir, main page]

Skip to content

Commit

Permalink
doc: workaround for some idiosyncracies of doxygen
Browse files Browse the repository at this point in the history
  • Loading branch information
skypjack committed Mar 18, 2020
1 parent 7e5edad commit 360734b
Show file tree
Hide file tree
Showing 2 changed files with 84 additions and 5 deletions.
46 changes: 44 additions & 2 deletions src/entt/entity/group.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -338,7 +338,28 @@ class basic_group<Entity, exclude_t<Exclude...>, get_t<Get...>> {
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>
[[deprecated("use ::each instead")]]
void less(Func func) const {
Expand Down Expand Up @@ -756,7 +777,28 @@ class basic_group<Entity, exclude_t<Exclude...>, get_t<Get...>, Owned...> {
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>
[[deprecated("use ::each instead")]]
void less(Func func) const {
Expand Down
43 changes: 40 additions & 3 deletions src/entt/entity/view.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,8 @@ class basic_view<Entity, exclude_t<Exclude...>, Component...> {
}

/**
* @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
* returned entities will therefore respect the order of the pool associated
Expand All @@ -455,14 +456,50 @@ class basic_view<Entity, exclude_t<Exclude...>, Component...> {
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>
[[deprecated("use ::each instead")]]
void less(Func func) const {
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>
[[deprecated("use ::each instead")]]
void less(Func func) const {
Expand Down

0 comments on commit 360734b

Please sign in to comment.