![]() |
globjects
2.0.0.630135941c42
Strict OpenGL objects wrapper.
|
String source associated to a file. More...
#include <globjects/include/globjects/base/File.h>
Public Member Functions | |
File (const std::string &filePath, bool binary=true) | |
virtual | ~File () |
virtual std::string | string () const override |
virtual std::string | shortInfo () const override |
const std::string & | filePath () const |
void | reload () |
![]() | |
AbstractStringSource () | |
virtual | ~AbstractStringSource () |
virtual std::vector< std::string > | strings () const |
std::vector< const AbstractStringSource * > | flatten () const |
virtual void | flattenInto (std::vector< const AbstractStringSource * > &vector) const |
void | changed () const |
void | registerListener (AbstractStringSource *listener) |
void | deregisterListener (AbstractStringSource *listener) |
void | registerListener (Shader *listener) |
void | deregisterListener (Shader *listener) |
void | registerListener (NamedString *listener) |
void | deregisterListener (NamedString *listener) |
void | addSubject (AbstractStringSource *subject) |
void | removeSubject (AbstractStringSource *subject) |
Protected Member Functions | |
void | loadFileContent () const |
![]() | |
virtual void | notifyChanged (const AbstractStringSource *sender) |
Protected Attributes | |
std::string | m_filePath |
bool | m_binary |
std::string | m_source |
bool | m_valid |
![]() | |
std::set< AbstractStringSource * > | m_sourceListener |
std::set< Shader * > | m_shaderListener |
std::set< NamedString * > | m_namedStringListener |
std::set< AbstractStringSource * > | m_subjects |
Additional Inherited Members | |
![]() | |
static std::unique_ptr< File > | create (Args &&... args) |
static std::unique_ptr< File > | fromId (gl::GLuint id, Args &&... args) |
String source associated to a file.
The file path of a File can be queried using filePath(); To reload the contents from a file, use reload().
globjects::File::File | ( | const std::string & | filePath, |
bool | binary = true ) |
|
virtual |
|
overridevirtual |
Implements globjects::AbstractStringSource.
|
overridevirtual |
Reimplemented from globjects::AbstractStringSource.
const std::string & globjects::File::filePath | ( | ) | const |
void globjects::File::reload | ( | ) |
|
protected |
|
protected |
|
protected |
|
mutableprotected |
|
mutableprotected |