Browse Source

added setter for options in Settings class.

tempestpy_adaptions
gereon 12 years ago
parent
commit
cf772688f0
  1. 17
      src/utility/Settings.h

17
src/utility/Settings.h

@ -71,6 +71,23 @@ namespace settings {
return this->vm.count(name) > 0; return this->vm.count(name) > 0;
} }
/*!
* @brief Set an option.
*/
inline void set(std::string const & name) {
bpo::variable_value val;
this->vm.insert( std::make_pair(name, val) );
}
/*!
* @brief Set value for an option.
*/
template <typename T>
inline void set(std::string const & name, T const & value) {
bpo::variable_value val(value, false);
this->vm.insert( std::make_pair(name, val) );
}
/*! /*!
* @brief Register a new module. * @brief Register a new module.
* *

Loading…
Cancel
Save