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 
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
bool m_binary
Definition: File.h:38
Contains all the classes that wrap OpenGL functionality.
std::string m_filePath
Definition: File.h:37
bool m_valid
Definition: File.h:40
std::string m_source
Definition: File.h:39
Superclass for all types of static and dynamic strings, e.g. for the use as Shader code...
Definition: AbstractStringSource.h:25
String source associated to a file.
Definition: File.h:22