/* ----------------------------------------------------------------------------
 * 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 point_t {
  private long swigCPtr;
  protected boolean swigCMemOwn;

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

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

  protected void finalize() {
    delete();
  }

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

  public void setX(int value) {
    IdaJavaJNI.point_t_x_set(swigCPtr, this, value);
  }

  public int getX() {
    return IdaJavaJNI.point_t_x_get(swigCPtr, this);
  }

  public void setY(int value) {
    IdaJavaJNI.point_t_y_set(swigCPtr, this, value);
  }

  public int getY() {
    return IdaJavaJNI.point_t_y_get(swigCPtr, this);
  }

  public point_t() {
    this(IdaJavaJNI.new_point_t__SWIG_0(), true);
  }

  public point_t(int _x, int _y) {
    this(IdaJavaJNI.new_point_t__SWIG_1(_x, _y), true);
  }

  public point_t add(point_t r) {
    return new point_t(IdaJavaJNI.point_t_add(swigCPtr, this, point_t.getCPtr(r), r), false);
  }

  public point_t sub(point_t r) {
    return new point_t(IdaJavaJNI.point_t_sub(swigCPtr, this, point_t.getCPtr(r), r), false);
  }

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

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

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

}
