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

namespace QuantLib {

public class FdmBoundaryCondition : global::System.IDisposable {
  private global::System.Runtime.InteropServices.HandleRef swigCPtr;
  private bool swigCMemOwnBase;

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

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

  ~FdmBoundaryCondition() {
    Dispose(false);
  }

  public void Dispose() {
    Dispose(true);
    global::System.GC.SuppressFinalize(this);
  }

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

  public virtual void applyBeforeApplying(FdmLinearOp arg0) {
    NQuantLibcPINVOKE.FdmBoundaryCondition_applyBeforeApplying(swigCPtr, FdmLinearOp.getCPtr(arg0));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public virtual void applyAfterApplying(QlArray arg0) {
    NQuantLibcPINVOKE.FdmBoundaryCondition_applyAfterApplying(swigCPtr, QlArray.getCPtr(arg0));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public virtual void applyBeforeSolving(FdmLinearOp arg0, QlArray rhs) {
    NQuantLibcPINVOKE.FdmBoundaryCondition_applyBeforeSolving(swigCPtr, FdmLinearOp.getCPtr(arg0), QlArray.getCPtr(rhs));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public virtual void applyAfterSolving(QlArray arg0) {
    NQuantLibcPINVOKE.FdmBoundaryCondition_applyAfterSolving(swigCPtr, QlArray.getCPtr(arg0));
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public virtual void setTime(double t) {
    NQuantLibcPINVOKE.FdmBoundaryCondition_setTime(swigCPtr, t);
    if (NQuantLibcPINVOKE.SWIGPendingException.Pending) throw NQuantLibcPINVOKE.SWIGPendingException.Retrieve();
  }

  public enum Side {
    NoSide,
    Upper,
    Lower
  }

}

}
