30 class struct_type :
public type<struct_type> {
32 friend struct std::hash<struct_type>;
34 using base_type = type;
37 mstd::ordered_map<std::string, var_data> _variables;
41 struct_type(
const mstd::ordered_map<std::string, var_data>& values, size_t size)
noexcept;
43 struct_type(
const struct_type& other)
noexcept;
45 struct_type(struct_type&& other)
noexcept;
47 ~struct_type()
noexcept override;
50 struct_type& operator=(
const struct_type& other)
noexcept;
52 struct_type& operator=(struct_type&& other)
noexcept;
56 template<type_visitor T>
58 template<
class T, std::enable_if_t<is_type_visitor_v<T>,
bool> =
true>
60 void accept(T& visitor)
const {
65 [[nodiscard]]
bool contains(std::string_view name)
const noexcept;
68 [[nodiscard]]
const mstd::ordered_map<std::string, var_data>& get_variables()
const noexcept;
71 [[nodiscard]] mstd::ordered_map<std::string, var_data> get_top_level_variables()
const noexcept;
74 [[nodiscard]] std::string to_string()
const noexcept override;
76 friend bool operator==(
const struct_type& lhs,
const struct_type& rhs)
noexcept;
77 friend bool operator!=(
const struct_type& lhs,
const struct_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