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 Registry : global::System.IDisposable {
14   private global::System.Runtime.InteropServices.HandleRef swigCPtr;
15   protected bool swigCMemOwn;
16 
Registry(global::System.IntPtr cPtr, bool cMemoryOwn)17   internal Registry(global::System.IntPtr cPtr, bool cMemoryOwn) {
18     swigCMemOwn = cMemoryOwn;
19     swigCPtr = new global::System.Runtime.InteropServices.HandleRef(this, cPtr);
20   }
21 
getCPtr(Registry obj)22   internal static global::System.Runtime.InteropServices.HandleRef getCPtr(Registry obj) {
23     return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
24   }
25 
~Registry()26   ~Registry() {
27     Dispose();
28   }
29 
Dispose()30   public virtual void Dispose() {
31     lock(this) {
32       if (swigCPtr.Handle != global::System.IntPtr.Zero) {
33         if (swigCMemOwn) {
34           swigCMemOwn = false;
35           XapianPINVOKE.delete_Registry(swigCPtr);
36         }
37         swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
38       }
39       global::System.GC.SuppressFinalize(this);
40     }
41   }
42 
Registry()43   public Registry() : this(XapianPINVOKE.new_Registry(), true) {
44     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
45   }
46 
RegisterWeightingScheme(Weight wt)47   public void RegisterWeightingScheme(Weight wt) {
48     XapianPINVOKE.Registry_RegisterWeightingScheme(swigCPtr, Weight.getCPtr(wt));
49     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
50   }
51 
GetWeightingScheme(string name)52   public Weight GetWeightingScheme(string name) {
53     global::System.IntPtr cPtr = XapianPINVOKE.Registry_GetWeightingScheme(swigCPtr, name);
54     Weight ret = (cPtr == global::System.IntPtr.Zero) ? null : new Weight(cPtr, false);
55     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
56     return ret;
57   }
58 
RegisterPostingSource(PostingSource source)59   public void RegisterPostingSource(PostingSource source) {
60     XapianPINVOKE.Registry_RegisterPostingSource(swigCPtr, PostingSource.getCPtr(source));
61     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
62   }
63 
GetPostingSource(string name)64   public PostingSource GetPostingSource(string name) {
65     global::System.IntPtr cPtr = XapianPINVOKE.Registry_GetPostingSource(swigCPtr, name);
66     PostingSource ret = (cPtr == global::System.IntPtr.Zero) ? null : new PostingSource(cPtr, false);
67     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
68     return ret;
69   }
70 
RegisterMatchSpy(MatchSpy spy)71   public void RegisterMatchSpy(MatchSpy spy) {
72     XapianPINVOKE.Registry_RegisterMatchSpy(swigCPtr, MatchSpy.getCPtr(spy));
73     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
74   }
75 
GetMatchSpy(string name)76   public MatchSpy GetMatchSpy(string name) {
77     global::System.IntPtr cPtr = XapianPINVOKE.Registry_GetMatchSpy(swigCPtr, name);
78     MatchSpy ret = (cPtr == global::System.IntPtr.Zero) ? null : new MatchSpy(cPtr, false);
79     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
80     return ret;
81   }
82 
RegisterLatLongMetric(LatLongMetric metric)83   public void RegisterLatLongMetric(LatLongMetric metric) {
84     XapianPINVOKE.Registry_RegisterLatLongMetric(swigCPtr, LatLongMetric.getCPtr(metric));
85     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
86   }
87 
GetLatLongMetric(string name)88   public LatLongMetric GetLatLongMetric(string name) {
89     global::System.IntPtr cPtr = XapianPINVOKE.Registry_GetLatLongMetric(swigCPtr, name);
90     LatLongMetric ret = (cPtr == global::System.IntPtr.Zero) ? null : new LatLongMetric(cPtr, false);
91     if (XapianPINVOKE.SWIGPendingException.Pending) throw XapianPINVOKE.SWIGPendingException.Retrieve();
92     return ret;
93   }
94 
95 }
96 
97 }
98