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 Stem : global::System.IDisposable {
14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15   protected bool swigCMemOwn;
16 
Stem(global::System.IntPtr cPtr, bool cMemoryOwn)17   internal Stem(global::System.IntPtr cPtr, bool cMemoryOwn) {
18     swigCMemOwn = cMemoryOwn;
19     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
20   }
21 
getCPtr(Stem obj)22   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Stem obj) {
23     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
24   }
25 
~Stem()26   ~Stem() {
27     Dispose();
28   }
29 
Dispose()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_Stem(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 
Stem(string language)43   public Stem(string language) : this(XapianPINVOKE.new_Stem__SWIG_0(language), true) {
44     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
45   }
46 
Stem(string language, bool fallback)47   public Stem(string language, bool fallback) : this(XapianPINVOKE.new_Stem__SWIG_1(language, fallback), true) {
48     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
49   }
50 
Stem(StemImplementation p)51   public Stem(StemImplementation p) : this(XapianPINVOKE.new_Stem__SWIG_2(StemImplementation.getCPtr(p)), true) {
52     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
53   }
54 
Apply(string word)55   public string Apply(string word) {
56     string ret = XapianPINVOKE.Stem_Apply(swigCPtr, word);
57     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
58     return ret;
59   }
60 
IsNone()61   public bool IsNone() {
62     bool ret = XapianPINVOKE.Stem_IsNone(swigCPtr);
63     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
64     return ret;
65   }
66 
GetDescription()67   public string GetDescription() {
68     string ret = XapianPINVOKE.Stem_GetDescription(swigCPtr);
69     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
70     return ret;
71   }
72 
GetAvailableLanguages()73   public static string GetAvailableLanguages() {
74     string ret = XapianPINVOKE.Stem_GetAvailableLanguages();
75     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
76     return ret;
77   }
78 
79 }
80 
81 }
82