class
shader_factory_thelper class for preprocessing shader code
shader_
Constructors, destructors, conversion operators
-
shader_factory_t(std::
ifstream& file) explicit - constructor
-
shader_factory_t(std::
ifstream&& file) explicit - constructor
-
shader_factory_t(const std::
stringstream& sstream) explicit - constructor
-
shader_factory_t(std::
string code_template) explicit - constructor
-
shader_factory_t(const shader_
factory_ t& cpy) defaulted - copy constructor
-
shader_factory_t(shader_
factory_ t&& mov) defaulted noexcept - move constructor
Public functions
-
auto code() const -> std::
string - get processed code back
-
auto operator=(const shader_
factory_ t& cpy) -> shader_ factory_ t& defaulted - copy assignment operator
-
auto operator=(shader_
factory_ t&& mov) -> shader_ factory_ t& defaulted noexcept - move assignment operator
-
template<class T>auto set(std::
string_view key, const T& value) -> shader_ factory_ t& - overwrite substring in code
-
auto set(std::
string_view key, const char* value) -> shader_ factory_ t& - overwrite substring in code
Function documentation
glpp:: core:: object:: shader_factory_t:: shader_factory_t(std:: ifstream& file) explicit
constructor
Construct shader_
glpp:: core:: object:: shader_factory_t:: shader_factory_t(std:: ifstream&& file) explicit
constructor
Construct shader_
glpp:: core:: object:: shader_factory_t:: shader_factory_t(const std:: stringstream& sstream) explicit
constructor
Construct shader_
glpp:: core:: object:: shader_factory_t:: shader_factory_t(std:: string code_template) explicit
constructor
Construct shader_
glpp:: core:: object:: shader_factory_t:: shader_factory_t(const shader_ factory_ t& cpy) defaulted
copy constructor
shader_
glpp:: core:: object:: shader_factory_t:: shader_factory_t(shader_ factory_ t&& mov) defaulted noexcept
move constructor
shader_
std:: string glpp:: core:: object:: shader_factory_t:: code() const
get processed code back
Returns | generated code |
---|
Returns the resulting code after all replacements happend.
shader_ factory_ t& glpp:: core:: object:: shader_factory_t:: operator=(const shader_ factory_ t& cpy) defaulted
copy assignment operator
shader_
shader_ factory_ t& glpp:: core:: object:: shader_factory_t:: operator=(shader_ factory_ t&& mov) defaulted noexcept
move assignment operator
shader_
template<class T>
shader_ factory_ t& glpp:: core:: object:: shader_factory_t:: set(std:: string_view key,
const T& value)
overwrite substring in code
Parameters | |
---|---|
key | [in] key that shall be replaced |
value | [in] value that is transformed into a string and then replaces the key in the code |
Returns | reference to the shader_ |
This method is used to overwrite a substring of the code with a value.
shader_ factory_ t& glpp:: core:: object:: shader_factory_t:: set(std:: string_view key,
const char* value)
overwrite substring in code
Parameters | |
---|---|
key | [in] key that shall be replaced |
value | [in] value that replaces the key in the code |
Returns | reference to the shader_ |
This method is used to overwrite a substring of the code with a string.