1 // SWIG file MultiStart.i
2 
3 %{
4 #include "openturns/MultiStart.hxx"
5 
6 namespace OT {
7   template <>
8   struct traitsPythonType<OT::OptimizationResult>
9   {
10     typedef _PyObject_ Type;
11   };
12 
13   template <>
14   inline
15   OT::OptimizationResult
16   convert< _PyObject_, OT::OptimizationResult >(PyObject * pyObj)
17   {
18     void * ptr = 0;
19     if (SWIG_IsOK(SWIG_ConvertPtr(pyObj, &ptr, SWIG_TypeQuery("OT::OptimizationResult *"), SWIG_POINTER_NO_NULL))) {
20       OT::OptimizationResult * p_it = reinterpret_cast< OT::OptimizationResult * >(ptr);
21       return *p_it;
22     }
23     else {
24       throw OT::InvalidArgumentException(HERE) << "Object passed as argument is not convertible to a OptimizationResult";
25     }
26     return OT::OptimizationResult();
27   }
28 }
29 %}
30 
31 %include MultiStart_doc.i
32 
33 %template(OptimizationResultCollection) OT::Collection<OT::OptimizationResult>;
34 
35 %include openturns/MultiStart.hxx
36 namespace OT{ %extend MultiStart { MultiStart(const MultiStart & other) { return new OT::MultiStart(other); } } }
37 
38