stuff...
This commit is contained in:
33
include/assets/data/generic/component_array_set.hpp
Normal file
33
include/assets/data/generic/component_array_set.hpp
Normal file
@@ -0,0 +1,33 @@
|
||||
#pragma once
|
||||
|
||||
#include "config/primitives.hpp"
|
||||
|
||||
namespace assets::detail
|
||||
{
|
||||
|
||||
template<typename C, typename T>
|
||||
class component_array_set {};
|
||||
|
||||
template<typename C, typename... Ts>
|
||||
class component_array_set<C, z3d::structure<Ts...>>
|
||||
{
|
||||
component_array_set() = default;
|
||||
|
||||
protected:
|
||||
void clear_component_arrays()
|
||||
{
|
||||
std::apply(
|
||||
[](auto&... component_array)
|
||||
{
|
||||
(component_array.clear(), ...);
|
||||
},
|
||||
component_arrays
|
||||
);
|
||||
}
|
||||
|
||||
C component_flags;
|
||||
z3d::structure<z3d::vector<Ts>...> component_arrays{};
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user