| 436 | } |
| 437 | |
| 438 | FeaturePythonImp::ValueT FeaturePythonImp::hasChildElement() const |
| 439 | { |
| 440 | _FC_PY_CALL_CHECK(hasChildElement, return (NotImplemented)); |
| 441 | Base::PyGILStateLocker lock; |
| 442 | try { |
| 443 | Py::Tuple args(1); |
| 444 | args.setItem(0, Py::Object(object->getPyObject(), true)); |
| 445 | Py::Boolean ok(Base::pyCall(py_hasChildElement.ptr(), args.ptr())); |
| 446 | return static_cast<bool>(ok) ? Accepted : Rejected; |
| 447 | } |
| 448 | catch (Py::Exception&) { |
| 449 | if (PyErr_ExceptionMatches(PyExc_NotImplementedError)) { |
| 450 | PyErr_Clear(); |
| 451 | return NotImplemented; |
| 452 | } |
| 453 | |
| 454 | Base::PyException e; // extract the Python error text |
| 455 | e.reportException(); |
| 456 | return Rejected; |
| 457 | } |
| 458 | } |
| 459 | |
| 460 | int FeaturePythonImp::isElementVisible(const char* element) const |
| 461 | { |
no test coverage detected