globjects  2.0.0.690708773bba
Strict OpenGL objects wrapper.

String source associated to a file. More...

#include <globjects/include/globjects/base/File.h>

Inheritance diagram for globjects::File:
globjects::AbstractStringSource globjects::Instantiator< File > globjects::Changeable

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 ()
 
- Public Member Functions inherited from globjects::AbstractStringSource
virtual std::vector< std::string > strings () const
 
std::vector< const AbstractStringSource * > flatten () const
 
virtual void flattenInto (std::vector< const AbstractStringSource * > &vector) const
 
- Public Member Functions inherited from globjects::Changeable
 Changeable ()
 
virtual ~Changeable ()
 
void changed () const
 
void registerListener (ChangeListener *listener)
 
void deregisterListener (ChangeListener *listener)
 

Protected Member Functions

void loadFileContent () const
 

Protected Attributes

std::string m_filePath
 
bool m_binary
 
std::string m_source
 
bool m_valid
 
- Protected Attributes inherited from globjects::Changeable
std::set< ChangeListener * > m_listeners
 

Additional Inherited Members

- Static Public Member Functions inherited from globjects::Instantiator< File >
static std::unique_ptr< Filecreate (Args &&...args)
 
static std::unique_ptr< FilefromId (gl::GLuint id, Args &&...args)
 

Detailed Description

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().

See also
StringSource

Constructor & Destructor Documentation

globjects::File::File ( const std::string &  filePath,
bool  binary = true 
)
virtual globjects::File::~File ( )
virtual

Member Function Documentation

virtual std::string globjects::File::string ( ) const
overridevirtual
virtual std::string globjects::File::shortInfo ( ) const
overridevirtual

Reimplemented from globjects::AbstractStringSource.

const std::string& globjects::File::filePath ( ) const
void globjects::File::reload ( )
void globjects::File::loadFileContent ( ) const
protected

Member Data Documentation

std::string globjects::File::m_filePath
protected
bool globjects::File::m_binary
protected
std::string globjects::File::m_source
mutableprotected
bool globjects::File::m_valid
mutableprotected

The documentation for this class was generated from the following file: