11 #include <framework/core/ModuleParamList.h> 
   12 #include <framework/core/ModuleParam.h> 
   13 #include <framework/logging/Logger.h> 
   30                                      const std::string& description,
 
   31                                      const T& defaultValue)
 
   36     std::map<std::string, ModuleParamPtr>::iterator mapIter;
 
   40       m_paramMap.insert(std::make_pair(name, newParam));
 
   44       B2ERROR(
"A parameter with the name '" + name +
 
   45               "' already exists! The name of a module parameter must be unique within a module.");
 
   52                                      const std::string& description)
 
   57     std::map<std::string, ModuleParamPtr>::iterator mapIter;
 
   61       m_paramMap.insert(std::make_pair(name, newParam));
 
   63       B2ERROR(
"A parameter with the name '" + name +
 
   64               "' already exists! The name of a module parameter must be unique within a module.");
 
   74     } 
catch (std::runtime_error& exc) {
 
   83     std::map<std::string, ModuleParamPtr>::const_iterator mapIter;
 
  103   template <
typename PythonObject>
 
  108     p->setValueFromPythonObject(pyObj);
 
  111   template <
typename PythonObject>
 
  113                                              PythonObject& pyOutput,
 
  114                                              bool defaultValues)
 const 
  118       p->setValueToPythonObject(pyOutput, defaultValues);
 
  119     } 
catch (std::runtime_error& exc) {
 
std::map< std::string, ModuleParamPtr > m_paramMap
Stores the module parameters together with a string name as key.
static void throwTypeError(const std::string &name, const std::string &expectedTypeInfo, const std::string &typeInfo)
Throws an error for a requested parameter that exists but was request with the wrong type.
ModuleParamPtr getParameterPtr(const std::string &name) const
Returns a ModuleParamPtr to a parameter.
static void throwNotFoundError(const std::string &name)
Throws an error for a requested parameter that does not exist.
A single parameter of the module.
ModuleParam< T > & getParameter(const std::string &name) const
Returns a reference to a parameter.
void setParameter(const std::string &name, const T &value)
Sets the value of a parameter given by its name.
std::shared_ptr< ModuleParamBase > ModuleParamPtr
Defines a pointer to a module parameter as a boost shared pointer. */.
void setParamPython(const std::string &name, const PythonObject &pyObj)
Implements a method for setting boost::python objects.
void addParameter(const std::string &name, T ¶mVariable, const std::string &description, const T &defaultValue)
Adds a new parameter to the module list.
void setDefaultValue(const T &defaultValue)
Sets the default value of a parameter.
void setValue(const T &value)
Sets the value of a parameter.
void getParamValuesPython(const std::string &name, PythonObject &pyOutput, bool defaultValues) const
Returns a python object containing the value or default value of the given parameter.
Abstract base class for different kinds of events.