29 if (!PyObject_TypeCheck(
obj.ptr(), sipapi->api_wrapper_type)) {
30 throw std::runtime_error(
"extract() - Object is not a sip-wrapped type.");
33 sipapi->api_transfer_to(
obj.ptr(), 0);
35 auto wrapper =
reinterpret_cast<sipSimpleWrapper *
>(
obj.ptr());
36#if (SIP_API_MAJOR_NR == 8 && SIP_API_MINOR_NR >= 1) || SIP_API_MAJOR_NR > 8
37 return static_cast<T *
>(sipapi->api_get_address(wrapper));
38#elif SIP_API_MAJOR_NR == 8
39 return static_cast<T *
>(wrapper->data);
41 return static_cast<T *
>(wrapper->u.cppPtr);
50template <
typename T>
Object wrap(
const T &
obj,
char const *nameOfType) {
52 const auto type = sipapi->api_find_type(nameOfType);
56 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...