MCPcopy Create free account
hub / github.com/FreeCAD/FreeCAD / hasChildElement

Method hasChildElement

src/App/FeaturePython.cpp:438–458  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

436}
437
438FeaturePythonImp::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
460int FeaturePythonImp::isElementVisible(const char* element) const
461{

Callers 10

_removeObjectMethod · 0.45
updateChildrenMethod · 0.45
isGroupMethod · 0.45
isObjectShowableMethod · 0.45
getStaticChildrenMethod · 0.45
getDynamicChildrenMethod · 0.45
isACSMethod · 0.45
isAVisGroupMethod · 0.45
isAContainerFunction · 0.45

Calls 5

pyCallFunction · 0.85
ObjectClass · 0.70
getPyObjectMethod · 0.45
ptrMethod · 0.45
reportExceptionMethod · 0.45

Tested by

no test coverage detected