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

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

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

  public void setType(graph_item_type_t value) {
    IdaJavaJNI.graph_item_t_type_set(swigCPtr, this, value.swigValue());
  }

  public graph_item_type_t getType() {
    return graph_item_type_t.swigToEnum(IdaJavaJNI.graph_item_t_type_get(swigCPtr, this));
  }

  public void setE(edge_t value) {
    IdaJavaJNI.graph_item_t_e_set(swigCPtr, this, edge_t.getCPtr(value), value);
  }

  public edge_t getE() {
    long cPtr = IdaJavaJNI.graph_item_t_e_get(swigCPtr, this);
    return (cPtr == 0) ? null : new edge_t(cPtr, false);
  }

  public void setN(int value) {
    IdaJavaJNI.graph_item_t_n_set(swigCPtr, this, value);
  }

  public int getN() {
    return IdaJavaJNI.graph_item_t_n_get(swigCPtr, this);
  }

  public void setB(int value) {
    IdaJavaJNI.graph_item_t_b_set(swigCPtr, this, value);
  }

  public int getB() {
    return IdaJavaJNI.graph_item_t_b_get(swigCPtr, this);
  }

  public void setP(point_t value) {
    IdaJavaJNI.graph_item_t_p_set(swigCPtr, this, point_t.getCPtr(value), value);
  }

  public point_t getP() {
    long cPtr = IdaJavaJNI.graph_item_t_p_get(swigCPtr, this);
    return (cPtr == 0) ? null : new point_t(cPtr, false);
  }

  public void setElp(edge_layout_point_t value) {
    IdaJavaJNI.graph_item_t_elp_set(swigCPtr, this, edge_layout_point_t.getCPtr(value), value);
  }

  public edge_layout_point_t getElp() {
    long cPtr = IdaJavaJNI.graph_item_t_elp_get(swigCPtr, this);
    return (cPtr == 0) ? null : new edge_layout_point_t(cPtr, false);
  }

  public boolean is_node() {
    return IdaJavaJNI.graph_item_t_is_node(swigCPtr, this);
  }

  public boolean is_edge() {
    return IdaJavaJNI.graph_item_t_is_edge(swigCPtr, this);
  }

  public graph_item_t() {
    this(IdaJavaJNI.new_graph_item_t(), true);
  }

}
