|
|
@@ -411,20 +411,19 @@ public:
|
|
|
* object to them.
|
|
|
*
|
|
|
* The function object is invoked for each entity. It is provided with the
|
|
|
- * entity itself and a set of references to all its components. 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, Component &...);
|
|
|
- * void(Component &...);
|
|
|
+ * void(const entity_type, Type &...);
|
|
|
+ * void(Type &...);
|
|
|
* @endcode
|
|
|
*
|
|
|
* @note
|
|
|
- * Empty types aren't explicitly instantiated. Therefore, temporary objects
|
|
|
- * are returned during iterations. They can be caught only by copy or with
|
|
|
- * const references.
|
|
|
+ * 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.
|
|
|
@@ -436,19 +435,7 @@ public:
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * @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 all its 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, Component &...);
|
|
|
- * void(Component &...);
|
|
|
- * @endcode
|
|
|
+ * @copybrief each
|
|
|
*
|
|
|
* The pool of the suggested component is used to lead the iterations. The
|
|
|
* returned entities will therefore respect the order of the pool associated
|
|
|
@@ -456,10 +443,7 @@ public:
|
|
|
* It is no longer guaranteed that the performance is the best possible, but
|
|
|
* there will be greater control over the order of iteration.
|
|
|
*
|
|
|
- * @note
|
|
|
- * Empty types aren't explicitly instantiated. Therefore, temporary objects
|
|
|
- * are returned during iterations. They can be caught only by copy or with
|
|
|
- * const references.
|
|
|
+ * @sa each
|
|
|
*
|
|
|
* @tparam Comp Type of component to use to enforce the iteration order.
|
|
|
* @tparam Func Type of the function object to invoke.
|
|
|
@@ -471,59 +455,14 @@ public:
|
|
|
traverse<Comp>(std::move(func), non_empty_type{});
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * @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
|
|
|
- *
|
|
|
- * @sa each
|
|
|
- *
|
|
|
- * @tparam Func Type of the function object to invoke.
|
|
|
- * @param func A valid function object.
|
|
|
- */
|
|
|
+ /*! @copydoc each */
|
|
|
template<typename Func>
|
|
|
[[deprecated("use ::each instead")]]
|
|
|
void less(Func func) const {
|
|
|
each(std::move(func));
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * @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
|
|
|
- *
|
|
|
- * 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 each
|
|
|
- *
|
|
|
- * @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.
|
|
|
- */
|
|
|
+ /*! @copydoc each */
|
|
|
template<typename Comp, typename Func>
|
|
|
[[deprecated("use ::each instead")]]
|
|
|
void less(Func func) const {
|
|
|
@@ -748,8 +687,8 @@ public:
|
|
|
* object to them.
|
|
|
*
|
|
|
* The function object is invoked for each entity. It is provided with the
|
|
|
- * entity itself and a reference to its component. The _constness_ of the
|
|
|
- * component is as requested.<br/>
|
|
|
+ * entity itself and a reference to the component if it's a non-empty one.
|
|
|
+ * The _constness_ of the component is as requested.<br/>
|
|
|
* The signature of the function must be equivalent to one of the following
|
|
|
* forms:
|
|
|
*
|
|
|
@@ -759,9 +698,8 @@ public:
|
|
|
* @endcode
|
|
|
*
|
|
|
* @note
|
|
|
- * Empty types aren't explicitly instantiated. Therefore, temporary objects
|
|
|
- * are returned during iterations. They can be caught only by copy or with
|
|
|
- * const references.
|
|
|
+ * 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.
|
|
|
@@ -793,34 +731,7 @@ public:
|
|
|
}
|
|
|
}
|
|
|
|
|
|
- /**
|
|
|
- * @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 reference to its component if it's a non-empty one.
|
|
|
- * The _constness_ of the component is as requested.<br/>
|
|
|
- * The signature of the function must be equivalent to one of the following
|
|
|
- * forms in case the component isn't an empty one:
|
|
|
- *
|
|
|
- * @code{.cpp}
|
|
|
- * void(const entity_type, Component &);
|
|
|
- * void(Component &);
|
|
|
- * @endcode
|
|
|
- *
|
|
|
- * In case the component is an empty one instead, the following forms are
|
|
|
- * accepted:
|
|
|
- *
|
|
|
- * @code{.cpp}
|
|
|
- * void(const entity_type);
|
|
|
- * void();
|
|
|
- * @endcode
|
|
|
- *
|
|
|
- * @sa each
|
|
|
- *
|
|
|
- * @tparam Func Type of the function object to invoke.
|
|
|
- * @param func A valid function object.
|
|
|
- */
|
|
|
+ /*! @copydoc each */
|
|
|
template<typename Func>
|
|
|
[[deprecated("use ::each instead")]]
|
|
|
void less(Func func) const {
|