1 // SWIG file SklarCopula.i
2 
3 %{
4 #include "openturns/SklarCopula.hxx"
5 %}
6 
7 %include SklarCopula_doc.i
8 
9 %typemap(in) const OT::SklarCopula & {
10   void * ptr = 0;
11   if (SWIG_IsOK(SWIG_ConvertPtr($input, (void **) &$1, $1_descriptor, SWIG_POINTER_NO_NULL))) {
12     // From class, ok
13   } else if (SWIG_IsOK(SWIG_ConvertPtr($input, &ptr, SWIGTYPE_p_OT__Distribution, SWIG_POINTER_NO_NULL))) {
14     // From Distribution
15     OT::Distribution * p_dist = reinterpret_cast< OT::Distribution * >(ptr);
16     $1 = new OT::SklarCopula( *p_dist );
17   } else if (SWIG_IsOK(SWIG_ConvertPtr($input, &ptr, SWIGTYPE_p_OT__DistributionImplementation, SWIG_POINTER_NO_NULL))) {
18     // From DistributionImplementation
19     OT::DistributionImplementation * p_impl = reinterpret_cast< OT::DistributionImplementation * >(ptr);
20     $1 = new OT::SklarCopula(*p_impl);
21   } else {
22     SWIG_exception(SWIG_TypeError, "Object passed as argument is not convertible to a SklarCopula");
23   }
24 }
25 
26 %typemap(typecheck,precedence=SWIG_TYPECHECK_POINTER) const OT::SklarCopula & {
27   $1 = SWIG_IsOK(SWIG_ConvertPtr($input, NULL, $1_descriptor, SWIG_POINTER_NO_NULL))
28     || SWIG_IsOK(SWIG_ConvertPtr($input, NULL, SWIGTYPE_p_OT__Distribution, SWIG_POINTER_NO_NULL))
29     || SWIG_IsOK(SWIG_ConvertPtr($input, NULL, SWIGTYPE_p_OT__DistributionImplementation, SWIG_POINTER_NO_NULL));
30 }
31 
32 %include openturns/SklarCopula.hxx
SklarCopula(const SklarCopula & other)33 namespace OT { %extend SklarCopula { SklarCopula(const SklarCopula & other) { return new OT::SklarCopula(other); } } }
34