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

package de.blichmann.idajava.natives;

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

  public TPointDouble(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

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

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        IdaJavaJNI.delete_TPointDouble(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public void setX(double value) {
    IdaJavaJNI.TPointDouble_x_set(swigCPtr, this, value);
  }

  public double getX() {
    return IdaJavaJNI.TPointDouble_x_get(swigCPtr, this);
  }

  public void setY(double value) {
    IdaJavaJNI.TPointDouble_y_set(swigCPtr, this, value);
  }

  public double getY() {
    return IdaJavaJNI.TPointDouble_y_get(swigCPtr, this);
  }

  public TPointDouble() {
    this(IdaJavaJNI.new_TPointDouble__SWIG_0(), true);
  }

  public TPointDouble(double a, double b) {
    this(IdaJavaJNI.new_TPointDouble__SWIG_1(a, b), true);
  }

  public TPointDouble(point_t r) {
    this(IdaJavaJNI.new_TPointDouble__SWIG_2(point_t.getCPtr(r), r), true);
  }

  public void add(TPointDouble r) {
    IdaJavaJNI.TPointDouble_add(swigCPtr, this, TPointDouble.getCPtr(r), r);
  }

  public void sub(TPointDouble r) {
    IdaJavaJNI.TPointDouble_sub(swigCPtr, this, TPointDouble.getCPtr(r), r);
  }

  public void negate() {
    IdaJavaJNI.TPointDouble_negate(swigCPtr, this);
  }

  public boolean __eq__(TPointDouble r) {
    return IdaJavaJNI.TPointDouble___eq__(swigCPtr, this, TPointDouble.getCPtr(r), r);
  }

  public boolean __ne__(TPointDouble r) {
    return IdaJavaJNI.TPointDouble___ne__(swigCPtr, this, TPointDouble.getCPtr(r), r);
  }

}
