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

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

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

  public void setEa(long value) {
    IdaJavaJNI.ea_name_t_ea_set(swigCPtr, this, value);
  }

  public long getEa() {
    return IdaJavaJNI.ea_name_t_ea_get(swigCPtr, this);
  }

  public void setName(SWIGTYPE_p__qstringT_char_t value) {
    IdaJavaJNI.ea_name_t_name_set(swigCPtr, this, SWIGTYPE_p__qstringT_char_t.getCPtr(value));
  }

  public SWIGTYPE_p__qstringT_char_t getName() {
    long cPtr = IdaJavaJNI.ea_name_t_name_get(swigCPtr, this);
    return (cPtr == 0) ? null : new SWIGTYPE_p__qstringT_char_t(cPtr, false);
  }

  public ea_name_t(long _ea, SWIGTYPE_p__qstringT_char_t _name) {
    this(IdaJavaJNI.new_ea_name_t(_ea, SWIGTYPE_p__qstringT_char_t.getCPtr(_name)), true);
  }

}
