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

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

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

  ~FixedRateBondForward() {
    Dispose();
  }

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

  public FixedRateBondForward(Date valueDate, Date maturityDate, Position.Type type, double strike, uint settlementDays, DayCounter dayCounter, Calendar calendar, BusinessDayConvention businessDayConvention, FixedRateBond fixedBond, YieldTermStructureHandle discountCurve, YieldTermStructureHandle incomeDiscountCurve) : this(NQuantLibcPINVOKE.new_FixedRateBondForward__SWIG_0(Date.getCPtr(valueDate), Date.getCPtr(maturityDate), (int)type, strike, settlementDays, DayCounter.getCPtr(dayCounter), Calendar.getCPtr(calendar), (int)businessDayConvention, FixedRateBond.getCPtr(fixedBond), YieldTermStructureHandle.getCPtr(discountCurve), YieldTermStructureHandle.getCPtr(incomeDiscountCurve)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public FixedRateBondForward(Date valueDate, Date maturityDate, Position.Type type, double strike, uint settlementDays, DayCounter dayCounter, Calendar calendar, BusinessDayConvention businessDayConvention, FixedRateBond fixedBond, YieldTermStructureHandle discountCurve) : this(NQuantLibcPINVOKE.new_FixedRateBondForward__SWIG_1(Date.getCPtr(valueDate), Date.getCPtr(maturityDate), (int)type, strike, settlementDays, DayCounter.getCPtr(dayCounter), Calendar.getCPtr(calendar), (int)businessDayConvention, FixedRateBond.getCPtr(fixedBond), YieldTermStructureHandle.getCPtr(discountCurve)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public FixedRateBondForward(Date valueDate, Date maturityDate, Position.Type type, double strike, uint settlementDays, DayCounter dayCounter, Calendar calendar, BusinessDayConvention businessDayConvention, FixedRateBond fixedBond) : this(NQuantLibcPINVOKE.new_FixedRateBondForward__SWIG_2(Date.getCPtr(valueDate), Date.getCPtr(maturityDate), (int)type, strike, settlementDays, DayCounter.getCPtr(dayCounter), Calendar.getCPtr(calendar), (int)businessDayConvention, FixedRateBond.getCPtr(fixedBond)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

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

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

  public double spotIncome(YieldTermStructureHandle incomeDiscountCurve) {
    double ret = NQuantLibcPINVOKE.FixedRateBondForward_spotIncome(swigCPtr, YieldTermStructureHandle.getCPtr(incomeDiscountCurve));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

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

}

}
