15 #ifndef _ENTITY_ALGORITHM_FOREACH_H_INCLUDED_
16 #define _ENTITY_ALGORITHM_FOREACH_H_INCLUDED_
18 #include <boost/fusion/algorithm/iteration/fold.hpp>
19 #include <boost/fusion/algorithm/query/all.hpp>
20 #include <boost/fusion/algorithm/transformation/transform.hpp>
21 #include <boost/fusion/container/vector/convert.hpp>
22 #include <boost/fusion/functional/invocation/invoke.hpp>
25 #include "entity/config.hpp"
36 template<
typename EntityList,
typename ComponentPoolTuple,
typename Fn>
39 auto i =
begin(entities);
40 auto e =
end(entities);
42 auto c = boost::fusion::as_vector(
43 boost::fusion::transform(
44 std::forward<ComponentPoolTuple>(p),
76 template<
typename EntityList,
typename ComponentPoolTuple,
typename Fn>
79 auto i =
begin(entities);
80 auto e =
end(entities);
82 auto c = boost::fusion::as_vector(
83 boost::fusion::transform(
84 std::forward<ComponentPoolTuple>(p),
114 template<
typename EntityList,
typename ComponentPoolTuple,
typename Fn>
115 void for_each(EntityList
const& entities, ComponentPoolTuple&& p, Fn f)
121 #endif // _ENTITY_ALGORITHM_FOREACH_H_INCLUDED_
entity_pool::iterator end(entity_pool const &p)
void invoke(Fn f, Sequence< intrinsic_type & > &values)
entity_pool::iterator begin(entity_pool const &p)
void for_each(EntityList const &entities, ComponentPoolTuple &&p, iterator_traits::is_incremental_tag, Fn f)