1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207
|
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 1.3.40
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
namespace Xapian {
using System;
using System.Runtime.InteropServices;
public class MSet : IDisposable {
private HandleRef swigCPtr;
protected bool swigCMemOwn;
internal MSet(IntPtr cPtr, bool cMemoryOwn) {
swigCMemOwn = cMemoryOwn;
swigCPtr = new HandleRef(this, cPtr);
}
internal static HandleRef getCPtr(MSet obj) {
return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr;
}
~MSet() {
Dispose();
}
public virtual void Dispose() {
lock(this) {
if (swigCPtr.Handle != IntPtr.Zero) {
if (swigCMemOwn) {
swigCMemOwn = false;
XapianPINVOKE.delete_MSet(swigCPtr);
}
swigCPtr = new HandleRef(null, IntPtr.Zero);
}
GC.SuppressFinalize(this);
}
}
public MSet() : this(XapianPINVOKE.new_MSet__SWIG_0(), true) {
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
}
public MSet(MSet other) : this(XapianPINVOKE.new_MSet__SWIG_1(MSet.getCPtr(other)), true) {
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
}
public void Fetch(MSetIterator begin, MSetIterator end) {
XapianPINVOKE.MSet_Fetch__SWIG_0(swigCPtr, MSetIterator.getCPtr(begin), MSetIterator.getCPtr(end));
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
}
public void Fetch(MSetIterator item) {
XapianPINVOKE.MSet_Fetch__SWIG_1(swigCPtr, MSetIterator.getCPtr(item));
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
}
public void Fetch() {
XapianPINVOKE.MSet_Fetch__SWIG_2(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
}
public int ConvertToPercent(double wt) {
int ret = XapianPINVOKE.MSet_ConvertToPercent__SWIG_0(swigCPtr, wt);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public int ConvertToPercent(MSetIterator item) {
int ret = XapianPINVOKE.MSet_ConvertToPercent__SWIG_1(swigCPtr, MSetIterator.getCPtr(item));
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetTermFreq(string tname) {
uint ret = XapianPINVOKE.MSet_GetTermFreq(swigCPtr, tname);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public double GetTermWeight(string tname) {
double ret = XapianPINVOKE.MSet_GetTermWeight(swigCPtr, tname);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetFirstItem() {
uint ret = XapianPINVOKE.MSet_GetFirstItem(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetMatchesLowerBound() {
uint ret = XapianPINVOKE.MSet_GetMatchesLowerBound(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetMatchesEstimated() {
uint ret = XapianPINVOKE.MSet_GetMatchesEstimated(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetMatchesUpperBound() {
uint ret = XapianPINVOKE.MSet_GetMatchesUpperBound(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetUncollapsedMatchesLowerBound() {
uint ret = XapianPINVOKE.MSet_GetUncollapsedMatchesLowerBound(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetUncollapsedMatchesEstimated() {
uint ret = XapianPINVOKE.MSet_GetUncollapsedMatchesEstimated(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetUncollapsedMatchesUpperBound() {
uint ret = XapianPINVOKE.MSet_GetUncollapsedMatchesUpperBound(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public double GetMaxPossible() {
double ret = XapianPINVOKE.MSet_GetMaxPossible(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public double GetMaxAttained() {
double ret = XapianPINVOKE.MSet_GetMaxAttained(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint Size() {
uint ret = XapianPINVOKE.MSet_Size(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public bool Empty() {
bool ret = XapianPINVOKE.MSet_Empty(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public MSetIterator Begin() {
MSetIterator ret = new MSetIterator(XapianPINVOKE.MSet_Begin(swigCPtr), true);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public MSetIterator End() {
MSetIterator ret = new MSetIterator(XapianPINVOKE.MSet_End(swigCPtr), true);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public MSetIterator Back() {
MSetIterator ret = new MSetIterator(XapianPINVOKE.MSet_Back(swigCPtr), true);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public MSetIterator GetHit(uint i) {
MSetIterator ret = new MSetIterator(XapianPINVOKE.MSet_GetHit(swigCPtr, i), true);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public int GetDocumentPercentage(uint i) {
int ret = XapianPINVOKE.MSet_GetDocumentPercentage(swigCPtr, i);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public Document GetDocument(uint i) {
Document ret = new Document(XapianPINVOKE.MSet_GetDocument(swigCPtr, i), true);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public uint GetDocId(uint i) {
uint ret = XapianPINVOKE.MSet_GetDocId(swigCPtr, i);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
public string GetDescription() {
string ret = XapianPINVOKE.MSet_GetDescription(swigCPtr);
if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
return ret;
}
}
}
|