//------------------------------------------------------------------------------
// <auto-generated />
//
// This file was automatically generated by SWIG (http://www.swig.org).
// Version 4.0.2
//
// Do not make changes to this file unless you know what you are doing--modify
// the SWIG interface file instead.
//------------------------------------------------------------------------------

namespace QuantLib {

public class FlatSmileSection : SmileSection {
  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
  private bool swigCMemOwnDerived;

  internal FlatSmileSection(global::System.IntPtr cPtr, bool cMemoryOwn) : base(NQuantLibcPINVOKE.FlatSmileSection_SWIGSmartPtrUpcast(cPtr), true) {
    swigCMemOwnDerived = cMemoryOwn;
    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
  }

  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(FlatSmileSection obj) {
    return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
  }

  protected override void Dispose(bool disposing) {
    lock(this) {
      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
        if (swigCMemOwnDerived) {
          swigCMemOwnDerived = false;
          NQuantLibcPINVOKE.delete_FlatSmileSection(swigCPtr);
        }
        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
      }
      base.Dispose(disposing);
    }
  }

  public FlatSmileSection(Date d, double vol, DayCounter dc, Date referenceDate, double atmLevel, VolatilityType type, double shift) : this(NQuantLibcPINVOKE.new_FlatSmileSection__SWIG_0(Date.getCPtr(d), vol, DayCounter.getCPtr(dc), Date.getCPtr(referenceDate), atmLevel, (int)type, shift), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public FlatSmileSection(Date d, double vol, DayCounter dc, Date referenceDate, double atmLevel, VolatilityType type) : this(NQuantLibcPINVOKE.new_FlatSmileSection__SWIG_1(Date.getCPtr(d), vol, DayCounter.getCPtr(dc), Date.getCPtr(referenceDate), atmLevel, (int)type), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public FlatSmileSection(Date d, double vol, DayCounter dc, Date referenceDate, double atmLevel) : this(NQuantLibcPINVOKE.new_FlatSmileSection__SWIG_2(Date.getCPtr(d), vol, DayCounter.getCPtr(dc), Date.getCPtr(referenceDate), atmLevel), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public FlatSmileSection(Date d, double vol, DayCounter dc, Date referenceDate) : this(NQuantLibcPINVOKE.new_FlatSmileSection__SWIG_3(Date.getCPtr(d), vol, DayCounter.getCPtr(dc), Date.getCPtr(referenceDate)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public FlatSmileSection(Date d, double vol, DayCounter dc) : this(NQuantLibcPINVOKE.new_FlatSmileSection__SWIG_4(Date.getCPtr(d), vol, DayCounter.getCPtr(dc)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public FlatSmileSection(double exerciseTime, double vol, DayCounter dc, double atmLevel, VolatilityType type, double shift) : this(NQuantLibcPINVOKE.new_FlatSmileSection__SWIG_5(exerciseTime, vol, DayCounter.getCPtr(dc), atmLevel, (int)type, shift), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public FlatSmileSection(double exerciseTime, double vol, DayCounter dc, double atmLevel, VolatilityType type) : this(NQuantLibcPINVOKE.new_FlatSmileSection__SWIG_6(exerciseTime, vol, DayCounter.getCPtr(dc), atmLevel, (int)type), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public FlatSmileSection(double exerciseTime, double vol, DayCounter dc, double atmLevel) : this(NQuantLibcPINVOKE.new_FlatSmileSection__SWIG_7(exerciseTime, vol, DayCounter.getCPtr(dc), atmLevel), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public FlatSmileSection(double exerciseTime, double vol, DayCounter dc) : this(NQuantLibcPINVOKE.new_FlatSmileSection__SWIG_8(exerciseTime, vol, DayCounter.getCPtr(dc)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

}

}
