From f4858ea1dfe5f3c15f25c569fb3a7c885aedc840 Mon Sep 17 00:00:00 2001
From: "Joachim Wuttke (h)" <j.wuttke@fz-juelich.de>
Date: Wed, 18 May 2022 11:20:19 +0200
Subject: [PATCH] Swig: rm unused extension

---
 Wrap/Swig/libBornAgainResample.i        |  11 --
 auto/Wrap/libBornAgainResample.py       |  16 ---
 auto/Wrap/libBornAgainResample_wrap.cpp | 136 ------------------------
 3 files changed, 163 deletions(-)

diff --git a/Wrap/Swig/libBornAgainResample.i b/Wrap/Swig/libBornAgainResample.i
index f77d3eb5c68..b15dfb7df91 100644
--- a/Wrap/Swig/libBornAgainResample.i
+++ b/Wrap/Swig/libBornAgainResample.i
@@ -52,14 +52,3 @@
 
 %include "BAVersion.h"
 %include "Resample/Swig/MultiLayerFuncs.h"
-
-%extend Vec3<double> {
-    Vec3<double> __add__(const Vec3<double>& rhs) const {
-        return *($self) + rhs; }
-    Vec3<double> __mul__(double c) const {
-        return c * *($self); }
-    Vec3<double> __rmul__(double c) const {
-        return *($self) * c; }
-    Vec3<double> __neg__() const {
-        return - *($self); }
-};
diff --git a/auto/Wrap/libBornAgainResample.py b/auto/Wrap/libBornAgainResample.py
index 2234c835311..a9228ba36e7 100644
--- a/auto/Wrap/libBornAgainResample.py
+++ b/auto/Wrap/libBornAgainResample.py
@@ -1927,22 +1927,6 @@ class R3(object):
     def rotatedZ(self, a):
         r"""rotatedZ(R3 self, double a) -> R3"""
         return _libBornAgainResample.R3_rotatedZ(self, a)
-
-    def __add__(self, rhs):
-        r"""__add__(R3 self, R3 rhs) -> R3"""
-        return _libBornAgainResample.R3___add__(self, rhs)
-
-    def __mul__(self, c):
-        r"""__mul__(R3 self, double c) -> R3"""
-        return _libBornAgainResample.R3___mul__(self, c)
-
-    def __rmul__(self, c):
-        r"""__rmul__(R3 self, double c) -> R3"""
-        return _libBornAgainResample.R3___rmul__(self, c)
-
-    def __neg__(self):
-        r"""__neg__(R3 self) -> R3"""
-        return _libBornAgainResample.R3___neg__(self)
     __swig_destroy__ = _libBornAgainResample.delete_R3
 
 # Register R3 in _libBornAgainResample:
diff --git a/auto/Wrap/libBornAgainResample_wrap.cpp b/auto/Wrap/libBornAgainResample_wrap.cpp
index b925818aacf..076ff471901 100644
--- a/auto/Wrap/libBornAgainResample_wrap.cpp
+++ b/auto/Wrap/libBornAgainResample_wrap.cpp
@@ -6668,14 +6668,6 @@ SWIGINTERNINLINE PyObject*
 #include <heinz/Vectors3D.h>
 #include "Resample/Swig/MultiLayerFuncs.h"
 
