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

Method supportsAsyncRecompute

src/App/FeaturePython.cpp:584–603  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

582}
583
584FeaturePythonImp::ValueT FeaturePythonImp::supportsAsyncRecompute() const
585{
586 _FC_PY_CALL_CHECK(supportsAsyncRecompute, return (NotImplemented));
587 Base::PyGILStateLocker lock;
588 try {
589 Py::Tuple args(1);
590 args.setItem(0, Py::Object(object->getPyObject(), true));
591 Py::Boolean ok(Base::pyCall(py_supportsAsyncRecompute.ptr(), args.ptr()));
592 return ok ? Accepted : Rejected;
593 }
594 catch (Py::Exception&) {
595 if (PyErr_ExceptionMatches(PyExc_NotImplementedError)) {
596 PyErr_Clear();
597 return NotImplemented;
598 }
599 Base::PyException e; // extract the Python error text
600 e.reportException();
601 return Rejected;
602 }
603}
604
605FeaturePythonImp::ValueT FeaturePythonImp::redirectSubName(std::ostringstream& ss,
606 App::DocumentObject* topParent,

Callers 1

canRecomputeOnWorkerMethod · 0.80

Calls 5

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

Tested by

no test coverage detected