| globjects 1.0.0.000000000000 Strict OpenGL objects wrapper.

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
8 #include <globjects/base/AbstractStringSource.h>
9
10
11 namespace globjects
12 {
13
14
22 class GLOBJECTS_API File : public globjects::AbstractStringSource
23 {
24 public:
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
36 protected:
37 std::string m_filePath;
38 bool m_binary;
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
globjects::File::m_binary
bool m_binary
Definition: File.h:38
globjects
Contains all the classes that wrap OpenGL functionality.
globjects::File::m_filePath
std::string m_filePath
Definition: File.h:37
globjects::File::m_valid
bool m_valid
Definition: File.h:40
AbstractStringSource.h
globjects::File::m_source
std::string m_source
Definition: File.h:39
globjects::AbstractStringSource
Superclass for all types of static and dynamic strings, e.g. for the use as Shader code...
Definition: AbstractStringSource.h:25
globjects::File
String source associated to a file.
Definition: File.h:22