11#include <framework/core/ModuleParam.h>
12#include <framework/core/PyObjConvUtils.h>
13#include <boost/python/object.hpp>
29 ModuleParamBase(TypeInfo(), description, force), m_paramVariable(paramVariable) {};
37 m_paramVariable = value;
38 m_setInSteering =
true;
44 m_defaultValue = defaultValue;
45 m_paramVariable = defaultValue;
46 m_setInSteering =
false;
52 return m_paramVariable;
58 return m_defaultValue;
69 bool defaultValues)
const
80 m_defaultValue = p->m_defaultValue;
81 m_paramVariable = p->m_paramVariable;
82 m_setInSteering = p->m_setInSteering;
89 m_paramVariable = m_defaultValue;
90 m_setInSteering =
false;
Base class for module parameter.
A single parameter of the module.
virtual void setValueFromPythonObject(const boost::python::object &pyObject) final
Implements a method for setting boost::python objects.
ModuleParam(T ¶mVariable, const std::string &description="", bool force=false)
Constructor.
virtual void setValueToPythonObject(boost::python::object &pyObject, bool defaultValues=false) const final
Returns a python object containing the value or the default value of the given parameter.
void resetValue()
Resets the parameter value by assigning the default value to the parameter value.
T & getDefaultValue()
Returns the default value of the parameter.
static std::string TypeInfo()
Static function to generate a string description for the parameter type.
virtual ~ModuleParam()
Destructor.
T & getValue()
Returns the value of the parameter.
void setDefaultValue(const T &defaultValue)
Sets the default value of a parameter.
void setValue(const T &value)
Sets the value of a parameter.
virtual void setValueFromParam(const ModuleParamBase ¶m) final
Set value from other ModuleParam of same type.
boost::python::object convertToPythonObject(const Scalar &value)
------------— From C++ TO Python Converter ---------------------—
Scalar convertPythonObject(const boost::python::object &pyObject, Scalar)
Convert from Python to given type.
Abstract base class for different kinds of events.
static std::string name()
type name.