30 if (!PyObject_TypeCheck(
obj.ptr(), sipapi->api_wrapper_type)) {
31 throw std::runtime_error(
"extract() - Object is not a sip-wrapped type.");
34 sipapi->api_transfer_to(
obj.ptr(), 0);
36 auto wrapper =
reinterpret_cast<sipSimpleWrapper *
>(
obj.ptr());
39#if (SIP_API_MAJOR_NR == 8 && SIP_API_MINOR_NR >= 1) || SIP_API_MAJOR_NR > 8 || QT_VERSION >= QT_VERSION_CHECK(6, 0, 0)
40 return static_cast<T *
>(sipapi->api_get_address(wrapper));
41#elif SIP_API_MAJOR_NR == 8
42 return static_cast<T *
>(wrapper->data);
44 return static_cast<T *
>(wrapper->u.cppPtr);
53template <
typename T>
Object wrap(
const T &
obj,
char const *nameOfType) {
55 const auto type = sipapi->api_find_type(nameOfType);
59 auto pyObj = sipapi->api_convert_from_type(
obj, type,
nullptr);
#define EXPORT_OPT_MANTIDQT_COMMON
double obj
the value of the quadratic function
The AlgorithmProgressDialogPresenter keeps track of the running algorithms and displays a progress ba...