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 CoordWeight : Weight {
14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15 
16   internal CoordWeight(global::System.IntPtr cPtr, bool cMemoryOwn) : base(XapianPINVOKE.CoordWeight_SWIGUpcast(cPtr), cMemoryOwn) {
17     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
18   }
19 
20   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(CoordWeight obj) {
21     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
22   }
23 
24   ~CoordWeight() {
25     Dispose();
26   }
27 
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_CoordWeight(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 
42   public virtual void Init(double factor_) {
43     XapianPINVOKE.CoordWeight_Init(swigCPtr, factor_);
44     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
45   }
46 
47   public CoordWeight() : this(XapianPINVOKE.new_CoordWeight(), true) {
48     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
49   }
50 
51   public override string Name() {
52     string ret = XapianPINVOKE.CoordWeight_Name(swigCPtr);
53     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
54     return ret;
55   }
56 
57   public override double GetSumPart(uint wdf, uint doclen, uint uniqterm) {
58     double ret = XapianPINVOKE.CoordWeight_GetSumPart(swigCPtr, wdf, doclen, uniqterm);
59     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
60     return ret;
61   }
62 
63   public override double GetMaxPart() {
64     double ret = XapianPINVOKE.CoordWeight_GetMaxPart(swigCPtr);
65     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
66     return ret;
67   }
68 
69   public override double GetSumExtra(uint arg0, uint arg1) {
70     double ret = XapianPINVOKE.CoordWeight_GetSumExtra(swigCPtr, arg0, arg1);
71     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
72     return ret;
73   }
74 
75   public override double GetMaxExtra() {
76     double ret = XapianPINVOKE.CoordWeight_GetMaxExtra(swigCPtr);
77     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
78     return ret;
79   }
80 
81 }
82 
83 }
84