/* ----------------------------------------------------------------------------
 * 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 segreg_t extends area_t {
  private long swigCPtr;

  public segreg_t(long cPtr, boolean cMemoryOwn) {
    super(IdaJavaJNI.segreg_t_SWIGUpcast(cPtr), cMemoryOwn);
    swigCPtr = cPtr;
  }

  public static long getCPtr(segreg_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_segreg_t(swigCPtr);
      }
      swigCPtr = 0;
    }
    super.delete();
  }

  public SWIGTYPE_p_unsigned_int reg(int n) {
    return new SWIGTYPE_p_unsigned_int(IdaJavaJNI.segreg_t_reg__SWIG_0(swigCPtr, this, n), false);
  }

  public SWIGTYPE_p_unsigned_char tag(int n) {
    return new SWIGTYPE_p_unsigned_char(IdaJavaJNI.segreg_t_tag__SWIG_0(swigCPtr, this, n), false);
  }

  public void undefregs() {
    IdaJavaJNI.segreg_t_undefregs(swigCPtr, this);
  }

  public void setregs(long[] Regs) {
    IdaJavaJNI.segreg_t_setregs(swigCPtr, this, Regs);
  }

  public void settags(short v) {
    IdaJavaJNI.segreg_t_settags(swigCPtr, this, v);
  }

  public segreg_t() {
    this(IdaJavaJNI.new_segreg_t(), true);
  }

}
