File.h
Go to the documentation of this file.
#pragma once
#include <string>
#include <globjects/globjects_api.h>
#include <globjects/base/AbstractStringSource.h>
namespace globjects
{
class GLOBJECTS_API File : public globjects::AbstractStringSource
{
public:
File(const std::string & filePath, bool binary = true);
virtual std::string string() const override;
virtual std::string shortInfo() const override;
const std::string & filePath() const;
void reload();
static void reloadAll();
protected:
std::string m_filePath;
bool m_binary;
mutable std::string m_source;
mutable bool m_valid;
virtual ~File();
void loadFileContent() const;
};
} // namespace globjects
globjects::File::m_filePath
std::string m_filePath
Definition: File.h:37
globjects
Contains all the classes that wrap OpenGL functionality.
globjects::File::m_valid
bool m_valid
Definition: File.h:40
globjects::File
String source associated to a file.
Definition: File.h:22
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::m_binary
bool m_binary
Definition: File.h:38
globjects::File::m_source
std::string m_source
Definition: File.h:39
AbstractStringSource.h