9#include <boost/python/class.hpp>
10#include <boost/python/overloads.hpp>
24BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getParameterNames,
Component::getParameterNames, 0, 1)
25BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_hasParameter,
Component::hasParameter, 1, 2)
26BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getNumberParameter,
Component::getNumberParameter, 1, 2)
27BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getBoolParameter,
Component::getBoolParameter, 1, 2)
28BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getPositionParameter,
Component::getPositionParameter, 1, 2)
29BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getRotationParameter,
Component::getRotationParameter, 1, 2)
30BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getStringParameter,
Component::getStringParameter, 1, 2)
31BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getIntParameter,
Component::getIntParameter, 1, 2)
32BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getParameterType,
Component::getParameterType, 1, 2)
33BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getRotation,
Component::getRotation, 0, 0)
34BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getRelativePos,
Component::getRelativePos, 0, 0)
35BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getParamShortDescription,
Component::getParamShortDescription, 1, 2)
36BOOST_PYTHON_MEMBER_FUNCTION_OVERLOADS(Component_getParamDescription,
Component::getParamDescription, 1, 2)
42 class_<Component, bases<IComponent>, boost::noncopyable>(
"Component", no_init)
44 Component_getParameterNames((arg(
"self"), arg(
"recursive") =
true)))
46 Component_hasParameter((arg(
"self"), arg(
"name"), arg(
"recursive") =
true)))
48 Component_getNumberParameter((arg(
"self"), arg(
"pname"), arg(
"recursive") =
true)))
50 Component_getBoolParameter((arg(
"self"), arg(
"pname"), arg(
"recursive") =
true)))
52 Component_getPositionParameter((arg(
"self"), arg(
"pname"), arg(
"recursive") =
true)))
54 Component_getRotationParameter((arg(
"self"), arg(
"pname"), arg(
"recursive") =
true)))
56 Component_getStringParameter((arg(
"self"), arg(
"pname"), arg(
"recursive") =
true)))
58 Component_getIntParameter((arg(
"self"), arg(
"pname"), arg(
"recursive") =
true)))
64 Component_getParamShortDescription((arg(
"self"), arg(
"pname"), arg(
"recursive") =
true)))
66 Component_getParamDescription((arg(
"self"), arg(
"pname"), arg(
"recursive") =
true)))
69 "Return the short description of current parameterized component")
71 "Return the description of current parameterized component")
73 "Set component's description, works only if the component is "
74 "parameterized component")
79 Component_getParameterType((arg(
"self"), arg(
"pname"), arg(
"recursive") =
true)))
81 "Get fit parameter from the parameter map."
82 " The value of the parameter is determined from a look up table or a formula")
#define GNU_DIAG_OFF(x)
This is a collection of macros for turning compiler warnings off in a controlled manner.
Component is a wrapper for a Component which can modify some of its parameters, e....
std::string getParamDescription(const std::string &pname, bool recursive=true) const
Get description of a parameter attached to this component
std::string getParamShortDescription(const std::string &pname, bool recursive=true) const
Get a component's parameter short description.
std::vector< double > getNumberParameter(const std::string &pname, bool recursive=true) const override
Get a parameter defined as a double.
double getFittingParameter(const std::string &pname, double xvalue) const
Get fitting parameter.
std::vector< Kernel::Quat > getRotationParameter(const std::string &pname, bool recursive=true) const override
Get a parameter defined as a Kernel::Quaternion.
Kernel::V3D getRelativePos() const override
Get the position relative to the parent IComponent (absolute if no parent)
std::vector< int > getIntParameter(const std::string &pname, bool recursive=true) const override
Get a parameter defined as an int.
std::vector< Kernel::V3D > getPositionParameter(const std::string &pname, bool recursive=true) const override
Get a parameter defined as a Kernel::V3D.
std::string getParameterType(const std::string &pname, bool recursive=true) const override
Get a parameter's type – this is HACK until Python can export property regardless of the property typ...
std::set< std::string > getParameterNames(bool recursive=true) const override
Return the parameter names.
std::vector< std::string > getStringParameter(const std::string &pname, bool recursive=true) const override
Get a parameter defined as a string.
Kernel::Quat getRotation() const override
Get the absolute orientation of the IComponent.
void setDescription(const std::string &descr)
Set components description.
std::string getDescription() const
Get this component parameter's description – no recursive search within children.
bool hasParameter(const std::string &name, bool recursive=true) const override
Returns a boolean indicating if the component has the named parameter.
std::vector< bool > getBoolParameter(const std::string &pname, bool recursive=true) const override
Get a parameter defined as a bool.
std::string getShortDescription() const
Get a components's short description.
base class for Geometric IComponent