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

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

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

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

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

  public void setNseg(int value) {
    IdaJavaJNI.edge_segment_t_nseg_set(swigCPtr, this, value);
  }

  public int getNseg() {
    return IdaJavaJNI.edge_segment_t_nseg_get(swigCPtr, this);
  }

  public void setX0(int value) {
    IdaJavaJNI.edge_segment_t_x0_set(swigCPtr, this, value);
  }

  public int getX0() {
    return IdaJavaJNI.edge_segment_t_x0_get(swigCPtr, this);
  }

  public void setX1(int value) {
    IdaJavaJNI.edge_segment_t_x1_set(swigCPtr, this, value);
  }

  public int getX1() {
    return IdaJavaJNI.edge_segment_t_x1_get(swigCPtr, this);
  }

  public long length() {
    return IdaJavaJNI.edge_segment_t_length(swigCPtr, this);
  }

  public boolean toright() {
    return IdaJavaJNI.edge_segment_t_toright(swigCPtr, this);
  }

  public boolean __lt__(edge_segment_t r) {
    return IdaJavaJNI.edge_segment_t___lt__(swigCPtr, this, edge_segment_t.getCPtr(r), r);
  }

  public edge_segment_t() {
    this(IdaJavaJNI.new_edge_segment_t(), true);
  }

}
