15 #ifndef _ENTITY_COMPONENT_CREATIONQUEUE_H_INCLUDED_
16 #define _ENTITY_COMPONENT_CREATIONQUEUE_H_INCLUDED_
18 #include "entity/config.hpp"
26 namespace entity {
namespace component
28 template<
typename ComponentPool>
33 typedef typename ComponentPool::type
type;
44 #if ENTITY_SUPPORT_VARIADICS
45 template<
typename... Args>
48 created_.push_back(std::make_pair(e,
type(std::forward<Args>(args)...)));
53 created_.push_back(std::make_pair(e, std::move(original)));
59 std::sort(created_.begin(), created_.end());
60 pool_.create_range(created_.begin(), created_.end());
75 std::vector<std::pair<weak_entity, type>> created_;
80 #endif // _ENTITY_COMPONENT_CREATIONQUEUE_H_INCLUDED_
creation_queue(ComponentPool &p)
void push(weak_entity e, Args &&...args)