globjects  2.0.0.4363356ae2ef
Strict OpenGL objects wrapper.
Loading...
Searching...
No Matches
StaticStringSource.h
Go to the documentation of this file.
1
2#pragma once
3
4
5#include <string>
6
7#include <globjects/globjects_api.h>
10
11
12namespace globjects
13{
14
15
22class GLOBJECTS_API StaticStringSource : public AbstractStringSource, public Instantiator<StaticStringSource>
23{
24public:
25 StaticStringSource(const std::string & string);
26 StaticStringSource(std::string && string);
27 StaticStringSource(const char * data, size_t length);
28
29 virtual std::string shortInfo() const override;
30 virtual std::string string() const override;
31
32 void setString(const std::string & string);
33 void setString(std::string && string);
34
35protected:
36 std::string m_string;
37};
38
39
40} // namespace globjects
Superclass for all types of static and dynamic strings, e.g. for the use as Shader code.
Definition: AbstractStringSource.h:27
CRTP for creating objects similar to std::make_unique.
Definition: Instantiator.h:22
StaticStringSource is a StringSource using an std::string as source.
Definition: StaticStringSource.h:23
virtual std::string shortInfo() const override
StaticStringSource(const std::string &string)
void setString(const std::string &string)
StaticStringSource(const char *data, size_t length)
virtual std::string string() const override
void setString(std::string &&string)
StaticStringSource(std::string &&string)
std::string m_string
Definition: StaticStringSource.h:36
Contains all the classes that wrap OpenGL functionality.