30 class array_type :
public type<array_type> {
32 friend struct std::hash<array_type>;
34 using base_type = type;
37 base_type_handle _type =
nullptr;
43 array_type(ValueType type, size_t scalarSize, size_t count, size_t size)
noexcept;
45 array_type(ValueType type, size_t length, size_t vecSize, size_t count, size_t size)
noexcept;
47 array_type(ValueType type, size_t cols, size_t rows, size_t matSize, size_t count, size_t size)
noexcept;
49 array_type(
const mstd::ordered_map<std::string, var_data>& values, size_t structSize, size_t count, size_t size)
noexcept;
51 array_type(
const base_type_handle& type, size_t count, size_t size)
noexcept;
54 template<utils::glsl_type T>
56 template<
class T, std::enable_if_t<utils::is_glsl_type_v<T>,
bool> =
true>
59 : base_type(size), _type(std::dynamic_pointer_cast<glslstruct::base_type>(type)), _count(count) {
63 array_type(
const array_type& other)
noexcept;
65 array_type(array_type&& other)
noexcept;
67 ~array_type()
noexcept override;
70 array_type& operator=(
const array_type& other)
noexcept;
72 array_type& operator=(array_type&& other)
noexcept;
76 template<type_visitor T>
78 template<
class T, std::enable_if_t<is_type_visitor_v<T>,
bool> =
true>
80 void accept(T& visitor)
const {
85 [[nodiscard]]
const base_type_handle& get_type()
const noexcept;
88 [[nodiscard]] size_t get_count()
const noexcept;
91 [[nodiscard]] std::string to_string()
const noexcept override;
93 friend bool operator==(
const array_type& lhs,
const array_type& rhs)
noexcept;
94 friend bool operator!=(
const array_type& lhs,
const array_type& rhs)
noexcept;
#define _GLSL_STRUCT_HAS_CXX20
check if compiler has c++ version greater or equal to c++20 and if user enabled c++20 features using ...
Definition config.hpp:142
#define _GLSL_STRUCT_HAS_TYPES
check if user not disabled type containers using GLSL_STRUCT_DISABLE_TYPES
Definition config.hpp:162