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

namespace QuantLib {

public class GeneralizedBlackScholesProcess : StochasticProcess1D {
  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
  private bool swigCMemOwnDerived;

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

  internal static global::System.Runtime.InteropServices.HandleRef getCPtr(GeneralizedBlackScholesProcess 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_GeneralizedBlackScholesProcess(swigCPtr);
        }
        swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
      }
      base.Dispose(disposing);
    }
  }

  public GeneralizedBlackScholesProcess(QuoteHandle s0, YieldTermStructureHandle dividendTS, YieldTermStructureHandle riskFreeTS, BlackVolTermStructureHandle volTS) : this(NQuantLibcPINVOKE.new_GeneralizedBlackScholesProcess__SWIG_0(QuoteHandle.getCPtr(s0), YieldTermStructureHandle.getCPtr(dividendTS), YieldTermStructureHandle.getCPtr(riskFreeTS), BlackVolTermStructureHandle.getCPtr(volTS)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public GeneralizedBlackScholesProcess(QuoteHandle x0, YieldTermStructureHandle dividendTS, YieldTermStructureHandle riskFreeTS, BlackVolTermStructureHandle blackVolTS, LocalVolTermStructureHandle localVolTS) : this(NQuantLibcPINVOKE.new_GeneralizedBlackScholesProcess__SWIG_1(QuoteHandle.getCPtr(x0), YieldTermStructureHandle.getCPtr(dividendTS), YieldTermStructureHandle.getCPtr(riskFreeTS), BlackVolTermStructureHandle.getCPtr(blackVolTS), LocalVolTermStructureHandle.getCPtr(localVolTS)), true) {
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public QuoteHandle stateVariable() {
    QuoteHandle ret = new QuoteHandle(NQuantLibcPINVOKE.GeneralizedBlackScholesProcess_stateVariable(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public YieldTermStructureHandle dividendYield() {
    YieldTermStructureHandle ret = new YieldTermStructureHandle(NQuantLibcPINVOKE.GeneralizedBlackScholesProcess_dividendYield(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public YieldTermStructureHandle riskFreeRate() {
    YieldTermStructureHandle ret = new YieldTermStructureHandle(NQuantLibcPINVOKE.GeneralizedBlackScholesProcess_riskFreeRate(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public BlackVolTermStructureHandle blackVolatility() {
    BlackVolTermStructureHandle ret = new BlackVolTermStructureHandle(NQuantLibcPINVOKE.GeneralizedBlackScholesProcess_blackVolatility(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public LocalVolTermStructureHandle localVolatility() {
    LocalVolTermStructureHandle ret = new LocalVolTermStructureHandle(NQuantLibcPINVOKE.GeneralizedBlackScholesProcess_localVolatility(swigCPtr), true);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

}

}
