34 lines
523 B
C++
34 lines
523 B
C++
#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...>>
|
|
{
|
|
public:
|
|
component_array_set() = default;
|
|
|
|
C component_flags;
|
|
z3d::structure<z3d::vector<Ts>...> component_arrays{};
|
|
|
|
protected:
|
|
void clear_component_arrays()
|
|
{
|
|
std::apply(
|
|
[](auto&... component_array)
|
|
{
|
|
(component_array.clear(), ...);
|
|
},
|
|
component_arrays
|
|
);
|
|
}
|
|
};
|
|
|
|
}
|