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

namespace QuantLib {

public class DefaultProbabilityTermStructureHandle : global::System.IDisposable {
  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal DefaultProbabilityTermStructureHandle(global::System.IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
  }

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

  ~DefaultProbabilityTermStructureHandle() {
    Dispose();
  }

  public virtual void Dispose() {
    lock(this) {
      if (swigCPtr.Handle != global::System.IntPtr.Zero) {
        if (swigCMemOwn) {
          swigCMemOwn = false;
          NQuantLibcPINVOKE.delete_DefaultProbabilityTermStructureHandle(swigCPtr);
        }
        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
      }
      global::System.GC.SuppressFinalize(this);
    }
  }

  public DefaultProbabilityTermStructureHandle(DefaultProbabilityTermStructure arg0) : this(NQuantLibcPINVOKE.new_DefaultProbabilityTermStructureHandle__SWIG_0(DefaultProbabilityTermStructure.getCPtr(arg0)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public DefaultProbabilityTermStructureHandle() : this(NQuantLibcPINVOKE.new_DefaultProbabilityTermStructureHandle__SWIG_1(), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public DefaultProbabilityTermStructure __deref__() {
    DefaultProbabilityTermStructure ret = new DefaultProbabilityTermStructure(NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle___deref__(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public bool empty() {
    bool ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_empty(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public Observable asObservable() {
    Observable ret = new Observable(NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_asObservable(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public DayCounter dayCounter() {
    DayCounter ret = new DayCounter(NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_dayCounter(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public Calendar calendar() {
    Calendar ret = new Calendar(NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_calendar(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public Date referenceDate() {
    Date ret = new Date(NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_referenceDate(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public Date maxDate() {
    Date ret = new Date(NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_maxDate(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double maxTime() {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_maxTime(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double defaultProbability(Date arg0, bool extrapolate) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_0(swigCPtr, Date.getCPtr(arg0), extrapolate);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double defaultProbability(Date arg0) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_1(swigCPtr, Date.getCPtr(arg0));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double defaultProbability(double arg0, bool extrapolate) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_2(swigCPtr, arg0, extrapolate);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double defaultProbability(double arg0) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_3(swigCPtr, arg0);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double defaultProbability(Date arg0, Date arg1, bool extrapolate) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_4(swigCPtr, Date.getCPtr(arg0), Date.getCPtr(arg1), extrapolate);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double defaultProbability(Date arg0, Date arg1) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_5(swigCPtr, Date.getCPtr(arg0), Date.getCPtr(arg1));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double defaultProbability(double arg0, double arg1, bool extrapolate) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_6(swigCPtr, arg0, arg1, extrapolate);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double defaultProbability(double arg0, double arg1) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_defaultProbability__SWIG_7(swigCPtr, arg0, arg1);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double survivalProbability(Date arg0, bool extrapolate) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_survivalProbability__SWIG_0(swigCPtr, Date.getCPtr(arg0), extrapolate);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double survivalProbability(Date arg0) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_survivalProbability__SWIG_1(swigCPtr, Date.getCPtr(arg0));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double survivalProbability(double arg0, bool extrapolate) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_survivalProbability__SWIG_2(swigCPtr, arg0, extrapolate);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double survivalProbability(double arg0) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_survivalProbability__SWIG_3(swigCPtr, arg0);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double defaultDensity(Date arg0, bool extrapolate) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_defaultDensity__SWIG_0(swigCPtr, Date.getCPtr(arg0), extrapolate);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double defaultDensity(Date arg0) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_defaultDensity__SWIG_1(swigCPtr, Date.getCPtr(arg0));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double defaultDensity(double arg0, bool extrapolate) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_defaultDensity__SWIG_2(swigCPtr, arg0, extrapolate);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double defaultDensity(double arg0) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_defaultDensity__SWIG_3(swigCPtr, arg0);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double hazardRate(Date arg0, bool extrapolate) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_hazardRate__SWIG_0(swigCPtr, Date.getCPtr(arg0), extrapolate);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double hazardRate(Date arg0) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_hazardRate__SWIG_1(swigCPtr, Date.getCPtr(arg0));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double hazardRate(double arg0, bool extrapolate) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_hazardRate__SWIG_2(swigCPtr, arg0, extrapolate);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public double hazardRate(double arg0) {
    double ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_hazardRate__SWIG_3(swigCPtr, arg0);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public void enableExtrapolation() {
    NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_enableExtrapolation(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public void disableExtrapolation() {
    NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_disableExtrapolation(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public bool allowsExtrapolation() {
    bool ret = NQuantLibcPINVOKE.DefaultProbabilityTermStructureHandle_allowsExtrapolation(swigCPtr);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}

}
