globjects  1.0.0.000000000000
Strict OpenGL objects wrapper.
Loading...
Searching...
No Matches
File.h
Go to the documentation of this file.
1
2#pragma once
3
4#include <string>
5
6#include <globjects/globjects_api.h>
7
9
10
11namespace globjects
12{
13
14
22class GLOBJECTS_API File : public globjects::AbstractStringSource
23{
24public:
25 File(const std::string & filePath, bool binary = true);
26
27 virtual std::string string() const override;
28 virtual std::string shortInfo() const override;
29
30 const std::string & filePath() const;
31
32 void reload();
33
34 static void reloadAll();
35
36protected:
37 std::string m_filePath;
39 mutable std::string m_source;
40 mutable bool m_valid;
41
42 virtual ~File();
43
44 void loadFileContent() const;
45};
46
47
48} // namespace globjects
Superclass for all types of static and dynamic strings, e.g. for the use as Shader code.
Definition AbstractStringSource.h:26
String source associated to a file.
Definition File.h:23
virtual ~File()
File(const std::string &filePath, bool binary=true)
void loadFileContent() const
virtual std::string string() const override
std::string m_source
Definition File.h:39
virtual std::string shortInfo() const override
const std::string & filePath() const
bool m_binary
Definition File.h:38
bool m_valid
Definition File.h:40
static void reloadAll()
std::string m_filePath
Definition File.h:37
Contains all the classes that wrap OpenGL functionality.