Logo Search packages:      
Sourcecode: xapian-bindings version File versions  Download package

Enquire.cs

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

namespace Xapian {

using System;
using System.Runtime.InteropServices;

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

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

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

  ~Enquire() {
    Dispose();
  }

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

  public Enquire(Database databases) : this(XapianPINVOKE.new_Enquire(Database.getCPtr(databases)), true) {
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetQuery(Query query, uint qlen) {
    XapianPINVOKE.Enquire_SetQuery__SWIG_0(swigCPtr, Query.getCPtr(query), qlen);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetQuery(Query query) {
    XapianPINVOKE.Enquire_SetQuery__SWIG_1(swigCPtr, Query.getCPtr(query));
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public Query GetQuery() {
    Query ret = new Query(XapianPINVOKE.Enquire_GetQuery(swigCPtr), false);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public void SetWeightingScheme(Weight weight) {
    XapianPINVOKE.Enquire_SetWeightingScheme(swigCPtr, Weight.getCPtr(weight));
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetCollapseKey(uint collapse_key) {
    XapianPINVOKE.Enquire_SetCollapseKey(swigCPtr, collapse_key);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetDocidOrder(Enquire.docid_order order) {
    XapianPINVOKE.Enquire_SetDocidOrder(swigCPtr, (int)order);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetSortForward(bool sort_forward) {
    XapianPINVOKE.Enquire_SetSortForward(swigCPtr, sort_forward);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetCutoff(int percent_cutoff, double weight_cutoff) {
    XapianPINVOKE.Enquire_SetCutoff__SWIG_0(swigCPtr, percent_cutoff, weight_cutoff);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetCutoff(int percent_cutoff) {
    XapianPINVOKE.Enquire_SetCutoff__SWIG_1(swigCPtr, percent_cutoff);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetSorting(uint sort_key, int sort_bands, bool sort_by_relevance) {
    XapianPINVOKE.Enquire_SetSorting__SWIG_0(swigCPtr, sort_key, sort_bands, sort_by_relevance);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetSorting(uint sort_key, int sort_bands) {
    XapianPINVOKE.Enquire_SetSorting__SWIG_1(swigCPtr, sort_key, sort_bands);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetSortByRelevance() {
    XapianPINVOKE.Enquire_SetSortByRelevance(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetSortByValue(uint sort_key, bool ascending) {
    XapianPINVOKE.Enquire_SetSortByValue__SWIG_0(swigCPtr, sort_key, ascending);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetSortByValue(uint sort_key) {
    XapianPINVOKE.Enquire_SetSortByValue__SWIG_1(swigCPtr, sort_key);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetSortByValueThenRelevance(uint sort_key, bool ascending) {
    XapianPINVOKE.Enquire_SetSortByValueThenRelevance__SWIG_0(swigCPtr, sort_key, ascending);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetSortByValueThenRelevance(uint sort_key) {
    XapianPINVOKE.Enquire_SetSortByValueThenRelevance__SWIG_1(swigCPtr, sort_key);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetSortByRelevanceThenValue(uint sort_key, bool ascending) {
    XapianPINVOKE.Enquire_SetSortByRelevanceThenValue__SWIG_0(swigCPtr, sort_key, ascending);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetSortByRelevanceThenValue(uint sort_key) {
    XapianPINVOKE.Enquire_SetSortByRelevanceThenValue__SWIG_1(swigCPtr, sort_key);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void SetBias(double bias_weight, SWIGTYPE_p_time_t bias_halflife) {
    XapianPINVOKE.Enquire_SetBias(swigCPtr, bias_weight, SWIGTYPE_p_time_t.getCPtr(bias_halflife));
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public MSet GetMSet(uint first, uint maxitems, uint checkatleast, RSet omrset, MatchDecider mdecider) {
    MSet ret = new MSet(XapianPINVOKE.Enquire_GetMSet__SWIG_0(swigCPtr, first, maxitems, checkatleast, RSet.getCPtr(omrset), MatchDecider.getCPtr(mdecider)), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MSet GetMSet(uint first, uint maxitems, uint checkatleast, RSet omrset) {
    MSet ret = new MSet(XapianPINVOKE.Enquire_GetMSet__SWIG_1(swigCPtr, first, maxitems, checkatleast, RSet.getCPtr(omrset)), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MSet GetMSet(uint first, uint maxitems, uint checkatleast) {
    MSet ret = new MSet(XapianPINVOKE.Enquire_GetMSet__SWIG_2(swigCPtr, first, maxitems, checkatleast), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MSet GetMSet(uint first, uint maxitems) {
    MSet ret = new MSet(XapianPINVOKE.Enquire_GetMSet__SWIG_3(swigCPtr, first, maxitems), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MSet GetMSet(uint first, uint maxitems, RSet omrset, MatchDecider mdecider) {
    MSet ret = new MSet(XapianPINVOKE.Enquire_GetMSet__SWIG_4(swigCPtr, first, maxitems, RSet.getCPtr(omrset), MatchDecider.getCPtr(mdecider)), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public MSet GetMSet(uint first, uint maxitems, RSet omrset) {
    MSet ret = new MSet(XapianPINVOKE.Enquire_GetMSet__SWIG_5(swigCPtr, first, maxitems, RSet.getCPtr(omrset)), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public ESet GetESet(uint maxitems, RSet omrset, int flags, double k, SWIGTYPE_p_Xapian__ExpandDecider edecider) {
    ESet ret = new ESet(XapianPINVOKE.Enquire_GetESet__SWIG_0(swigCPtr, maxitems, RSet.getCPtr(omrset), flags, k, SWIGTYPE_p_Xapian__ExpandDecider.getCPtr(edecider)), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public ESet GetESet(uint maxitems, RSet omrset, int flags, double k) {
    ESet ret = new ESet(XapianPINVOKE.Enquire_GetESet__SWIG_1(swigCPtr, maxitems, RSet.getCPtr(omrset), flags, k), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public ESet GetESet(uint maxitems, RSet omrset, int flags) {
    ESet ret = new ESet(XapianPINVOKE.Enquire_GetESet__SWIG_2(swigCPtr, maxitems, RSet.getCPtr(omrset), flags), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public ESet GetESet(uint maxitems, RSet omrset) {
    ESet ret = new ESet(XapianPINVOKE.Enquire_GetESet__SWIG_3(swigCPtr, maxitems, RSet.getCPtr(omrset)), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator GetMatchingTermsBegin(uint did) {
    TermIterator ret = new TermIterator(XapianPINVOKE.Enquire_GetMatchingTermsBegin__SWIG_0(swigCPtr, did), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator GetMatchingTermsEnd(uint did) {
    TermIterator ret = new TermIterator(XapianPINVOKE.Enquire_GetMatchingTermsEnd__SWIG_0(swigCPtr, did), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator GetMatchingTermsBegin(MSetIterator i) {
    TermIterator ret = new TermIterator(XapianPINVOKE.Enquire_GetMatchingTermsBegin__SWIG_1(swigCPtr, MSetIterator.getCPtr(i)), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public TermIterator GetMatchingTermsEnd(MSetIterator i) {
    TermIterator ret = new TermIterator(XapianPINVOKE.Enquire_GetMatchingTermsEnd__SWIG_1(swigCPtr, MSetIterator.getCPtr(i)), true);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public void RegisterMatchDecider(string name, MatchDecider mdecider) {
    XapianPINVOKE.Enquire_RegisterMatchDecider__SWIG_0(swigCPtr, name, MatchDecider.getCPtr(mdecider));
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public void RegisterMatchDecider(string name) {
    XapianPINVOKE.Enquire_RegisterMatchDecider__SWIG_1(swigCPtr, name);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  }

  public string GetDescription() {
    string ret = XapianPINVOKE.Enquire_GetDescription(swigCPtr);
    if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
    return ret;
  }

  public enum docid_order {
    ASCENDING = 1,
    DESCENDING = 0,
    DONT_CARE = 2
  }

}

}

Generated by  Doxygen 1.6.0   Back to index