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

package org.quantlib;

public class Surface {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  protected Surface(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(Surface obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if(swigCPtr != 0 && swigCMemOwn) {
      swigCMemOwn = false;
      QuantLibJNI.delete_Surface(swigCPtr);
    }
    swigCPtr = 0;
  }

  public SWIGTYPE_p_Surface __deref__() {
    long cPtr = QuantLibJNI.Surface___deref__(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p_Surface(cPtr, false);
  }

  public boolean isNull() {
    return QuantLibJNI.Surface_isNull(swigCPtr, this);
  }

  public Surface() {
    this(QuantLibJNI.new_Surface(), true);
  }

  public double getValue(double x, double y) {
    return QuantLibJNI.Surface_getValue(swigCPtr, this, x, y);
  }

  public SWIGTYPE_p_boost__shared_ptrTDomain_t domain() {
    return new SWIGTYPE_p_boost__shared_ptrTDomain_t(QuantLibJNI.Surface_domain(swigCPtr, this), true);
  }

}
