/* ---------------------------------------------------------------------------- * This file was automatically generated by SWIG (http://www.swig.org). * Version 1.3.32 * * 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 BoolWeight : Weight { private HandleRef swigCPtr; internal BoolWeight(IntPtr cPtr, bool cMemoryOwn) : base(XapianPINVOKE.BoolWeightUpcast(cPtr), cMemoryOwn) { swigCPtr = new HandleRef(this, cPtr); } internal static HandleRef getCPtr(BoolWeight obj) { return (obj == null) ? new HandleRef(null, IntPtr.Zero) : obj.swigCPtr; } ~BoolWeight() { Dispose(); } public override void Dispose() { lock(this) { if(swigCPtr.Handle != IntPtr.Zero && swigCMemOwn) { swigCMemOwn = false; XapianPINVOKE.delete_BoolWeight(swigCPtr); } swigCPtr = new HandleRef(null, IntPtr.Zero); GC.SuppressFinalize(this); base.Dispose(); } } public BoolWeight Clone() { IntPtr cPtr = XapianPINVOKE.BoolWeight_Clone(swigCPtr); BoolWeight ret = (cPtr == IntPtr.Zero) ? null : new BoolWeight(cPtr, false); if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); return ret; } public BoolWeight() : this(XapianPINVOKE.new_BoolWeight(), true) { if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); } public override string Name() { string ret = XapianPINVOKE.BoolWeight_Name(swigCPtr); if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); return ret; } public override string Serialise() { string ret = XapianPINVOKE.BoolWeight_Serialise(swigCPtr); if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); return ret; } public override Weight Unserialise(string s) { IntPtr cPtr = XapianPINVOKE.BoolWeight_Unserialise(swigCPtr, s); BoolWeight ret = (cPtr == IntPtr.Zero) ? null : new BoolWeight(cPtr, false); if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); return ret; } public override double GetSumPart(uint wdf, double len) { double ret = XapianPINVOKE.BoolWeight_GetSumPart(swigCPtr, wdf, len); if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); return ret; } public override double GetMaxPart() { double ret = XapianPINVOKE.BoolWeight_GetMaxPart(swigCPtr); if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); return ret; } public override double GetSumExtra(double len) { double ret = XapianPINVOKE.BoolWeight_GetSumExtra(swigCPtr, len); if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); return ret; } public override double GetMaxExtra() { double ret = XapianPINVOKE.BoolWeight_GetMaxExtra(swigCPtr); if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); return ret; } public override bool GetSumPartNeedsDocLength() { bool ret = XapianPINVOKE.BoolWeight_GetSumPartNeedsDocLength(swigCPtr); if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve(); return ret; } } }