//------------------------------------------------------------------------------
// <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 HazardRateCurve : DefaultProbabilityTermStructure {
  private global::System.Runtime.InteropServices.HandleRef swigCPtr;

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

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

  ~HazardRateCurve() {
    Dispose();
  }

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

  public HazardRateCurve(DateVector dates, DoubleVector hazardRates, DayCounter dayCounter, Calendar calendar, BackwardFlat i) : this(NQuantLibcPINVOKE.new_HazardRateCurve__SWIG_0(DateVector.getCPtr(dates), DoubleVector.getCPtr(hazardRates), DayCounter.getCPtr(dayCounter), Calendar.getCPtr(calendar), BackwardFlat.getCPtr(i)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public HazardRateCurve(DateVector dates, DoubleVector hazardRates, DayCounter dayCounter, Calendar calendar) : this(NQuantLibcPINVOKE.new_HazardRateCurve__SWIG_1(DateVector.getCPtr(dates), DoubleVector.getCPtr(hazardRates), DayCounter.getCPtr(dayCounter), Calendar.getCPtr(calendar)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public HazardRateCurve(DateVector dates, DoubleVector hazardRates, DayCounter dayCounter) : this(NQuantLibcPINVOKE.new_HazardRateCurve__SWIG_2(DateVector.getCPtr(dates), DoubleVector.getCPtr(hazardRates), DayCounter.getCPtr(dayCounter)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public DateVector dates() {
    DateVector ret = new DateVector(NQuantLibcPINVOKE.HazardRateCurve_dates(swigCPtr), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public DoubleVector hazardRates() {
    DoubleVector ret = new DoubleVector(NQuantLibcPINVOKE.HazardRateCurve_hazardRates(swigCPtr), false);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public NodeVector nodes() {
    NodeVector ret = new NodeVector(NQuantLibcPINVOKE.HazardRateCurve_nodes(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}

}