-SWIGINTERN Vec3< double > Vec3_Sl_double_Sg____add__(Vec3< double > const *self,Vec3< double > const &rhs){
-        return *(self) + rhs; }
-SWIGINTERN Vec3< double > Vec3_Sl_double_Sg____mul__(Vec3< double > const *self,double c){
-        return c * *(self); }
-SWIGINTERN Vec3< double > Vec3_Sl_double_Sg____rmul__(Vec3< double > const *self,double c){
-        return *(self) * c; }
-SWIGINTERN Vec3< double > Vec3_Sl_double_Sg____neg__(Vec3< double > const *self){
-        return - *(self); }
 
   namespace swig {
     template <>  struct traits< Vec3< double > > {
@@ -24937,130 +24929,6 @@ fail:
 }
 
 
-SWIGINTERN PyObject *_wrap_R3___add__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  Vec3< double > *arg1 = (Vec3< double > *) 0 ;
-  Vec3< double > *arg2 = 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  void *argp2 = 0 ;
-  int res2 = 0 ;
-  PyObject *swig_obj[2] ;
-  Vec3< double > result;
-  
-  if (!SWIG_Python_UnpackTuple(args, "R3___add__", 2, 2, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Vec3T_double_t, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3___add__" "', argument " "1"" of type '" "Vec3< double > const *""'"); 
-  }
-  arg1 = reinterpret_cast< Vec3< double > * >(argp1);
-  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_Vec3T_double_t,  0  | 0);
-  if (!SWIG_IsOK(res2)) {
-    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "R3___add__" "', argument " "2"" of type '" "Vec3< double > const &""'"); 
-  }
-  if (!argp2) {
-    SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "R3___add__" "', argument " "2"" of type '" "Vec3< double > const &""'"); 
-  }
-  arg2 = reinterpret_cast< Vec3< double > * >(argp2);
-  result = Vec3_Sl_double_Sg____add__((Vec3< double > const *)arg1,(Vec3< double > const &)*arg2);
-  resultobj = SWIG_NewPointerObj((new Vec3< double >(static_cast< const Vec3< double >& >(result))), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN |  0 );
-  return resultobj;
-fail:
-  PyErr_Clear();
-  Py_INCREF(Py_NotImplemented);
-  return Py_NotImplemented;
-}
-
-
-SWIGINTERN PyObject *_wrap_R3___mul__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  Vec3< double > *arg1 = (Vec3< double > *) 0 ;
-  double arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  double val2 ;
-  int ecode2 = 0 ;
-  PyObject *swig_obj[2] ;
-  Vec3< double > result;
-  
-  if (!SWIG_Python_UnpackTuple(args, "R3___mul__", 2, 2, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Vec3T_double_t, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3___mul__" "', argument " "1"" of type '" "Vec3< double > const *""'"); 
-  }
-  arg1 = reinterpret_cast< Vec3< double > * >(argp1);
-  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "R3___mul__" "', argument " "2"" of type '" "double""'");
-  } 
-  arg2 = static_cast< double >(val2);
-  result = Vec3_Sl_double_Sg____mul__((Vec3< double > const *)arg1,arg2);
-  resultobj = SWIG_NewPointerObj((new Vec3< double >(static_cast< const Vec3< double >& >(result))), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN |  0 );
-  return resultobj;
-fail:
-  PyErr_Clear();
-  Py_INCREF(Py_NotImplemented);
-  return Py_NotImplemented;
-}
-
-
-SWIGINTERN PyObject *_wrap_R3___rmul__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  Vec3< double > *arg1 = (Vec3< double > *) 0 ;
-  double arg2 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  double val2 ;
-  int ecode2 = 0 ;
-  PyObject *swig_obj[2] ;
-  Vec3< double > result;
-  
-  if (!SWIG_Python_UnpackTuple(args, "R3___rmul__", 2, 2, swig_obj)) SWIG_fail;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Vec3T_double_t, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3___rmul__" "', argument " "1"" of type '" "Vec3< double > const *""'"); 
-  }
-  arg1 = reinterpret_cast< Vec3< double > * >(argp1);
-  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
-  if (!SWIG_IsOK(ecode2)) {
-    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "R3___rmul__" "', argument " "2"" of type '" "double""'");
-  } 
-  arg2 = static_cast< double >(val2);
-  result = Vec3_Sl_double_Sg____rmul__((Vec3< double > const *)arg1,arg2);
-  resultobj = SWIG_NewPointerObj((new Vec3< double >(static_cast< const Vec3< double >& >(result))), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN |  0 );
-  return resultobj;
-fail:
-  PyErr_Clear();
-  Py_INCREF(Py_NotImplemented);
-  return Py_NotImplemented;
-}
-
-
-SWIGINTERN PyObject *_wrap_R3___neg__(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
-  PyObject *resultobj = 0;
-  Vec3< double > *arg1 = (Vec3< double > *) 0 ;
-  void *argp1 = 0 ;
-  int res1 = 0 ;
-  PyObject *swig_obj[1] ;
-  Vec3< double > result;
-  
-  if (!args) SWIG_fail;
-  swig_obj[0] = args;
-  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_Vec3T_double_t, 0 |  0 );
-  if (!SWIG_IsOK(res1)) {
-    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "R3___neg__" "', argument " "1"" of type '" "Vec3< double > const *""'"); 
-  }
-  arg1 = reinterpret_cast< Vec3< double > * >(argp1);
-  result = Vec3_Sl_double_Sg____neg__((Vec3< double > const *)arg1);
-  resultobj = SWIG_NewPointerObj((new Vec3< double >(static_cast< const Vec3< double >& >(result))), SWIGTYPE_p_Vec3T_double_t, SWIG_POINTER_OWN |  0 );
-  return resultobj;
-fail:
-  PyErr_Clear();
-  Py_INCREF(Py_NotImplemented);
-  return Py_NotImplemented;
-}
-
-
 SWIGINTERN PyObject *_wrap_delete_R3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
   PyObject *resultobj = 0;
   Vec3< double > *arg1 = (Vec3< double > *) 0 ;
@@ -28498,10 +28366,6 @@ static PyMethodDef SwigMethods[] = {
 	 { "R3___ne__", _wrap_R3___ne__, METH_VARARGS, "R3___ne__(R3 self, R3 other) -> bool"},
 	 { "R3_rotatedY", _wrap_R3_rotatedY, METH_VARARGS, "R3_rotatedY(R3 self, double a) -> R3"},
 	 { "R3_rotatedZ", _wrap_R3_rotatedZ, METH_VARARGS, "R3_rotatedZ(R3 self, double a) -> R3"},
-	 { "R3___add__", _wrap_R3___add__, METH_VARARGS, "R3___add__(R3 self, R3 rhs) -> R3"},
-	 { "R3___mul__", _wrap_R3___mul__, METH_VARARGS, "R3___mul__(R3 self, double c) -> R3"},
-	 { "R3___rmul__", _wrap_R3___rmul__, METH_VARARGS, "R3___rmul__(R3 self, double c) -> R3"},
-	 { "R3___neg__", _wrap_R3___neg__, METH_O, "R3___neg__(R3 self) -> R3"},
 	 { "delete_R3", _wrap_delete_R3, METH_O, "delete_R3(R3 self)"},
 	 { "R3_swigregister", R3_swigregister, METH_O, NULL},
 	 { "R3_swiginit", R3_swiginit, METH_VARARGS, NULL},
-- 
GitLab