Ticket #42627: patch-scripts-python-openbabel-python.cpp.diff
File patch-scripts-python-openbabel-python.cpp.diff, 16.2 KB (added by Mathias.Laurin+macports.org@…, 11 years ago) |
---|
-
scripts/python/openbabel-python.
old new 25531 25531 result = (int)((OpenBabel::OBReaction const *)arg1)->NumProducts(); resultobj = SWIG_From_int(static_cast< int >(result)); 25532 25532 return resultobj; fail: return NULL; } 25533 25533 SWIGINTERN PyObject *_wrap_OBReaction_AddReactant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; 25534 OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; SwigValueWrapper< s hared_ptr< OpenBabel::OBMol > > arg2 ;25534 OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; SwigValueWrapper< std::shared_ptr< OpenBabel::OBMol > > arg2 ; 25535 25535 void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject *swig_obj[2] ; 25536 25536 if (!SWIG_Python_UnpackTuple(args,"OBReaction_AddReactant",2,2,swig_obj)) SWIG_fail; 25537 25537 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OpenBabel__OBReaction, 0 | 0 ); if (!SWIG_IsOK(res1)) { 25538 25538 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OBReaction_AddReactant" "', argument " "1"" of type '" "OpenBabel::OBReaction *""'"); } 25539 25539 arg1 = reinterpret_cast< OpenBabel::OBReaction * >(argp1); { 25540 25540 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, 0 | 0); if (!SWIG_IsOK(res2)) { 25541 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OBReaction_AddReactant" "', argument " "2"" of type '" "s hared_ptr< OpenBabel::OBMol > const""'"); }25541 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OBReaction_AddReactant" "', argument " "2"" of type '" "std::shared_ptr< OpenBabel::OBMol > const""'"); } 25542 25542 if (!argp2) { 25543 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OBReaction_AddReactant" "', argument " "2"" of type '" "s hared_ptr< OpenBabel::OBMol > const""'"); }25544 else { s hared_ptr< OpenBabel::OBMol > * temp = reinterpret_cast<shared_ptr< OpenBabel::OBMol > * >(argp2); arg2 = *temp;25543 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OBReaction_AddReactant" "', argument " "2"" of type '" "std::shared_ptr< OpenBabel::OBMol > const""'"); } 25544 else { std::shared_ptr< OpenBabel::OBMol > * temp = reinterpret_cast< std::shared_ptr< OpenBabel::OBMol > * >(argp2); arg2 = *temp; 25545 25545 if (SWIG_IsNewObj(res2)) delete temp; } } (arg1)->AddReactant(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: 25546 25546 return NULL; } 25547 25547 SWIGINTERN PyObject *_wrap_OBReaction_AddProduct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; 25548 OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; SwigValueWrapper< s hared_ptr< OpenBabel::OBMol > > arg2 ;25548 OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; SwigValueWrapper< std::shared_ptr< OpenBabel::OBMol > > arg2 ; 25549 25549 void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject *swig_obj[2] ; 25550 25550 if (!SWIG_Python_UnpackTuple(args,"OBReaction_AddProduct",2,2,swig_obj)) SWIG_fail; 25551 25551 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OpenBabel__OBReaction, 0 | 0 ); if (!SWIG_IsOK(res1)) { 25552 25552 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OBReaction_AddProduct" "', argument " "1"" of type '" "OpenBabel::OBReaction *""'"); } 25553 25553 arg1 = reinterpret_cast< OpenBabel::OBReaction * >(argp1); { 25554 25554 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, 0 | 0); if (!SWIG_IsOK(res2)) { 25555 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OBReaction_AddProduct" "', argument " "2"" of type '" "s hared_ptr< OpenBabel::OBMol > const""'"); }25555 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OBReaction_AddProduct" "', argument " "2"" of type '" "std::shared_ptr< OpenBabel::OBMol > const""'"); } 25556 25556 if (!argp2) { 25557 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OBReaction_AddProduct" "', argument " "2"" of type '" "s hared_ptr< OpenBabel::OBMol > const""'"); }25558 else { s hared_ptr< OpenBabel::OBMol > * temp = reinterpret_cast<shared_ptr< OpenBabel::OBMol > * >(argp2); arg2 = *temp;25557 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OBReaction_AddProduct" "', argument " "2"" of type '" "std::shared_ptr< OpenBabel::OBMol > const""'"); } 25558 else { std::shared_ptr< OpenBabel::OBMol > * temp = reinterpret_cast< std::shared_ptr< OpenBabel::OBMol > * >(argp2); arg2 = *temp; 25559 25559 if (SWIG_IsNewObj(res2)) delete temp; } } (arg1)->AddProduct(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: 25560 25560 return NULL; } 25561 25561 SWIGINTERN PyObject *_wrap_OBReaction_SetTransitionState(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 25562 25562 PyObject *resultobj = 0; OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; 25563 SwigValueWrapper< s hared_ptr< OpenBabel::OBMol > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ;25563 SwigValueWrapper< std::shared_ptr< OpenBabel::OBMol > > arg2 ; void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; 25564 25564 PyObject *swig_obj[2] ; if (!SWIG_Python_UnpackTuple(args,"OBReaction_SetTransitionState",2,2,swig_obj)) SWIG_fail; 25565 25565 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OpenBabel__OBReaction, 0 | 0 ); if (!SWIG_IsOK(res1)) { 25566 25566 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OBReaction_SetTransitionState" "', argument " "1"" of type '" "OpenBabel::OBReaction *""'"); } 25567 25567 arg1 = reinterpret_cast< OpenBabel::OBReaction * >(argp1); { 25568 25568 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, 0 | 0); if (!SWIG_IsOK(res2)) { 25569 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OBReaction_SetTransitionState" "', argument " "2"" of type '" "s hared_ptr< OpenBabel::OBMol > const""'"); }25569 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OBReaction_SetTransitionState" "', argument " "2"" of type '" "std::shared_ptr< OpenBabel::OBMol > const""'"); } 25570 25570 if (!argp2) { 25571 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OBReaction_SetTransitionState" "', argument " "2"" of type '" "s hared_ptr< OpenBabel::OBMol > const""'"); }25572 else { s hared_ptr< OpenBabel::OBMol > * temp = reinterpret_cast<shared_ptr< OpenBabel::OBMol > * >(argp2); arg2 = *temp;25571 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OBReaction_SetTransitionState" "', argument " "2"" of type '" "std::shared_ptr< OpenBabel::OBMol > const""'"); } 25572 else { std::shared_ptr< OpenBabel::OBMol > * temp = reinterpret_cast< std::shared_ptr< OpenBabel::OBMol > * >(argp2); arg2 = *temp; 25573 25573 if (SWIG_IsNewObj(res2)) delete temp; } } (arg1)->SetTransitionState(arg2); resultobj = SWIG_Py_Void(); 25574 25574 return resultobj; fail: return NULL; } 25575 25575 SWIGINTERN PyObject *_wrap_OBReaction_AddAgent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; 25576 OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; SwigValueWrapper< s hared_ptr< OpenBabel::OBMol > > arg2 ;25576 OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; SwigValueWrapper< std::shared_ptr< OpenBabel::OBMol > > arg2 ; 25577 25577 void *argp1 = 0 ; int res1 = 0 ; void *argp2 ; int res2 = 0 ; PyObject *swig_obj[2] ; 25578 25578 if (!SWIG_Python_UnpackTuple(args,"OBReaction_AddAgent",2,2,swig_obj)) SWIG_fail; 25579 25579 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OpenBabel__OBReaction, 0 | 0 ); if (!SWIG_IsOK(res1)) { 25580 25580 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OBReaction_AddAgent" "', argument " "1"" of type '" "OpenBabel::OBReaction *""'"); } 25581 25581 arg1 = reinterpret_cast< OpenBabel::OBReaction * >(argp1); { 25582 25582 res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, 0 | 0); if (!SWIG_IsOK(res2)) { 25583 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OBReaction_AddAgent" "', argument " "2"" of type '" "s hared_ptr< OpenBabel::OBMol > const""'"); }25583 SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "OBReaction_AddAgent" "', argument " "2"" of type '" "std::shared_ptr< OpenBabel::OBMol > const""'"); } 25584 25584 if (!argp2) { 25585 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OBReaction_AddAgent" "', argument " "2"" of type '" "s hared_ptr< OpenBabel::OBMol > const""'"); }25586 else { s hared_ptr< OpenBabel::OBMol > * temp = reinterpret_cast<shared_ptr< OpenBabel::OBMol > * >(argp2); arg2 = *temp;25585 SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "OBReaction_AddAgent" "', argument " "2"" of type '" "std::shared_ptr< OpenBabel::OBMol > const""'"); } 25586 else { std::shared_ptr< OpenBabel::OBMol > * temp = reinterpret_cast< std::shared_ptr< OpenBabel::OBMol > * >(argp2); arg2 = *temp; 25587 25587 if (SWIG_IsNewObj(res2)) delete temp; } } (arg1)->AddAgent(arg2); resultobj = SWIG_Py_Void(); return resultobj; fail: 25588 25588 return NULL; } 25589 25589 SWIGINTERN PyObject *_wrap_OBReaction_GetReactant(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; 25590 25590 OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; 25591 unsigned int val2 ; int ecode2 = 0 ; PyObject *swig_obj[2] ; SwigValueWrapper< s hared_ptr< OpenBabel::OBMol > > result;25591 unsigned int val2 ; int ecode2 = 0 ; PyObject *swig_obj[2] ; SwigValueWrapper< std::shared_ptr< OpenBabel::OBMol > > result; 25592 25592 if (!SWIG_Python_UnpackTuple(args,"OBReaction_GetReactant",2,2,swig_obj)) SWIG_fail; 25593 25593 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OpenBabel__OBReaction, 0 | 0 ); if (!SWIG_IsOK(res1)) { 25594 25594 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OBReaction_GetReactant" "', argument " "1"" of type '" "OpenBabel::OBReaction *""'"); } … … 25596 25596 if (!SWIG_IsOK(ecode2)) { 25597 25597 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OBReaction_GetReactant" "', argument " "2"" of type '" "unsigned int""'"); } 25598 25598 arg2 = static_cast< unsigned int >(val2); result = (arg1)->GetReactant(arg2); 25599 resultobj = SWIG_NewPointerObj((new s hared_ptr< OpenBabel::OBMol >(static_cast< constshared_ptr< OpenBabel::OBMol >& >(result))), SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, SWIG_POINTER_OWN | 0 );25599 resultobj = SWIG_NewPointerObj((new std::shared_ptr< OpenBabel::OBMol >(static_cast< const std::shared_ptr< OpenBabel::OBMol >& >(result))), SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, SWIG_POINTER_OWN | 0 ); 25600 25600 return resultobj; fail: return NULL; } 25601 25601 SWIGINTERN PyObject *_wrap_OBReaction_GetProduct(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; 25602 25602 OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; unsigned int arg2 ; void *argp1 = 0 ; int res1 = 0 ; 25603 unsigned int val2 ; int ecode2 = 0 ; PyObject *swig_obj[2] ; SwigValueWrapper< s hared_ptr< OpenBabel::OBMol > > result;25603 unsigned int val2 ; int ecode2 = 0 ; PyObject *swig_obj[2] ; SwigValueWrapper< std::shared_ptr< OpenBabel::OBMol > > result; 25604 25604 if (!SWIG_Python_UnpackTuple(args,"OBReaction_GetProduct",2,2,swig_obj)) SWIG_fail; 25605 25605 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OpenBabel__OBReaction, 0 | 0 ); if (!SWIG_IsOK(res1)) { 25606 25606 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OBReaction_GetProduct" "', argument " "1"" of type '" "OpenBabel::OBReaction *""'"); } … … 25608 25608 if (!SWIG_IsOK(ecode2)) { 25609 25609 SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "OBReaction_GetProduct" "', argument " "2"" of type '" "unsigned int""'"); } 25610 25610 arg2 = static_cast< unsigned int >(val2); result = (arg1)->GetProduct(arg2); 25611 resultobj = SWIG_NewPointerObj((new s hared_ptr< OpenBabel::OBMol >(static_cast< constshared_ptr< OpenBabel::OBMol >& >(result))), SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, SWIG_POINTER_OWN | 0 );25611 resultobj = SWIG_NewPointerObj((new std::shared_ptr< OpenBabel::OBMol >(static_cast< const std::shared_ptr< OpenBabel::OBMol >& >(result))), SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, SWIG_POINTER_OWN | 0 ); 25612 25612 return resultobj; fail: return NULL; } 25613 25613 SWIGINTERN PyObject *_wrap_OBReaction_GetTransitionState(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { 25614 25614 PyObject *resultobj = 0; OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; void *argp1 = 0 ; int res1 = 0 ; 25615 PyObject *swig_obj[1] ; SwigValueWrapper< s hared_ptr< OpenBabel::OBMol > > result; if (!args) SWIG_fail; swig_obj[0] = args;25615 PyObject *swig_obj[1] ; SwigValueWrapper< std::shared_ptr< OpenBabel::OBMol > > result; if (!args) SWIG_fail; swig_obj[0] = args; 25616 25616 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OpenBabel__OBReaction, 0 | 0 ); if (!SWIG_IsOK(res1)) { 25617 25617 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OBReaction_GetTransitionState" "', argument " "1"" of type '" "OpenBabel::OBReaction const *""'"); } 25618 25618 arg1 = reinterpret_cast< OpenBabel::OBReaction * >(argp1); 25619 25619 result = ((OpenBabel::OBReaction const *)arg1)->GetTransitionState(); 25620 resultobj = SWIG_NewPointerObj((new s hared_ptr< OpenBabel::OBMol >(static_cast< constshared_ptr< OpenBabel::OBMol >& >(result))), SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, SWIG_POINTER_OWN | 0 );25620 resultobj = SWIG_NewPointerObj((new std::shared_ptr< OpenBabel::OBMol >(static_cast< const std::shared_ptr< OpenBabel::OBMol >& >(result))), SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, SWIG_POINTER_OWN | 0 ); 25621 25621 return resultobj; fail: return NULL; } 25622 25622 SWIGINTERN PyObject *_wrap_OBReaction_GetAgent(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; 25623 25623 OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; 25624 SwigValueWrapper< s hared_ptr< OpenBabel::OBMol > > result; if (!args) SWIG_fail; swig_obj[0] = args;25624 SwigValueWrapper< std::shared_ptr< OpenBabel::OBMol > > result; if (!args) SWIG_fail; swig_obj[0] = args; 25625 25625 res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_OpenBabel__OBReaction, 0 | 0 ); if (!SWIG_IsOK(res1)) { 25626 25626 SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "OBReaction_GetAgent" "', argument " "1"" of type '" "OpenBabel::OBReaction const *""'"); } 25627 25627 arg1 = reinterpret_cast< OpenBabel::OBReaction * >(argp1); result = ((OpenBabel::OBReaction const *)arg1)->GetAgent(); 25628 resultobj = SWIG_NewPointerObj((new s hared_ptr< OpenBabel::OBMol >(static_cast< constshared_ptr< OpenBabel::OBMol >& >(result))), SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, SWIG_POINTER_OWN | 0 );25628 resultobj = SWIG_NewPointerObj((new std::shared_ptr< OpenBabel::OBMol >(static_cast< const std::shared_ptr< OpenBabel::OBMol >& >(result))), SWIGTYPE_p_shared_ptrT_OpenBabel__OBMol_t, SWIG_POINTER_OWN | 0 ); 25629 25629 return resultobj; fail: return NULL; } 25630 25630 SWIGINTERN PyObject *_wrap_OBReaction_GetTitle(PyObject *SWIGUNUSEDPARM(self), PyObject *args) { PyObject *resultobj = 0; 25631 25631 OpenBabel::OBReaction *arg1 = (OpenBabel::OBReaction *) 0 ; void *argp1 = 0 ; int res1 = 0 ; PyObject *swig_obj[1] ; … … 56173 56173 static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0}; 56174 56174 static swig_type_info _swigt__p_reference = {"_p_reference", "reference *", 0, 0, (void*)0, 0}; 56175 56175 static swig_type_info _swigt__p_second_type = {"_p_second_type", "second_type *", 0, 0, (void*)0, 0}; 56176 static swig_type_info _swigt__p_shared_ptrT_OpenBabel__OBMol_t = {"_p_shared_ptrT_OpenBabel__OBMol_t", "s hared_ptr< OpenBabel::OBMol > *", 0, 0, (void*)0, 0};56176 static swig_type_info _swigt__p_shared_ptrT_OpenBabel__OBMol_t = {"_p_shared_ptrT_OpenBabel__OBMol_t", "std::shared_ptr< OpenBabel::OBMol > *", 0, 0, (void*)0, 0}; 56177 56177 static swig_type_info _swigt__p_size_type = {"_p_size_type", "size_type *", 0, 0, (void*)0, 0}; 56178 56178 static swig_type_info _swigt__p_std__allocatorT_std__vectorT_std__pairT_unsigned_int_unsigned_int_t_std__allocatorT_std__pairT_unsigned_int_unsigned_int_t_t_t_t = {"_p_std__allocatorT_std__vectorT_std__pairT_unsigned_int_unsigned_int_t_std__allocatorT_std__pairT_unsigned_int_unsigned_int_t_t_t_t", "std::allocator< std::vector< std::pair< unsigned int,unsigned int >,std::allocator< std::pair< unsigned int,unsigned int > > > > *|std::vector< std::vector< std::pair< unsigned int,unsigned int > > >::allocator_type *", 0, 0, (void*)0, 0}; 56179 56179 static swig_type_info _swigt__p_std__binary_functionT_char_const_p_char_const_p_bool_t = {"_p_std__binary_functionT_char_const_p_char_const_p_bool_t", "std::binary_function< char const *,char const *,bool > *", 0, 0, (void*)0, 0};