/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.28
 *
 * Do not make changes to this file unless you know what you are doing--modify
 * the SWIG interface file instead.
 * ----------------------------------------------------------------------------- */

package org.gdal.ogr;

public class FieldDefn {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  protected FieldDefn(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  protected static long getCPtr(FieldDefn obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public void delete() {
    if(swigCPtr != 0 && swigCMemOwn) {
      swigCMemOwn = false;
      ogrJNI.delete_FieldDefn(swigCPtr);
    }
    swigCPtr = 0;
  }

  protected static long getCPtrAndDisown(FieldDefn obj) {
    if (obj != null) obj.swigCMemOwn= false;
    return getCPtr(obj);
  }

  public FieldDefn(String name, int field_type) {
    this(ogrJNI.new_FieldDefn(name, field_type), true);
  }

  public String GetName() {
    return ogrJNI.FieldDefn_GetName(swigCPtr);
  }

  public String GetNameRef() {
    return ogrJNI.FieldDefn_GetNameRef(swigCPtr);
  }

  public void SetName(String name) {
    ogrJNI.FieldDefn_SetName(swigCPtr, name);
  }

  public int GetFieldType() {
    return ogrJNI.FieldDefn_GetFieldType(swigCPtr);
  }

  public void SetType(int type) {
    ogrJNI.FieldDefn_SetType(swigCPtr, type);
  }

  public int GetJustify() {
    return ogrJNI.FieldDefn_GetJustify(swigCPtr);
  }

  public void SetJustify(int justify) {
    ogrJNI.FieldDefn_SetJustify(swigCPtr, justify);
  }

  public int GetWidth() {
    return ogrJNI.FieldDefn_GetWidth(swigCPtr);
  }

  public void SetWidth(int width) {
    ogrJNI.FieldDefn_SetWidth(swigCPtr, width);
  }

  public int GetPrecision() {
    return ogrJNI.FieldDefn_GetPrecision(swigCPtr);
  }

  public void SetPrecision(int precision) {
    ogrJNI.FieldDefn_SetPrecision(swigCPtr, precision);
  }

  public String GetFieldTypeName(int type) {
    return ogrJNI.FieldDefn_GetFieldTypeName(swigCPtr, type);
  }

}
