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

namespace LizardTech.LidarSDK {

using System;
using System.Runtime.InteropServices;

public class TXTPointReader : PointReader {
  private HandleRef swigCPtr;

  public TXTPointReader(IntPtr cPtr, bool cMemoryOwn) : base(LidarDSDKPINVOKE.TXTPointReader_SWIGUpcast(cPtr), cMemoryOwn) {
    swigCPtr = new HandleRef(this, cPtr);
  }

  public static HandleRef getCPtr(TXTPointReader obj) {
    return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
  }

  ~TXTPointReader() {
    Dispose();
  }

  public override void Dispose() {
    lock(this) {
      if (swigCPtr.Handle != IntPtr.Zero) {
        if (swigCMemOwn) {
          swigCMemOwn = false;
          LidarDSDKPINVOKE.delete_TXTPointReader(swigCPtr);
        }
        swigCPtr = new HandleRef(null, IntPtr.Zero);
      }
      GC.SuppressFinalize(this);
      base.Dispose();
    }
  }

  public void init(string path, string format, uint header, bool doFullInit) {
    LidarDSDKPINVOKE.TXTPointReader_init__SWIG_0(swigCPtr, path, format, header, doFullInit);
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

  public void init(IO io, string format, uint header, bool doFullInit) {
    LidarDSDKPINVOKE.TXTPointReader_init__SWIG_1(swigCPtr, IO.getCPtr(io), format, header, doFullInit);
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

  public void init(string path, PointInfo fieldInfo, uint header, bool doFullInit) {
    LidarDSDKPINVOKE.TXTPointReader_init__SWIG_2(swigCPtr, path, PointInfo.getCPtr(fieldInfo), header, doFullInit);
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

  public void init(IO io, PointInfo fieldInfo, uint header, bool doFullInit) {
    LidarDSDKPINVOKE.TXTPointReader_init__SWIG_3(swigCPtr, IO.getCPtr(io), PointInfo.getCPtr(fieldInfo), header, doFullInit);
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

  public void initBoundsAndNumPoints() {
    LidarDSDKPINVOKE.TXTPointReader_initBoundsAndNumPoints(swigCPtr);
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

  public static void parseFormat(string format, PointInfo fieldInfo) {
    LidarDSDKPINVOKE.TXTPointReader_parseFormat__SWIG_0(format, PointInfo.getCPtr(fieldInfo));
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

  public static void parseFormat(string format, PointInfo fieldInfo, PointInfo pointInfo) {
    LidarDSDKPINVOKE.TXTPointReader_parseFormat__SWIG_1(format, PointInfo.getCPtr(fieldInfo), PointInfo.getCPtr(pointInfo));
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

  public static void parseQuantization(string format, PointInfo fieldInfo) {
    LidarDSDKPINVOKE.TXTPointReader_parseQuantization(format, PointInfo.getCPtr(fieldInfo));
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

  public TXTPointReader() : this(LidarDSDKPINVOKE.new_TXTPointReader(), true) {
    if (LidarDSDKPINVOKE.SWIGPendingException.Pending) throw LidarDSDKPINVOKE.SWIGPendingException.Retrieve();
  }

}

}
