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

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

  public static long getCPtr(areaset_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_areaset_t(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public areaset_t() {
    this(IdaJavaJNI.new_areaset_t__SWIG_0(), true);
  }

  public areaset_t(area_t area) {
    this(IdaJavaJNI.new_areaset_t__SWIG_1(area_t.getCPtr(area), area), true);
  }

  public areaset_t(areaset_t ivs) {
    this(IdaJavaJNI.new_areaset_t__SWIG_2(areaset_t.getCPtr(ivs), ivs), true);
  }

  public void swap(areaset_t r) {
    IdaJavaJNI.areaset_t_swap(swigCPtr, this, areaset_t.getCPtr(r), r);
  }

  public boolean add(area_t area) {
    return IdaJavaJNI.areaset_t_add__SWIG_0(swigCPtr, this, area_t.getCPtr(area), area);
  }

  public boolean add(long start, long end) {
    return IdaJavaJNI.areaset_t_add__SWIG_1(swigCPtr, this, start, end);
  }

  public boolean add(areaset_t aset) {
    return IdaJavaJNI.areaset_t_add__SWIG_2(swigCPtr, this, areaset_t.getCPtr(aset), aset);
  }

  public boolean sub(long ea) {
    return IdaJavaJNI.areaset_t_sub__SWIG_0(swigCPtr, this, ea);
  }

  public boolean sub(area_t area) {
    return IdaJavaJNI.areaset_t_sub__SWIG_1(swigCPtr, this, area_t.getCPtr(area), area);
  }

  public boolean sub(areaset_t aset) {
    return IdaJavaJNI.areaset_t_sub__SWIG_2(swigCPtr, this, areaset_t.getCPtr(aset), aset);
  }

  public boolean has_common(area_t area, boolean strict) {
    return IdaJavaJNI.areaset_t_has_common__SWIG_0(swigCPtr, this, area_t.getCPtr(area), area, strict);
  }

  public boolean has_common(area_t area) {
    return IdaJavaJNI.areaset_t_has_common__SWIG_1(swigCPtr, this, area_t.getCPtr(area), area);
  }

  public long print(String buf, long bufsize) {
    return IdaJavaJNI.areaset_t_print(swigCPtr, this, buf, bufsize);
  }

  public area_t getarea(int idx) {
    return new area_t(IdaJavaJNI.areaset_t_getarea(swigCPtr, this, idx), false);
  }

  public area_t lastarea() {
    return new area_t(IdaJavaJNI.areaset_t_lastarea(swigCPtr, this), false);
  }

  public long nareas() {
    return IdaJavaJNI.areaset_t_nareas(swigCPtr, this);
  }

  public boolean empty() {
    return IdaJavaJNI.areaset_t_empty(swigCPtr, this);
  }

  public void clear() {
    IdaJavaJNI.areaset_t_clear(swigCPtr, this);
  }

  public boolean has_common(areaset_t aset) {
    return IdaJavaJNI.areaset_t_has_common__SWIG_2(swigCPtr, this, areaset_t.getCPtr(aset), aset);
  }

  public boolean contains(long ea) {
    return IdaJavaJNI.areaset_t_contains__SWIG_0(swigCPtr, this, ea);
  }

  public boolean contains(areaset_t aset) {
    return IdaJavaJNI.areaset_t_contains__SWIG_1(swigCPtr, this, areaset_t.getCPtr(aset), aset);
  }

  public boolean intersect(areaset_t aset) {
    return IdaJavaJNI.areaset_t_intersect(swigCPtr, this, areaset_t.getCPtr(aset), aset);
  }

  public boolean is_subset_of(areaset_t aset) {
    return IdaJavaJNI.areaset_t_is_subset_of(swigCPtr, this, areaset_t.getCPtr(aset), aset);
  }

  public boolean is_equal(areaset_t aset) {
    return IdaJavaJNI.areaset_t_is_equal(swigCPtr, this, areaset_t.getCPtr(aset), aset);
  }

  public boolean __eq__(areaset_t aset) {
    return IdaJavaJNI.areaset_t___eq__(swigCPtr, this, areaset_t.getCPtr(aset), aset);
  }

  public boolean __ne__(areaset_t aset) {
    return IdaJavaJNI.areaset_t___ne__(swigCPtr, this, areaset_t.getCPtr(aset), aset);
  }

  public area_t begin() {
    long cPtr = IdaJavaJNI.areaset_t_begin__SWIG_0(swigCPtr, this);
    return (cPtr == 0) ? null : new area_t(cPtr, false);
  }

  public area_t end() {
    long cPtr = IdaJavaJNI.areaset_t_end__SWIG_0(swigCPtr, this);
    return (cPtr == 0) ? null : new area_t(cPtr, false);
  }

  public area_t find_area(long ea) {
    long cPtr = IdaJavaJNI.areaset_t_find_area(swigCPtr, this, ea);
    return (cPtr == 0) ? null : new area_t(cPtr, false);
  }

  public area_t cached_area() {
    long cPtr = IdaJavaJNI.areaset_t_cached_area(swigCPtr, this);
    return (cPtr == 0) ? null : new area_t(cPtr, false);
  }

  public long next_addr(long ea) {
    return IdaJavaJNI.areaset_t_next_addr(swigCPtr, this, ea);
  }

  public long prev_addr(long ea) {
    return IdaJavaJNI.areaset_t_prev_addr(swigCPtr, this, ea);
  }

  public long next_area(long ea) {
    return IdaJavaJNI.areaset_t_next_area(swigCPtr, this, ea);
  }

  public long prev_area(long ea) {
    return IdaJavaJNI.areaset_t_prev_area(swigCPtr, this, ea);
  }

}
