"Fossies" - the Fresh Open Source Software Archive

Member "xapian-bindings-1.4.14/csharp/generated-csharp/Document.cs" (23 Nov 2019, 7944 Bytes) of package /linux/www/xapian-bindings-1.4.14.tar.xz:


As a special service "Fossies" has tried to format the requested source page into HTML format using (guessed) C# source code syntax highlighting (style: standard) with prefixed line numbers and code folding option. Alternatively you can here view or download the uninterpreted source code file.

    1 //------------------------------------------------------------------------------
    2 // <auto-generated />
    3 //
    4 // This file was automatically generated by SWIG (http://www.swig.org).
    5 // Version 3.0.13
    6 //
    7 // Do not make changes to this file unless you know what you are doing--modify
    8 // the SWIG interface file instead.
    9 //------------------------------------------------------------------------------
   10 
   11 namespace Xapian {
   12 
   13 public class Document : global::System.IDisposable {
   14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
   15   protected bool swigCMemOwn;
   16 
   17   internal Document(global::System.IntPtr cPtr, bool cMemoryOwn) {
   18     swigCMemOwn = cMemoryOwn;
   19     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
   20   }
   21 
   22   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Document obj) {
   23     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
   24   }
   25 
   26   ~Document() {
   27     Dispose();
   28   }
   29 
   30   public virtual void Dispose() {
   31     lock(this) {
   32       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
   33         if (swigCMemOwn) {
   34           swigCMemOwn = false;
   35           XapianPINVOKE.delete_Document(swigCPtr);
   36         }
   37         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
   38       }
   39       global::System.GC.SuppressFinalize(this);
   40     }
   41   }
   42 
   43   public Document() : this(XapianPINVOKE.new_Document(), true) {
   44     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
   45   }
   46 
   47   public string GetValue(uint slot) {
   48     string ret = XapianPINVOKE.Document_GetValue(swigCPtr, slot);
   49     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
   50     return ret;
   51   }
   52 
   53   public void AddValue(uint slot, string value) {
   54     XapianPINVOKE.Document_AddValue(swigCPtr, slot, value);
   55     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
   56   }
   57 
   58   public void RemoveValue(uint slot) {
   59     XapianPINVOKE.Document_RemoveValue(swigCPtr, slot);
   60     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
   61   }
   62 
   63   public void ClearValues() {
   64     XapianPINVOKE.Document_ClearValues(swigCPtr);
   65     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
   66   }
   67 
   68   public string GetData() {
   69     string ret = XapianPINVOKE.Document_GetData(swigCPtr);
   70     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
   71     return ret;
   72   }
   73 
   74   public void SetData(string data) {
   75     XapianPINVOKE.Document_SetData(swigCPtr, data);
   76     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
   77   }
   78 
   79   public void AddPosting(string tname, uint tpos, uint wdfinc) {
   80     XapianPINVOKE.Document_AddPosting__SWIG_0(swigCPtr, tname, tpos, wdfinc);
   81     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
   82   }
   83 
   84   public void AddPosting(string tname, uint tpos) {
   85     XapianPINVOKE.Document_AddPosting__SWIG_1(swigCPtr, tname, tpos);
   86     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
   87   }
   88 
   89   public void AddTerm(string tname, uint wdfinc) {
   90     XapianPINVOKE.Document_AddTerm__SWIG_0(swigCPtr, tname, wdfinc);
   91     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
   92   }
   93 
   94   public void AddTerm(string tname) {
   95     XapianPINVOKE.Document_AddTerm__SWIG_1(swigCPtr, tname);
   96     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
   97   }
   98 
   99   public void AddBooleanTerm(string term) {
  100     XapianPINVOKE.Document_AddBooleanTerm(swigCPtr, term);
  101     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  102   }
  103 
  104   public void RemovePosting(string tname, uint tpos, uint wdfdec) {
  105     XapianPINVOKE.Document_RemovePosting__SWIG_0(swigCPtr, tname, tpos, wdfdec);
  106     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  107   }
  108 
  109   public void RemovePosting(string tname, uint tpos) {
  110     XapianPINVOKE.Document_RemovePosting__SWIG_1(swigCPtr, tname, tpos);
  111     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  112   }
  113 
  114   public uint RemovePostings(string term, uint term_pos_first, uint term_pos_last, uint wdf_dec) {
  115     uint ret = XapianPINVOKE.Document_RemovePostings__SWIG_0(swigCPtr, term, term_pos_first, term_pos_last, wdf_dec);
  116     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  117     return ret;
  118   }
  119 
  120   public uint RemovePostings(string term, uint term_pos_first, uint term_pos_last) {
  121     uint ret = XapianPINVOKE.Document_RemovePostings__SWIG_1(swigCPtr, term, term_pos_first, term_pos_last);
  122     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  123     return ret;
  124   }
  125 
  126   public void RemoveTerm(string tname) {
  127     XapianPINVOKE.Document_RemoveTerm(swigCPtr, tname);
  128     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  129   }
  130 
  131   public void ClearTerms() {
  132     XapianPINVOKE.Document_ClearTerms(swigCPtr);
  133     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  134   }
  135 
  136   public uint TermListCount() {
  137     uint ret = XapianPINVOKE.Document_TermListCount(swigCPtr);
  138     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  139     return ret;
  140   }
  141 
  142   public TermIterator TermListBegin() {
  143     TermIterator ret = new TermIterator(XapianPINVOKE.Document_TermListBegin(swigCPtr), true);
  144     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  145     return ret;
  146   }
  147 
  148   public TermIterator TermListEnd() {
  149     TermIterator ret = new TermIterator(XapianPINVOKE.Document_TermListEnd(swigCPtr), true);
  150     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  151     return ret;
  152   }
  153 
  154   public uint ValuesCount() {
  155     uint ret = XapianPINVOKE.Document_ValuesCount(swigCPtr);
  156     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  157     return ret;
  158   }
  159 
  160   public ValueIterator ValuesBegin() {
  161     ValueIterator ret = new ValueIterator(XapianPINVOKE.Document_ValuesBegin(swigCPtr), true);
  162     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  163     return ret;
  164   }
  165 
  166   public ValueIterator ValuesEnd() {
  167     ValueIterator ret = new ValueIterator(XapianPINVOKE.Document_ValuesEnd(swigCPtr), true);
  168     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  169     return ret;
  170   }
  171 
  172   public uint GetDocId() {
  173     uint ret = XapianPINVOKE.Document_GetDocId(swigCPtr);
  174     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  175     return ret;
  176   }
  177 
  178   public string Serialise() {
  179     string ret = XapianPINVOKE.Document_Serialise(swigCPtr);
  180     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  181     return ret;
  182   }
  183 
  184   public static Document Unserialise(string serialised) {
  185     Document ret = new Document(XapianPINVOKE.Document_Unserialise(serialised), true);
  186     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  187     return ret;
  188   }
  189 
  190   public string GetDescription() {
  191     string ret = XapianPINVOKE.Document_GetDescription(swigCPtr);
  192     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
  193     return ret;
  194   }
  195 
  196 }
  197 
  198 }