Add component size/stride in ecs component info
All checks were successful
Run tests / Run tests (push) Successful in 7m41s
All checks were successful
Run tests / Run tests (push) Successful in 7m41s
This commit is contained in:
parent
7e9596d77f
commit
4aa18c4fda
1 changed files with 2 additions and 0 deletions
|
|
@ -36,6 +36,7 @@ namespace psemek::ecs::detail
|
|||
struct component_info
|
||||
{
|
||||
std::string name;
|
||||
std::size_t stride;
|
||||
std::type_info const * type_info;
|
||||
util::function<std::unique_ptr<column>()> column_factory;
|
||||
util::function<std::string(void const *)> to_string;
|
||||
|
|
@ -56,6 +57,7 @@ namespace psemek::ecs::detail
|
|||
|
||||
component_info & info = components_[uuid];
|
||||
info.name = component_name<Component>();
|
||||
info.stride = stride<Component>();
|
||||
info.type_info = &typeid(Component);
|
||||
info.column_factory = []{
|
||||
return std::make_unique<column_impl<Component>>();
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue