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 ValuePostingSource : PostingSource {
14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15 
ValuePostingSource(global::System.IntPtr cPtr, bool cMemoryOwn)16   internal ValuePostingSource(global::System.IntPtr cPtr, bool cMemoryOwn) : base(XapianPINVOKE.ValuePostingSource_SWIGUpcast(cPtr), cMemoryOwn) {
17     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
18   }
19 
getCPtr(ValuePostingSource obj)20   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(ValuePostingSource obj) {
21     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
22   }
23 
~ValuePostingSource()24   ~ValuePostingSource() {
25     Dispose();
26   }
27 
Dispose()28   public override void Dispose() {
29     lock(this) {
30       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
31         if (swigCMemOwn) {
32           swigCMemOwn = false;
33           XapianPINVOKE.delete_ValuePostingSource(swigCPtr);
34         }
35         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
36       }
37       global::System.GC.SuppressFinalize(this);
38       base.Dispose();
39     }
40   }
41 
ValuePostingSource(uint slot_)42   public ValuePostingSource(uint slot_) : this(XapianPINVOKE.new_ValuePostingSource(slot_), true) {
43     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
44     SwigDirectorConnect();
45   }
46 
GetTermfreqMin()47   public override uint GetTermfreqMin() {
48     uint ret = (SwigDerivedClassHasMethod("GetTermfreqMin", swigMethodTypes0) ? XapianPINVOKE.ValuePostingSource_GetTermfreqMinSwigExplicitValuePostingSource(swigCPtr) : XapianPINVOKE.ValuePostingSource_GetTermfreqMin(swigCPtr));
49     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
50     return ret;
51   }
52 
GetTermfreqEst()53   public override uint GetTermfreqEst() {
54     uint ret = (SwigDerivedClassHasMethod("GetTermfreqEst", swigMethodTypes1) ? XapianPINVOKE.ValuePostingSource_GetTermfreqEstSwigExplicitValuePostingSource(swigCPtr) : XapianPINVOKE.ValuePostingSource_GetTermfreqEst(swigCPtr));
55     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
56     return ret;
57   }
58 
GetTermfreqMax()59   public override uint GetTermfreqMax() {
60     uint ret = (SwigDerivedClassHasMethod("GetTermfreqMax", swigMethodTypes2) ? XapianPINVOKE.ValuePostingSource_GetTermfreqMaxSwigExplicitValuePostingSource(swigCPtr) : XapianPINVOKE.ValuePostingSource_GetTermfreqMax(swigCPtr));
61     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
62     return ret;
63   }
64 
Next(double min_wt)65   public override void Next(double min_wt) {
66     if (SwigDerivedClassHasMethod("Next", swigMethodTypes5)) XapianPINVOKE.ValuePostingSource_NextSwigExplicitValuePostingSource(swigCPtr, min_wt); else XapianPINVOKE.ValuePostingSource_Next(swigCPtr, min_wt);
67     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
68   }
69 
SkipTo(uint min_docid, double min_wt)70   public override void SkipTo(uint min_docid, double min_wt) {
71     if (SwigDerivedClassHasMethod("SkipTo", swigMethodTypes6)) XapianPINVOKE.ValuePostingSource_SkipToSwigExplicitValuePostingSource(swigCPtr, min_docid, min_wt); else XapianPINVOKE.ValuePostingSource_SkipTo(swigCPtr, min_docid, min_wt);
72     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
73   }
74 
Check(uint min_docid, double min_wt)75   public override bool Check(uint min_docid, double min_wt) {
76     bool ret = (SwigDerivedClassHasMethod("Check", swigMethodTypes7) ? XapianPINVOKE.ValuePostingSource_CheckSwigExplicitValuePostingSource(swigCPtr, min_docid, min_wt) : XapianPINVOKE.ValuePostingSource_Check(swigCPtr, min_docid, min_wt));
77     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
78     return ret;
79   }
80 
AtEnd()81   public override bool AtEnd() {
82     bool ret = (SwigDerivedClassHasMethod("AtEnd", swigMethodTypes8) ? XapianPINVOKE.ValuePostingSource_AtEndSwigExplicitValuePostingSource(swigCPtr) : XapianPINVOKE.ValuePostingSource_AtEnd(swigCPtr));
83     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
84     return ret;
85   }
86 
GetDocId()87   public override uint GetDocId() {
88     uint ret = (SwigDerivedClassHasMethod("GetDocId", swigMethodTypes4) ? XapianPINVOKE.ValuePostingSource_GetDocIdSwigExplicitValuePostingSource(swigCPtr) : XapianPINVOKE.ValuePostingSource_GetDocId(swigCPtr));
89     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
90     return ret;
91   }
92 
Init(Database db_)93   public override void Init(Database db_) {
94     if (SwigDerivedClassHasMethod("Init", swigMethodTypes10)) XapianPINVOKE.ValuePostingSource_InitSwigExplicitValuePostingSource(swigCPtr, Database.getCPtr(db_)); else XapianPINVOKE.ValuePostingSource_Init(swigCPtr, Database.getCPtr(db_));
95     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
96   }
97 
GetDatabase()98   public Database GetDatabase() {
99     Database ret = new Database(XapianPINVOKE.ValuePostingSource_GetDatabase(swigCPtr), true);
100     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
101     return ret;
102   }
103 
GetSlot()104   public uint GetSlot() {
105     uint ret = XapianPINVOKE.ValuePostingSource_GetSlot(swigCPtr);
106     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
107     return ret;
108   }
109 
GetValue()110   public string GetValue() {
111     string ret = XapianPINVOKE.ValuePostingSource_GetValue(swigCPtr);
112     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
113     return ret;
114   }
115 
Done()116   public void Done() {
117     XapianPINVOKE.ValuePostingSource_Done(swigCPtr);
118     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
119   }
120 
GetStarted()121   public bool GetStarted() {
122     bool ret = XapianPINVOKE.ValuePostingSource_GetStarted(swigCPtr);
123     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
124     return ret;
125   }
126 
SetTermfreqMin(uint termfreq_min_)127   public void SetTermfreqMin(uint termfreq_min_) {
128     XapianPINVOKE.ValuePostingSource_SetTermfreqMin(swigCPtr, termfreq_min_);
129     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
130   }
131 
SetTermfreqEst(uint termfreq_est_)132   public void SetTermfreqEst(uint termfreq_est_) {
133     XapianPINVOKE.ValuePostingSource_SetTermfreqEst(swigCPtr, termfreq_est_);
134     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
135   }
136 
SetTermfreqMax(uint termfreq_max_)137   public void SetTermfreqMax(uint termfreq_max_) {
138     XapianPINVOKE.ValuePostingSource_SetTermfreqMax(swigCPtr, termfreq_max_);
139     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
140   }
141 
SwigDirectorConnect()142   private void SwigDirectorConnect() {
143     if (SwigDerivedClassHasMethod("GetTermfreqMin", swigMethodTypes0))
144       swigDelegate0 = new SwigDelegateValuePostingSource_0(SwigDirectorGetTermfreqMin);
145     if (SwigDerivedClassHasMethod("GetTermfreqEst", swigMethodTypes1))
146       swigDelegate1 = new SwigDelegateValuePostingSource_1(SwigDirectorGetTermfreqEst);
147     if (SwigDerivedClassHasMethod("GetTermfreqMax", swigMethodTypes2))
148       swigDelegate2 = new SwigDelegateValuePostingSource_2(SwigDirectorGetTermfreqMax);
149     if (SwigDerivedClassHasMethod("GetWeight", swigMethodTypes3))
150       swigDelegate3 = new SwigDelegateValuePostingSource_3(SwigDirectorGetWeight);
151     if (SwigDerivedClassHasMethod("GetDocId", swigMethodTypes4))
152       swigDelegate4 = new SwigDelegateValuePostingSource_4(SwigDirectorGetDocId);
153     if (SwigDerivedClassHasMethod("Next", swigMethodTypes5))
154       swigDelegate5 = new SwigDelegateValuePostingSource_5(SwigDirectorNext);
155     if (SwigDerivedClassHasMethod("SkipTo", swigMethodTypes6))
156       swigDelegate6 = new SwigDelegateValuePostingSource_6(SwigDirectorSkipTo);
157     if (SwigDerivedClassHasMethod("Check", swigMethodTypes7))
158       swigDelegate7 = new SwigDelegateValuePostingSource_7(SwigDirectorCheck);
159     if (SwigDerivedClassHasMethod("AtEnd", swigMethodTypes8))
160       swigDelegate8 = new SwigDelegateValuePostingSource_8(SwigDirectorAtEnd);
161     if (SwigDerivedClassHasMethod("Name", swigMethodTypes9))
162       swigDelegate9 = new SwigDelegateValuePostingSource_9(SwigDirectorName);
163     if (SwigDerivedClassHasMethod("Init", swigMethodTypes10))
164       swigDelegate10 = new SwigDelegateValuePostingSource_10(SwigDirectorInit);
165     if (SwigDerivedClassHasMethod("GetDescription", swigMethodTypes11))
166       swigDelegate11 = new SwigDelegateValuePostingSource_11(SwigDirectorGetDescription);
167     XapianPINVOKE.ValuePostingSource_director_connect(swigCPtr, swigDelegate0, swigDelegate1, swigDelegate2, swigDelegate3, swigDelegate4, swigDelegate5, swigDelegate6, swigDelegate7, swigDelegate8, swigDelegate9, swigDelegate10, swigDelegate11);
168   }
169 
SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes)170   private bool SwigDerivedClassHasMethod(string methodName, global::System.Type[] methodTypes) {
171     global::System.Reflection.MethodInfo methodInfo = this.GetType().GetMethod(methodName, global::System.Reflection.BindingFlags.Public | global::System.Reflection.BindingFlags.NonPublic | global::System.Reflection.BindingFlags.Instance, null, methodTypes, null);
172     bool hasDerivedMethod = methodInfo.DeclaringType.IsSubclassOf(typeof(ValuePostingSource));
173     return hasDerivedMethod;
174   }
175 
SwigDirectorGetTermfreqMin()176   private uint SwigDirectorGetTermfreqMin() {
177     return GetTermfreqMin();
178   }
179 
SwigDirectorGetTermfreqEst()180   private uint SwigDirectorGetTermfreqEst() {
181     return GetTermfreqEst();
182   }
183 
SwigDirectorGetTermfreqMax()184   private uint SwigDirectorGetTermfreqMax() {
185     return GetTermfreqMax();
186   }
187 
SwigDirectorGetWeight()188   private double SwigDirectorGetWeight() {
189     return GetWeight();
190   }
191 
SwigDirectorGetDocId()192   private uint SwigDirectorGetDocId() {
193     return GetDocId();
194   }
195 
SwigDirectorNext(double min_wt)196   private void SwigDirectorNext(double min_wt) {
197     Next(min_wt);
198   }
199 
SwigDirectorSkipTo(uint min_docid, double min_wt)200   private void SwigDirectorSkipTo(uint min_docid, double min_wt) {
201     SkipTo(min_docid, min_wt);
202   }
203 
SwigDirectorCheck(uint min_docid, double min_wt)204   private bool SwigDirectorCheck(uint min_docid, double min_wt) {
205     return Check(min_docid, min_wt);
206   }
207 
SwigDirectorAtEnd()208   private bool SwigDirectorAtEnd() {
209     return AtEnd();
210   }
211 
SwigDirectorName()212   private string SwigDirectorName() {
213     return Name();
214   }
215 
SwigDirectorInit(global::System.IntPtr db_)216   private void SwigDirectorInit(global::System.IntPtr db_) {
217     Init(new Database(db_, false));
218   }
219 
SwigDirectorGetDescription()220   private string SwigDirectorGetDescription() {
221     return GetDescription();
222   }
223 
SwigDelegateValuePostingSource_0()224   public delegate uint SwigDelegateValuePostingSource_0();
SwigDelegateValuePostingSource_1()225   public delegate uint SwigDelegateValuePostingSource_1();
SwigDelegateValuePostingSource_2()226   public delegate uint SwigDelegateValuePostingSource_2();
SwigDelegateValuePostingSource_3()227   public delegate double SwigDelegateValuePostingSource_3();
SwigDelegateValuePostingSource_4()228   public delegate uint SwigDelegateValuePostingSource_4();
SwigDelegateValuePostingSource_5(double min_wt)229   public delegate void SwigDelegateValuePostingSource_5(double min_wt);
SwigDelegateValuePostingSource_6(uint min_docid, double min_wt)230   public delegate void SwigDelegateValuePostingSource_6(uint min_docid, double min_wt);
SwigDelegateValuePostingSource_7(uint min_docid, double min_wt)231   public delegate bool SwigDelegateValuePostingSource_7(uint min_docid, double min_wt);
SwigDelegateValuePostingSource_8()232   public delegate bool SwigDelegateValuePostingSource_8();
SwigDelegateValuePostingSource_9()233   public delegate string SwigDelegateValuePostingSource_9();
SwigDelegateValuePostingSource_10(global::System.IntPtr db_)234   public delegate void SwigDelegateValuePostingSource_10(global::System.IntPtr db_);
SwigDelegateValuePostingSource_11()235   public delegate string SwigDelegateValuePostingSource_11();
236 
237   private SwigDelegateValuePostingSource_0 swigDelegate0;
238   private SwigDelegateValuePostingSource_1 swigDelegate1;
239   private SwigDelegateValuePostingSource_2 swigDelegate2;
240   private SwigDelegateValuePostingSource_3 swigDelegate3;
241   private SwigDelegateValuePostingSource_4 swigDelegate4;
242   private SwigDelegateValuePostingSource_5 swigDelegate5;
243   private SwigDelegateValuePostingSource_6 swigDelegate6;
244   private SwigDelegateValuePostingSource_7 swigDelegate7;
245   private SwigDelegateValuePostingSource_8 swigDelegate8;
246   private SwigDelegateValuePostingSource_9 swigDelegate9;
247   private SwigDelegateValuePostingSource_10 swigDelegate10;
248   private SwigDelegateValuePostingSource_11 swigDelegate11;
249 
250   private static global::System.Type[] swigMethodTypes0 = new global::System.Type[] {  };
251   private static global::System.Type[] swigMethodTypes1 = new global::System.Type[] {  };
252   private static global::System.Type[] swigMethodTypes2 = new global::System.Type[] {  };
253   private static global::System.Type[] swigMethodTypes3 = new global::System.Type[] {  };
254   private static global::System.Type[] swigMethodTypes4 = new global::System.Type[] {  };
255   private static global::System.Type[] swigMethodTypes5 = new global::System.Type[] { typeof(double) };
256   private static global::System.Type[] swigMethodTypes6 = new global::System.Type[] { typeof(uint), typeof(double) };
257   private static global::System.Type[] swigMethodTypes7 = new global::System.Type[] { typeof(uint), typeof(double) };
258   private static global::System.Type[] swigMethodTypes8 = new global::System.Type[] {  };
259   private static global::System.Type[] swigMethodTypes9 = new global::System.Type[] {  };
260   private static global::System.Type[] swigMethodTypes10 = new global::System.Type[] { typeof(Database) };
261   private static global::System.Type[] swigMethodTypes11 = new global::System.Type[] {  };
262 }
263 
264 }
265