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

namespace clucene.net {

using System;
using System.Runtime.InteropServices;

public class HitDoc : IDisposable {
  private HandleRef swigCPtr;
  protected bool swigCMemOwn;

  internal HitDoc(IntPtr cPtr, bool cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = new HandleRef(this, cPtr);
  }

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

  ~HitDoc() {
    Dispose();
  }

  public virtual void Dispose() {
    if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) {
      swigCMemOwn = false;
      libCLcsharpPINVOKE.delete_HitDoc(swigCPtr);
    }
    swigCPtr = new HandleRef(null, IntPtr.Zero);
    GC.SuppressFinalize(this);
  }

  public float score {
    set {
      libCLcsharpPINVOKE.set_HitDoc_score(swigCPtr, value);
      if (libCLcsharpPINVOKE.SWIGPendingException.Pending) throw libCLcsharpPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      double ret = libCLcsharpPINVOKE.get_HitDoc_score(swigCPtr);
      if (libCLcsharpPINVOKE.SWIGPendingException.Pending) throw libCLcsharpPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public int id {
    set {
      libCLcsharpPINVOKE.set_HitDoc_id(swigCPtr, value);
      if (libCLcsharpPINVOKE.SWIGPendingException.Pending) throw libCLcsharpPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      int ret = libCLcsharpPINVOKE.get_HitDoc_id(swigCPtr);
      if (libCLcsharpPINVOKE.SWIGPendingException.Pending) throw libCLcsharpPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public Document doc {
    set {
      libCLcsharpPINVOKE.set_HitDoc_doc(swigCPtr, Document.getCPtr(value));
      if (libCLcsharpPINVOKE.SWIGPendingException.Pending) throw libCLcsharpPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      IntPtr cPtr = libCLcsharpPINVOKE.get_HitDoc_doc(swigCPtr);
      Document ret = (cPtr == IntPtr.Zero) ? null : new Document(cPtr, false);
      if (libCLcsharpPINVOKE.SWIGPendingException.Pending) throw libCLcsharpPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public HitDoc next {
    set {
      libCLcsharpPINVOKE.set_HitDoc_next(swigCPtr, HitDoc.getCPtr(value));
      if (libCLcsharpPINVOKE.SWIGPendingException.Pending) throw libCLcsharpPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      IntPtr cPtr = libCLcsharpPINVOKE.get_HitDoc_next(swigCPtr);
      HitDoc ret = (cPtr == IntPtr.Zero) ? null : new HitDoc(cPtr, false);
      if (libCLcsharpPINVOKE.SWIGPendingException.Pending) throw libCLcsharpPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public HitDoc prev {
    set {
      libCLcsharpPINVOKE.set_HitDoc_prev(swigCPtr, HitDoc.getCPtr(value));
      if (libCLcsharpPINVOKE.SWIGPendingException.Pending) throw libCLcsharpPINVOKE.SWIGPendingException.Retrieve();
    } 
    get {
      IntPtr cPtr = libCLcsharpPINVOKE.get_HitDoc_prev(swigCPtr);
      HitDoc ret = (cPtr == IntPtr.Zero) ? null : new HitDoc(cPtr, false);
      if (libCLcsharpPINVOKE.SWIGPendingException.Pending) throw libCLcsharpPINVOKE.SWIGPendingException.Retrieve();
      return ret;
    } 
  }

  public HitDoc(float s, int i) : this(libCLcsharpPINVOKE.new_HitDoc(s, i), true) {
    if (libCLcsharpPINVOKE.SWIGPendingException.Pending) throw libCLcsharpPINVOKE.SWIGPendingException.Retrieve();
  }

}

}
