|
GLSL Struct 1.4.0
glslstruct
|
base template class of structs parser More...
#include <base_parser.hpp>
Public Member Functions | |
| _GLSL_STRUCT_CONSTEXPR17 | base_parser ()=default |
| default constructor | |
| _GLSL_STRUCT_CONSTEXPR17 _layout_type & | add_variable (_layout_type &layoutRef, const std::string_view type, const std::string_view name, const size_t count) |
| adds variable array to layout | |
| _GLSL_STRUCT_CONSTEXPR17 _struct_type & | add_variable (_struct_type &structRef, const std::string_view type, const std::string_view name, const size_t count) |
| adds variable array to struct | |
| _GLSL_STRUCT_CONSTEXPR17 _layout_type & | add_variable (_layout_type &layoutRef, const std::string_view type, const std::string_view name) |
| adds variable to layout | |
| _GLSL_STRUCT_CONSTEXPR17 _struct_type & | add_variable (_struct_type &structRef, const std::string_view type, const std::string_view name) |
| adds variable to struct | |
| _GLSL_STRUCT_CONSTEXPR17 _layout_type & | add_variable (_layout_type &layoutRef, const std::string_view varStr) |
| adds variable to layout | |
| _GLSL_STRUCT_CONSTEXPR17 _struct_type & | add_variable (_struct_type &structRef, const std::string_view varStr) |
| adds variable to struct | |
| _GLSL_STRUCT_CONSTEXPR17 _layout_type & | add_variables (_layout_type &layoutRef, const std::string_view varsStr) |
| adds variables to layout | |
| _GLSL_STRUCT_CONSTEXPR17 _struct_type & | add_variables (_struct_type &structRef, const std::string_view varsStr) |
| adds variables to struct | |
| _GLSL_STRUCT_CONSTEXPR17 void | add_struct_definition (const std::string_view name, const std::string_view varsStr) |
| adds struct definition | |
| _GLSL_STRUCT_CONSTEXPR17 void | add_struct_definition (const std::string_view structStr) |
| adds struct definition | |
| _GLSL_STRUCT_CONSTEXPR17 void | add_structs_definitions (const std::string_view structsStr) |
| adds structs definitions | |
| _GLSL_STRUCT_CONSTEXPR17 _layout_type | create_struct_layout (const std::string_view varsStr) |
| creates layout with given variables | |
| _GLSL_STRUCT_CONSTEXPR17 _struct_type | create_struct (const std::string_view varsStr) |
| creates struct with given variables | |
| _GLSL_STRUCT_CONSTEXPR17 _layout_type | get_struct_layout (const std::string_view structName) |
| get layout of struct earlier defined | |
| _GLSL_STRUCT_CONSTEXPR17 _struct_type | get_struct (const std::string_view structName) |
| get struct earlier defined | |
| _GLSL_STRUCT_CONSTEXPR20 std::vector< _layout_type > | create_structs_layouts (const std::vector< std::string > &structs) |
| creates layouts from strings array | |
| _GLSL_STRUCT_CONSTEXPR17 std::vector< _layout_type > | create_structs_layouts (const std::string_view structsStr) |
| creates layouts from string | |
| _GLSL_STRUCT_CONSTEXPR17 std::vector< _struct_type > | create_structs (const std::vector< std::string > &structsStrs) |
| creates structs from strings array | |
| _GLSL_STRUCT_CONSTEXPR17 std::vector< _struct_type > | create_structs (const std::string_view structsStr) |
| creates structs from string | |
| _GLSL_STRUCT_CONSTEXPR20 std::vector< _layout_type > | get_structs_layouts (const std::vector< std::string > &structsNames) |
| gets layouts with names in array | |
| _GLSL_STRUCT_CONSTEXPR20 std::vector< _struct_type > | get_structs (const std::vector< std::string_view > &structsNames) |
| gets structs with names in array | |
Private Types | |
| using | _layout_type = Layout |
| layout type | |
| using | _struct_type = base_struct<Layout> |
| structure type | |
| using | _base_patterns = utils::base_parser_patterns |
| using | _ubo_pattern = utils::ubo_parser_pattern<_layout_type> |
| using | _ssbo_pattern = utils::ssbo_parser_pattern<_layout_type> |
Private Member Functions | |
| _GLSL_STRUCT_CONSTEXPR20 std::pair< std::string, std::string > | _extract_struct_data (const std::string_view structStr) |
| extracts name and body of structure from string | |
| _GLSL_STRUCT_CONSTEXPR20 std::vector< std::string > | _extract_structs (const std::string_view structsStr) |
| extracts struct strings from structs list | |
| _GLSL_STRUCT_CONSTEXPR17 _layout_type | _create_layout (const std::string_view varsStr) |
| creates layout with variables in vars list | |
| _GLSL_STRUCT_CONSTEXPR17 bool | _load_layout (const std::string_view structName) |
| loads layout from structsBodies to structsLayouts and returns if there is a layout with given name in structsLayouts | |
| _GLSL_STRUCT_CONSTEXPR17 bool | _contains_struct_body (const std::string_view name) |
| returns true if struct with given name is in _structsBodies | |
| _GLSL_STRUCT_CONSTEXPR17 bool | _contains_struct_layout (const std::string_view name) |
| returns true if struct with given name is in _structsLayouts | |
| template<class S> | |
| _GLSL_STRUCT_CONSTEXPR20 S & | _add_variable (S &ref, const std::string_view type, const std::string_view name, const size_t count=0) |
| adds variable of type given in string and with name and count | |
| template<class S> | |
| _GLSL_STRUCT_CONSTEXPR20 S & | _add_variable (S &ref, const std::string_view varStr) |
| adds variable given in string | |
| template<class S> | |
| _GLSL_STRUCT_CONSTEXPR20 S & | _add_variables (S &ref, const std::string_view varsStr) |
| adds variables given in var list string | |
Static Private Member Functions | |
| static _GLSL_STRUCT_CONSTEXPR17 ValueType | _get_value_type_from_string (const std::string_view type) noexcept |
| returns ValueType based on type in string | |
| template<class T, class S> | |
| static _GLSL_STRUCT_CONSTEXPR17 S & | _add_variable (S &ref, const std::string_view name, const size_t count) |
| adds variable of type T to struct or layout (if count != 0 then it adds array of variables of type T) | |
| template<class S> | |
| static _GLSL_STRUCT_CONSTEXPR17 S & | _add_scalar_variable (S &ref, const ValueType type, const std::string_view name, const size_t count) |
| adds scalar with name and of type based on ValueType to struct or layout | |
| template<class T, class S> | |
| static _GLSL_STRUCT_CONSTEXPR17 S & | _add_vec_variable (S &ref, const size_t length, const std::string_view name, const size_t count) |
| adds vec with name and with provided length to struct or layout | |
| template<class S> | |
| static _GLSL_STRUCT_CONSTEXPR17 S & | _add_vec_variable (S &ref, const ValueType type, const size_t length, const std::string_view name, const size_t count) |
| adds vec with name and of type based on ValueType and with provided length to struct or layout | |
| template<class T, size_t Cols, class S> | |
| static _GLSL_STRUCT_CONSTEXPR17 S & | _add_mat_variable (S &ref, const size_t rows, const std::string_view name, const size_t count) |
| adds mat with name and with provided rows to struct or layout | |
| template<class T, class S> | |
| static _GLSL_STRUCT_CONSTEXPR17 S & | _add_mat_variable (S &ref, const size_t cols, const size_t rows, const std::string_view name, const size_t count) |
| adds mat with name and with provided columns and rows to struct or layout | |
| template<class S> | |
| static _GLSL_STRUCT_CONSTEXPR17 S & | _add_mat_variable (S &ref, const ValueType type, const size_t cols, const size_t rows, const std::string_view name, const size_t count) |
| adds mat with name and of type based on ValueType and with provided columns and rows to struct or layout | |
Private Attributes | |
| std::unordered_map< std::string, std::string > | _structsBodies |
| loaded and not converted to layouts structs bodies | |
| std::unordered_map< std::string, _layout_type > | _structsLayouts = {} |
| loaded and converted to layouts structs | |
Static Private Attributes | |
| static _GLSL_STRUCT_CONSTEXPR17 bool | has_ubo_pattern = utils::has_ubo_pattern_v<_layout_type> |
| returns true if given layout can be used by ubo | |
| static _GLSL_STRUCT_CONSTEXPR17 bool | has_ssbo_pattern = utils::has_ssbo_pattern_v<_layout_type> |
| returns true if given layout can be used by ssbo | |
base template class of structs parser
| Layout | layout type for parser |
|
private |
|
private |
layout type
|
private |
|
private |
structure type
|
private |
|
default |
default constructor
|
inlinestaticprivate |
adds mat with name and with provided columns and rows to struct or layout
|
inlinestaticprivate |
adds mat with name and with provided rows to struct or layout
|
inlinestaticprivate |
adds mat with name and of type based on ValueType and with provided columns and rows to struct or layout
|
inlinestaticprivate |
adds scalar with name and of type based on ValueType to struct or layout
|
inlinestaticprivate |
adds variable of type T to struct or layout (if count != 0 then it adds array of variables of type T)
|
inlineprivate |
adds variable of type given in string and with name and count
|
inlineprivate |
adds variable given in string
|
inlineprivate |
adds variables given in var list string
|
inlinestaticprivate |
adds vec with name and with provided length to struct or layout
|
inlinestaticprivate |
adds vec with name and of type based on ValueType and with provided length to struct or layout
|
inlineprivate |
returns true if struct with given name is in _structsBodies
|
inlineprivate |
returns true if struct with given name is in _structsLayouts
|
inlineprivate |
creates layout with variables in vars list
|
inlineprivate |
extracts name and body of structure from string
|
inlineprivate |
extracts struct strings from structs list
|
inlinestaticprivatenoexcept |
returns ValueType based on type in string
|
inlineprivate |
loads layout from structsBodies to structsLayouts and returns if there is a layout with given name in structsLayouts
|
inline |
adds struct definition
|
inline |
adds struct definition
|
inline |
adds structs definitions
|
inline |
adds variable to layout
|
inline |
adds variable array to layout
|
inline |
adds variable to layout
|
inline |
adds variable to struct
|
inline |
adds variable array to struct
|
inline |
adds variable to struct
|
inline |
adds variables to layout
|
inline |
adds variables to struct
|
inline |
creates struct with given variables
|
inline |
creates layout with given variables
|
inline |
creates structs from string
|
inline |
creates structs from strings array
|
inline |
creates layouts from string
|
inline |
creates layouts from strings array
|
inline |
get struct earlier defined
|
inline |
get layout of struct earlier defined
|
inline |
gets structs with names in array
|
inline |
gets layouts with names in array
|
private |
loaded and not converted to layouts structs bodies
|
private |
loaded and converted to layouts structs
|
staticprivate |
returns true if given layout can be used by ssbo
|
staticprivate |
returns true if given layout can be used by ubo