py3: Robot: gathering remaining diff of Robot-Modul
d90e334005baa59805a9c812203ef107ca3be2a8
This commit is contained in:
parent
21ffbeafb9
commit
4705980598
|
@ -218,6 +218,7 @@ void WaypointPy::setCont(Py::Boolean arg)
|
|||
getWaypointPtr()->Cont = (bool)arg;
|
||||
}
|
||||
|
||||
#if PY_MAJOR_VERSION >= 3
|
||||
Py::Long WaypointPy::getTool(void) const
|
||||
{
|
||||
return Py::Long((long)getWaypointPtr()->Tool);
|
||||
|
@ -245,6 +246,35 @@ void WaypointPy::setBase(Py::Long arg)
|
|||
else
|
||||
throw Py::ValueError("negative base not allowed!");
|
||||
}
|
||||
#else
|
||||
Py::Int WaypointPy::getTool(void) const
|
||||
{
|
||||
return Py::Int((long)getWaypointPtr()->Tool);
|
||||
}
|
||||
|
||||
void WaypointPy::setTool(Py::Int arg)
|
||||
{
|
||||
long value = static_cast<long>(arg);
|
||||
if (value >= 0)
|
||||
getWaypointPtr()->Tool = value;
|
||||
else
|
||||
throw Py::ValueError("negative tool not allowed!");
|
||||
}
|
||||
|
||||
Py::Int WaypointPy::getBase(void) const
|
||||
{
|
||||
return Py::Int((long)getWaypointPtr()->Base);
|
||||
}
|
||||
|
||||
void WaypointPy::setBase(Py::Int arg)
|
||||
{
|
||||
long value = static_cast<long>(arg);
|
||||
if (value >= 0)
|
||||
getWaypointPtr()->Base = value;
|
||||
else
|
||||
throw Py::ValueError("negative base not allowed!");
|
||||
}
|
||||
#endif
|
||||
|
||||
PyObject *WaypointPy::getCustomAttributes(const char* /*attr*/) const
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue
Block a user