Shader Tool
Small shader visualiser.
st::ConfigurationManager Class Reference

Contains the application configuration and loads it. More...

#include <ConfigurationManager.hpp>

Public Member Functions

 ConfigurationManager (const string &path)
 Creates a configuration manager. More...
 
vector< shared_ptr< Shader > > getDefaultShaders ()
 Returns a vector with the configured shader templates. More...
 
string getEditor ()
 Returns the path to the configured text editor. More...
 

Public Attributes

const string data_path
 
const string def_shaders_path
 
const string textures_path
 
const string config_path
 

Private Member Functions

bool load_config (const string &config_file_path)
 Loads the config xml and stars the parsing. More...
 
bool parse_config (rapidxml::xml_node< char > *config_node)
 Parses root node of the configuration. More...
 
bool parse_shaders (rapidxml::xml_node< char > *shaders_node)
 Parses template shaders. More...
 

Private Attributes

string shader_type
 
vector< shared_ptr< Shader > > default_shaders
 
string text_editor
 

Detailed Description

Contains the application configuration and loads it.

Constructor & Destructor Documentation

◆ ConfigurationManager()

st::ConfigurationManager::ConfigurationManager ( const string &  path)

Creates a configuration manager.

Parameters
pathPath to the root file folder.

Member Function Documentation

◆ getDefaultShaders()

vector< shared_ptr < Shader > > st::ConfigurationManager::getDefaultShaders ( )
inline

Returns a vector with the configured shader templates.

◆ getEditor()

string st::ConfigurationManager::getEditor ( )
inline

Returns the path to the configured text editor.

◆ load_config()

bool st::ConfigurationManager::load_config ( const string &  config_file_path)
private

Loads the config xml and stars the parsing.

◆ parse_config()

bool st::ConfigurationManager::parse_config ( rapidxml::xml_node< char > *  config_node)
private

Parses root node of the configuration.

◆ parse_shaders()

bool st::ConfigurationManager::parse_shaders ( rapidxml::xml_node< char > *  shaders_node)
private

Parses template shaders.

Member Data Documentation

◆ config_path

const string st::ConfigurationManager::config_path

◆ data_path

const string st::ConfigurationManager::data_path

◆ def_shaders_path

const string st::ConfigurationManager::def_shaders_path

◆ default_shaders

vector< shared_ptr < Shader > > st::ConfigurationManager::default_shaders
private

◆ shader_type

string st::ConfigurationManager::shader_type
private

◆ text_editor

string st::ConfigurationManager::text_editor
private

◆ textures_path

const string st::ConfigurationManager::textures_path

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