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 BoolWeight : Weight {
14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15 
BoolWeight(global::System.IntPtr cPtr, bool cMemoryOwn)16   internal BoolWeight(global::System.IntPtr cPtr, bool cMemoryOwn) : base(XapianPINVOKE.BoolWeight_SWIGUpcast(cPtr), cMemoryOwn) {
17     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
18   }
19 
getCPtr(BoolWeight obj)20   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(BoolWeight obj) {
21     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
22   }
23 
~BoolWeight()24   ~BoolWeight() {
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_BoolWeight(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 
BoolWeight()42   public BoolWeight() : this(XapianPINVOKE.new_BoolWeight(), true) {
43     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
44   }
45 
Name()46   public override string Name() {
47     string ret = XapianPINVOKE.BoolWeight_Name(swigCPtr);
48     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
49     return ret;
50   }
51 
GetSumPart(uint wdf, uint doclen, uint uniqterms)52   public override double GetSumPart(uint wdf, uint doclen, uint uniqterms) {
53     double ret = XapianPINVOKE.BoolWeight_GetSumPart(swigCPtr, wdf, doclen, uniqterms);
54     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
55     return ret;
56   }
57 
GetMaxPart()58   public override double GetMaxPart() {
59     double ret = XapianPINVOKE.BoolWeight_GetMaxPart(swigCPtr);
60     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
61     return ret;
62   }
63 
GetSumExtra(uint doclen, uint uniqterms)64   public override double GetSumExtra(uint doclen, uint uniqterms) {
65     double ret = XapianPINVOKE.BoolWeight_GetSumExtra(swigCPtr, doclen, uniqterms);
66     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
67     return ret;
68   }
69 
GetMaxExtra()70   public override double GetMaxExtra() {
71     double ret = XapianPINVOKE.BoolWeight_GetMaxExtra(swigCPtr);
72     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
73     return ret;
74   }
75 
76 }
77 
78 }
79