vrecko
virtual reality framework
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
AP_LSystem::Configuration Class Reference

#include <configuration.h>

Public Member Functions

bool loadCfgFile (string filename)
 
void setProperty (const string &prop)
 
void setProperty (const string &lsystemID, const string &prop)
 
void setProperty (const string &lsystemID, const string &prop, const string &value)
 
const int getLSystemIndex (const string &lsystemID)
 
const int getLSystemCount ()
 
const variable_value * getProperty (const string &prop)
 
const variable_value * getProperty (const string &lsystemID, const string &prop)
 
const variable_value * getProperty (const unsigned int lsystemIndex, const string &prop)
 
const void writeAll (std::basic_ostream< char > &, const string &)
 

Static Public Member Functions

static Configurationget ()
 

Detailed Description

Configuration class for storing all properties of all L-systems. Every property must be set globally. It is possible to set properties also only for particular L-systems. This value has higher priority.

Member Function Documentation

Configuration * Configuration::get ( )
static

Returns instance of Configuration singleton

Returns
Configuration instance
const int Configuration::getLSystemCount ( )

Returns number L-systems that have stored some properties

Returns
number of L-systems
const int Configuration::getLSystemIndex ( const string &  lsystemID)

Returns unique integer identifier of L-system

Parameters
lsystemIDname of L-system
Returns
unique index of L-system
const variable_value * Configuration::getProperty ( const string &  prop)

Returns property global value

Parameters
propproperty name
Returns
property value
const variable_value * Configuration::getProperty ( const string &  lsystemID,
const string &  prop 
)

Returns property value of one particular L-system

Parameters
lsystemIDname of L-system
propproperty name
Returns
property value
const variable_value * Configuration::getProperty ( const unsigned int  lsystemIndex,
const string &  prop 
)

Returns property value of one particular L-system

Parameters
lsystemIndexindex of L-system
propproperty name
Returns
property value
bool Configuration::loadCfgFile ( string  filename)

Loads a configuration file. Loaded properties are marked as global

Parameters
filenameconfiguration file filename
Returns
true if succeeded
void Configuration::setProperty ( const string &  prop)

Sets global property value

Parameters
propproperty string in following form: (property)=(value)
void Configuration::setProperty ( const string &  lsystemID,
const string &  prop 
)

Sets property only for one particular L-system

Parameters
lsystemIDname of L-system
propproperty string in following form: (property)=(value)
void Configuration::setProperty ( const string &  lsystemID,
const string &  prop,
const string &  value 
)

Sets property only for one particular L-system

Parameters
lsystemIDname of L-system
propproperty name
valueproperty value
const void Configuration::writeAll ( std::basic_ostream< char > &  out,
const string &  lsystemID 
)

Not implemented


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