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

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

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

  public void setId(long value) {
    IdaJavaJNI.struc_t_id_set(swigCPtr, this, value);
  }

  public long getId() {
    return IdaJavaJNI.struc_t_id_get(swigCPtr, this);
  }

  public void setMemqty(long value) {
    IdaJavaJNI.struc_t_memqty_set(swigCPtr, this, value);
  }

  public long getMemqty() {
    return IdaJavaJNI.struc_t_memqty_get(swigCPtr, this);
  }

  public void setMembers(member_t value) {
    IdaJavaJNI.struc_t_members_set(swigCPtr, this, member_t.getCPtr(value), value);
  }

  public member_t getMembers() {
    long cPtr = IdaJavaJNI.struc_t_members_get(swigCPtr, this);
    return (cPtr == 0) ? null : new member_t(cPtr, false);
  }

  public void setAge(int value) {
    IdaJavaJNI.struc_t_age_set(swigCPtr, this, value);
  }

  public int getAge() {
    return IdaJavaJNI.struc_t_age_get(swigCPtr, this);
  }

  public void setProps(long value) {
    IdaJavaJNI.struc_t_props_set(swigCPtr, this, value);
  }

  public long getProps() {
    return IdaJavaJNI.struc_t_props_get(swigCPtr, this);
  }

  public boolean is_varstr() {
    return IdaJavaJNI.struc_t_is_varstr(swigCPtr, this);
  }

  public boolean is_union() {
    return IdaJavaJNI.struc_t_is_union(swigCPtr, this);
  }

  public boolean has_union() {
    return IdaJavaJNI.struc_t_has_union(swigCPtr, this);
  }

  public boolean is_choosable() {
    return IdaJavaJNI.struc_t_is_choosable(swigCPtr, this);
  }

  public boolean from_til() {
    return IdaJavaJNI.struc_t_from_til(swigCPtr, this);
  }

  public boolean is_hidden() {
    return IdaJavaJNI.struc_t_is_hidden(swigCPtr, this);
  }

  public void setOrdinal(int value) {
    IdaJavaJNI.struc_t_ordinal_set(swigCPtr, this, value);
  }

  public int getOrdinal() {
    return IdaJavaJNI.struc_t_ordinal_get(swigCPtr, this);
  }

  public member_t get_member(int index) {
    long cPtr = IdaJavaJNI.struc_t_get_member(swigCPtr, this, index);
    return (cPtr == 0) ? null : new member_t(cPtr, false);
  }

  public struc_t() {
    this(IdaJavaJNI.new_struc_t(), true);
  }

}
