/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 2.0.5
 * 
 * This file is not intended to be easily readable and contains a number of 
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG 
 * interface file instead. 
 * ----------------------------------------------------------------------------- */

#define SWIGCSHARP
#define SWIG_DIRECTORS


#ifdef __cplusplus
/* SwigValueWrapper is described in swig.swg */
template<typename T> class SwigValueWrapper {
  struct SwigMovePointer {
    T *ptr;
    SwigMovePointer(T *p) : ptr(p) { }
    ~SwigMovePointer() { delete ptr; }
    SwigMovePointer& operator=(SwigMovePointer& rhs) { T* oldptr = ptr; ptr = 0; delete oldptr; ptr = rhs.ptr; rhs.ptr = 0; return *this; }
  } pointer;
  SwigValueWrapper& operator=(const SwigValueWrapper<T>& rhs);
  SwigValueWrapper(const SwigValueWrapper<T>& rhs);
public:
  SwigValueWrapper() : pointer(0) { }
  SwigValueWrapper& operator=(const T& t) { SwigMovePointer tmp(new T(t)); pointer = tmp; return *this; }
  operator T&() const { return *pointer.ptr; }
  T *operator&() { return pointer.ptr; }
};

template <typename T> T SwigValueInit() {
  return T();
}
#endif

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#  define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#  define SWIGTEMPLATEDISAMBIGUATOR template
# else
#  define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__)) 
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__)) 
# else
#   define SWIGUNUSED 
# endif
#endif

#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
# endif 
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED 
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#  ifndef GCC_HASCLASSVISIBILITY
#    define GCC_HASCLASSVISIBILITY
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif 
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif



#include <stdlib.h>
#include <string.h>
#include <stdio.h>


/* Support for throwing C# exceptions from C/C++. There are two types: 
 * Exceptions that take a message and ArgumentExceptions that take a message and a parameter name. */
typedef enum {
  SWIG_CSharpApplicationException,
  SWIG_CSharpArithmeticException,
  SWIG_CSharpDivideByZeroException,
  SWIG_CSharpIndexOutOfRangeException,
  SWIG_CSharpInvalidCastException,
  SWIG_CSharpInvalidOperationException,
  SWIG_CSharpIOException,
  SWIG_CSharpNullReferenceException,
  SWIG_CSharpOutOfMemoryException,
  SWIG_CSharpOverflowException,
  SWIG_CSharpSystemException
} SWIG_CSharpExceptionCodes;

typedef enum {
  SWIG_CSharpArgumentException,
  SWIG_CSharpArgumentNullException,
  SWIG_CSharpArgumentOutOfRangeException
} SWIG_CSharpExceptionArgumentCodes;

typedef void (SWIGSTDCALL* SWIG_CSharpExceptionCallback_t)(const char *);
typedef void (SWIGSTDCALL* SWIG_CSharpExceptionArgumentCallback_t)(const char *, const char *);

typedef struct {
  SWIG_CSharpExceptionCodes code;
  SWIG_CSharpExceptionCallback_t callback;
} SWIG_CSharpException_t;

typedef struct {
  SWIG_CSharpExceptionArgumentCodes code;
  SWIG_CSharpExceptionArgumentCallback_t callback;
} SWIG_CSharpExceptionArgument_t;

static SWIG_CSharpException_t SWIG_csharp_exceptions[] = {
  { SWIG_CSharpApplicationException, NULL },
  { SWIG_CSharpArithmeticException, NULL },
  { SWIG_CSharpDivideByZeroException, NULL },
  { SWIG_CSharpIndexOutOfRangeException, NULL },
  { SWIG_CSharpInvalidCastException, NULL },
  { SWIG_CSharpInvalidOperationException, NULL },
  { SWIG_CSharpIOException, NULL },
  { SWIG_CSharpNullReferenceException, NULL },
  { SWIG_CSharpOutOfMemoryException, NULL },
  { SWIG_CSharpOverflowException, NULL },
  { SWIG_CSharpSystemException, NULL }
};

static SWIG_CSharpExceptionArgument_t SWIG_csharp_exceptions_argument[] = {
  { SWIG_CSharpArgumentException, NULL },
  { SWIG_CSharpArgumentNullException, NULL },
  { SWIG_CSharpArgumentOutOfRangeException, NULL }
};

static void SWIGUNUSED SWIG_CSharpSetPendingException(SWIG_CSharpExceptionCodes code, const char *msg) {
  SWIG_CSharpExceptionCallback_t callback = SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback;
  if ((size_t)code < sizeof(SWIG_csharp_exceptions)/sizeof(SWIG_CSharpException_t)) {
    callback = SWIG_csharp_exceptions[code].callback;
  }
  callback(msg);
}

static void SWIGUNUSED SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpExceptionArgumentCodes code, const char *msg, const char *param_name) {
  SWIG_CSharpExceptionArgumentCallback_t callback = SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback;
  if ((size_t)code < sizeof(SWIG_csharp_exceptions_argument)/sizeof(SWIG_CSharpExceptionArgument_t)) {
    callback = SWIG_csharp_exceptions_argument[code].callback;
  }
  callback(msg, param_name);
}


#ifdef __cplusplus
extern "C" 
#endif
SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionCallbacks_Xapian(
                                                SWIG_CSharpExceptionCallback_t applicationCallback,
                                                SWIG_CSharpExceptionCallback_t arithmeticCallback,
                                                SWIG_CSharpExceptionCallback_t divideByZeroCallback, 
                                                SWIG_CSharpExceptionCallback_t indexOutOfRangeCallback, 
                                                SWIG_CSharpExceptionCallback_t invalidCastCallback,
                                                SWIG_CSharpExceptionCallback_t invalidOperationCallback,
                                                SWIG_CSharpExceptionCallback_t ioCallback,
                                                SWIG_CSharpExceptionCallback_t nullReferenceCallback,
                                                SWIG_CSharpExceptionCallback_t outOfMemoryCallback, 
                                                SWIG_CSharpExceptionCallback_t overflowCallback, 
                                                SWIG_CSharpExceptionCallback_t systemCallback) {
  SWIG_csharp_exceptions[SWIG_CSharpApplicationException].callback = applicationCallback;
  SWIG_csharp_exceptions[SWIG_CSharpArithmeticException].callback = arithmeticCallback;
  SWIG_csharp_exceptions[SWIG_CSharpDivideByZeroException].callback = divideByZeroCallback;
  SWIG_csharp_exceptions[SWIG_CSharpIndexOutOfRangeException].callback = indexOutOfRangeCallback;
  SWIG_csharp_exceptions[SWIG_CSharpInvalidCastException].callback = invalidCastCallback;
  SWIG_csharp_exceptions[SWIG_CSharpInvalidOperationException].callback = invalidOperationCallback;
  SWIG_csharp_exceptions[SWIG_CSharpIOException].callback = ioCallback;
  SWIG_csharp_exceptions[SWIG_CSharpNullReferenceException].callback = nullReferenceCallback;
  SWIG_csharp_exceptions[SWIG_CSharpOutOfMemoryException].callback = outOfMemoryCallback;
  SWIG_csharp_exceptions[SWIG_CSharpOverflowException].callback = overflowCallback;
  SWIG_csharp_exceptions[SWIG_CSharpSystemException].callback = systemCallback;
}

#ifdef __cplusplus
extern "C" 
#endif
SWIGEXPORT void SWIGSTDCALL SWIGRegisterExceptionArgumentCallbacks_Xapian(
                                                SWIG_CSharpExceptionArgumentCallback_t argumentCallback,
                                                SWIG_CSharpExceptionArgumentCallback_t argumentNullCallback,
                                                SWIG_CSharpExceptionArgumentCallback_t argumentOutOfRangeCallback) {
  SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentException].callback = argumentCallback;
  SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentNullException].callback = argumentNullCallback;
  SWIG_csharp_exceptions_argument[SWIG_CSharpArgumentOutOfRangeException].callback = argumentOutOfRangeCallback;
}


/* Callback for returning strings to C# without leaking memory */
typedef char * (SWIGSTDCALL* SWIG_CSharpStringHelperCallback)(const char *);
static SWIG_CSharpStringHelperCallback SWIG_csharp_string_callback = NULL;


#ifdef __cplusplus
extern "C" 
#endif
SWIGEXPORT void SWIGSTDCALL SWIGRegisterStringCallback_Xapian(SWIG_CSharpStringHelperCallback callback) {
  SWIG_csharp_string_callback = callback;
}


/* Contract support */

#define SWIG_contract_assert(nullreturn, expr, msg) if (!(expr)) {SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentOutOfRangeException, msg, ""); return nullreturn; } else

/*  Errors in SWIG */
#define  SWIG_UnknownError    	   -1 
#define  SWIG_IOError        	   -2 
#define  SWIG_RuntimeError   	   -3 
#define  SWIG_IndexError     	   -4 
#define  SWIG_TypeError      	   -5 
#define  SWIG_DivisionByZero 	   -6 
#define  SWIG_OverflowError  	   -7 
#define  SWIG_SyntaxError    	   -8 
#define  SWIG_ValueError     	   -9 
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12 
#define  SWIG_NullReferenceError   -13



/* -----------------------------------------------------------------------------
 * director.swg
 *
 * This file contains support for director classes so that C# proxy 
 * methods can be called from C++.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus

#if defined(DEBUG_DIRECTOR_OWNED)
#include <iostream>
#endif
#include <string>

namespace Swig {
  /* Director base class - not currently used in C# directors */
  class Director {
  };

  /* Base class for director exceptions */
  class DirectorException {
  protected:
    std::string swig_msg;

  public:
    DirectorException(const char* msg) : swig_msg(msg) {
    }
    DirectorException(const std::string &msg) : swig_msg(msg) {
    }
    const std::string& what() const {
      return swig_msg;
    }
    virtual ~DirectorException() {
    }
  };

  /* Pure virtual method exception */
  class DirectorPureVirtualException : public Swig::DirectorException {
  public:
    DirectorPureVirtualException(const char* msg) : DirectorException(std::string("Attempt to invoke pure virtual method ") + msg) {
    }
  };
}

#endif /* __cplusplus */



/* xapian.i: the Xapian scripting interface.
 *
 * Copyright 1999,2000,2001 BrightStation PLC
 * Copyright 2001,2002 Ananova Ltd
 * Copyright 2002,2003,2005 James Aylett
 * Copyright 2002,2003,2004,2005,2006,2007,2008,2009,2010,2011 Olly Betts
 * Copyright 2007 Lemur Consulting Ltd
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */


/** @file xapian-head.i
 * @brief Header for SWIG interface file for Xapian.
 */
/* Copyright (C) 2005,2006,2007,2008,2009,2011 Olly Betts
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */

// Disable any deprecation warnings for Xapian methods/functions/classes.
#define XAPIAN_DEPRECATED(D) D
#define XAPIAN_DEPRECATED_CLASS

#include <xapian.h>

#include <string>
#include <vector>

using namespace std;

// If a backend has been disabled in xapian-core (manually or automatically) we
// include a stub definition here so the bindings can still be built.
namespace Xapian {
#ifndef XAPIAN_HAS_BRASS_BACKEND
    namespace Brass {
	static Database open(const string &) {
	    throw FeatureUnavailableError("Brass backend not supported");
	}
	static WritableDatabase open(const string &, int, int = 8192) {
	    throw FeatureUnavailableError("Brass backend not supported");
	}
    }
#endif

#ifndef XAPIAN_HAS_CHERT_BACKEND
    namespace Chert {
	static Database open(const string &) {
	    throw FeatureUnavailableError("Chert backend not supported");
	}
	static WritableDatabase open(const string &, int, int = 8192) {
	    throw FeatureUnavailableError("Chert backend not supported");
	}
    }
#endif

#ifndef XAPIAN_HAS_FLINT_BACKEND
    namespace Flint {
	static Database open(const string &) {
	    throw FeatureUnavailableError("Flint backend not supported");
	}
	static WritableDatabase open(const string &, int, int = 8192) {
	    throw FeatureUnavailableError("Flint backend not supported");
	}
    }
#endif

#ifndef XAPIAN_HAS_INMEMORY_BACKEND
    namespace InMemory {
	static WritableDatabase open() {
	    throw FeatureUnavailableError("InMemory backend not supported");
	}
    }
#endif

#ifndef XAPIAN_HAS_REMOTE_BACKEND
    namespace Remote {
	static Database open(const string &, unsigned int, timeout = 0, timeout = 0) {
	    throw FeatureUnavailableError("Remote backend not supported");
	}

	static WritableDatabase open_writable(const string &, unsigned int, timeout = 0, timeout = 0) {
	    throw FeatureUnavailableError("Remote backend not supported");
	}

	static Database open(const string &, const string &, timeout = 0) {
	    throw FeatureUnavailableError("Remote backend not supported");
	}

	static WritableDatabase open_writable(const string &, const string &, timeout = 0) {
	    throw FeatureUnavailableError("Remote backend not supported");
	}
    }
#endif
}


#include <stdexcept>


#include <string>


#include <vector>
#include <algorithm>
#include <stdexcept>


#include <map>
#include <algorithm>
#include <stdexcept>


SWIGINTERN void SWIG_CSharpException(int code, const char *msg) {
  if (code == SWIG_ValueError) {
    SWIG_CSharpExceptionArgumentCodes exception_code = SWIG_CSharpArgumentOutOfRangeException;
    SWIG_CSharpSetPendingExceptionArgument(exception_code, msg, 0);
  } else {
    SWIG_CSharpExceptionCodes exception_code = SWIG_CSharpApplicationException;
    switch(code) {
    case SWIG_MemoryError:
      exception_code = SWIG_CSharpOutOfMemoryException;
      break;
    case SWIG_IndexError:
      exception_code = SWIG_CSharpIndexOutOfRangeException;
      break;
    case SWIG_DivisionByZero:
      exception_code = SWIG_CSharpDivideByZeroException;
      break;
    case SWIG_IOError:
      exception_code = SWIG_CSharpIOException;
      break;
    case SWIG_OverflowError:
      exception_code = SWIG_CSharpOverflowException;
      break;
    case SWIG_RuntimeError:
    case SWIG_TypeError:
    case SWIG_SyntaxError:
    case SWIG_SystemError:
    case SWIG_UnknownError:
    default:
      exception_code = SWIG_CSharpApplicationException;
      break;
    }
    SWIG_CSharpSetPendingException(exception_code, msg);
  }
}


#include <stdexcept>


#include <utility>


/* csharp/util.i: custom C# typemaps for xapian-bindings
 *
 * Copyright (c) 2005,2006,2008,2009,2011 Olly Betts
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License as
 * published by the Free Software Foundation; either version 2 of the
 * License, or (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
 * USA
 */

// In C#, we don't get SWIG_exception in the generated C++ wrapper sources.
#define XapianException(TYPE, MSG) SWIG_CSharpException(TYPE, (MSG).c_str())


namespace Xapian {

// Wrap Xapian::version_string as Xapian.Version.String() as C# can't have
// functions outside a class and we don't want Xapian.Xapian.VersionString()!
class Version {
  private:
    Version();
    ~Version();
  public:
    static const char * String() { return Xapian::version_string(); }
    static int Major() { return Xapian::major_version(); }
    static int Minor() { return Xapian::minor_version(); }
    static int Revision() { return Xapian::revision(); }
};

}


#ifndef XapianException
# define XapianException(TYPE, MSG) SWIG_exception((TYPE), (MSG).c_str())
#endif

static int XapianExceptionHandler(string & msg) {
    try {
	// Rethrow so we can look at the exception if it was a Xapian::Error.
	throw;
    } catch (const Xapian::Error &e) {
	msg = e.get_type();
	msg += ": ";
	msg += e.get_msg();
	try {
	    // Re-rethrow the previous exception so we can handle the type in a
	    // fine-grained way, but only in one place to avoid bloating the
	    // file.
	    throw;
	} catch (const Xapian::InvalidArgumentError &e) {
	    return SWIG_ValueError;
	} catch (const Xapian::RangeError &e) {
	    return SWIG_IndexError;
	} catch (const Xapian::DatabaseError &) {
	    return SWIG_IOError;
	} catch (const Xapian::NetworkError &) {
	    return SWIG_IOError;
	} catch (const Xapian::InternalError &) {
	    return SWIG_RuntimeError;
	} catch (const Xapian::RuntimeError &) {
	    return SWIG_RuntimeError;
	} catch (...) {
	    return SWIG_UnknownError;
	}
    } catch (...) {
	msg = "unknown error in Xapian";
    }
    return SWIG_UnknownError;
}

SWIGINTERN Xapian::termpos Xapian_PositionIterator_get_termpos(Xapian::PositionIterator const *self){
	    return *(*self);
	}
SWIGINTERN Xapian::PositionIterator Xapian_PositionIterator_next(Xapian::PositionIterator *self){ return ++(*self); }
SWIGINTERN bool Xapian_PositionIterator_equals(Xapian::PositionIterator const *self,Xapian::PositionIterator const &other){
	    return (*self) == other;
	}
SWIGINTERN Xapian::docid Xapian_PostingIterator_get_docid(Xapian::PostingIterator const *self){
	return *(*self);
    }
SWIGINTERN Xapian::PostingIterator Xapian_PostingIterator_next(Xapian::PostingIterator *self){ return ++(*self); }
SWIGINTERN bool Xapian_PostingIterator_equals(Xapian::PostingIterator const *self,Xapian::PostingIterator const &other){
	return (*self) == other;
    }
SWIGINTERN std::string Xapian_TermIterator_get_term(Xapian::TermIterator const *self){
	    return *(*self);
	}
SWIGINTERN Xapian::TermIterator Xapian_TermIterator_next(Xapian::TermIterator *self){ return ++(*self); }
SWIGINTERN bool Xapian_TermIterator_equals(Xapian::TermIterator const *self,Xapian::TermIterator const &other){
	    return (*self) == other;
	}
SWIGINTERN std::string Xapian_ValueIterator_get_value(Xapian::ValueIterator const *self){
	    return *(*self);
	}
SWIGINTERN Xapian::ValueIterator Xapian_ValueIterator_next(Xapian::ValueIterator *self){ return ++(*self); }
SWIGINTERN bool Xapian_ValueIterator_equals(Xapian::ValueIterator const *self,Xapian::ValueIterator const &other){
	    return (*self) == other;
	}
SWIGINTERN Xapian::MSetIterator Xapian_MSet_get_hit(Xapian::MSet const *self,Xapian::doccount i){
	    return ((*self)[i]);
	}
SWIGINTERN int Xapian_MSet_get_document_percentage(Xapian::MSet const *self,Xapian::doccount i){
	    return (*self).convert_to_percent( ((*self)[i]) );
	}
SWIGINTERN Xapian::Document const Xapian_MSet_get_document(Xapian::MSet const *self,Xapian::doccount i){
	    return ((*self)[i]).get_document();
	}
SWIGINTERN Xapian::docid Xapian_MSet_get_docid(Xapian::MSet const *self,Xapian::doccount i){
	    return *((*self)[i]);
	}
SWIGINTERN Xapian::docid Xapian_MSetIterator_get_docid(Xapian::MSetIterator const *self){
	    return *(*self);
	}
SWIGINTERN Xapian::MSetIterator Xapian_MSetIterator_next(Xapian::MSetIterator *self){ return ++(*self); }
SWIGINTERN Xapian::MSetIterator Xapian_MSetIterator_prev(Xapian::MSetIterator *self){ return --(*self); }
SWIGINTERN bool Xapian_MSetIterator_equals(Xapian::MSetIterator const *self,Xapian::MSetIterator const &other){
	    return (*self) == other;
	}
SWIGINTERN std::string Xapian_ESetIterator_get_term(Xapian::ESetIterator const *self){
	    return *(*self);
	}
SWIGINTERN Xapian::ESetIterator Xapian_ESetIterator_next(Xapian::ESetIterator *self){ return ++(*self); }
SWIGINTERN Xapian::ESetIterator Xapian_ESetIterator_prev(Xapian::ESetIterator *self){ return --(*self); }
SWIGINTERN bool Xapian_ESetIterator_equals(Xapian::ESetIterator const *self,Xapian::ESetIterator const &other){
	    return (*self) == other;
	}
SWIGINTERN Xapian::Query *new_Xapian_Query__SWIG_13(Xapian::Query::op op,std::vector< std::string > const &subqs,Xapian::termcount param=0){
		return new Xapian::Query(op, subqs.begin(), subqs.end(), param);
	    }
SWIGINTERN Xapian::Query *new_Xapian_Query__SWIG_15(Xapian::Query::op op,std::vector< Xapian::Query > const &subqs,Xapian::termcount param=0){
		return new Xapian::Query(op, subqs.begin(), subqs.end(), param);
	    }


/* ---------------------------------------------------
 * C++ director class methods
 * --------------------------------------------------- */

#include "xapian_wrap.h"

SwigDirector_PostingSource::SwigDirector_PostingSource() : Xapian::PostingSource(), Swig::Director() {
  swig_init_callbacks();
}

SwigDirector_PostingSource::~SwigDirector_PostingSource() {
  
}


Xapian::doccount SwigDirector_PostingSource::get_termfreq_min() const {
  Xapian::doccount c_result = SwigValueInit< Xapian::doccount >() ;
  unsigned int jresult = 0 ;
  
  if (!swig_callbackGetTermfreqMin) {
    throw Swig::DirectorPureVirtualException("Xapian::PostingSource::get_termfreq_min");
  } else {
    jresult = (unsigned int) swig_callbackGetTermfreqMin();
    c_result = (Xapian::doccount)jresult; 
  }
  return c_result;
}

Xapian::doccount SwigDirector_PostingSource::get_termfreq_est() const {
  Xapian::doccount c_result = SwigValueInit< Xapian::doccount >() ;
  unsigned int jresult = 0 ;
  
  if (!swig_callbackGetTermfreqEst) {
    throw Swig::DirectorPureVirtualException("Xapian::PostingSource::get_termfreq_est");
  } else {
    jresult = (unsigned int) swig_callbackGetTermfreqEst();
    c_result = (Xapian::doccount)jresult; 
  }
  return c_result;
}

Xapian::doccount SwigDirector_PostingSource::get_termfreq_max() const {
  Xapian::doccount c_result = SwigValueInit< Xapian::doccount >() ;
  unsigned int jresult = 0 ;
  
  if (!swig_callbackGetTermfreqMax) {
    throw Swig::DirectorPureVirtualException("Xapian::PostingSource::get_termfreq_max");
  } else {
    jresult = (unsigned int) swig_callbackGetTermfreqMax();
    c_result = (Xapian::doccount)jresult; 
  }
  return c_result;
}

Xapian::weight SwigDirector_PostingSource::get_weight() const {
  Xapian::weight c_result = SwigValueInit< Xapian::weight >() ;
  double jresult = 0 ;
  
  if (!swig_callbackGetWeight) {
    return Xapian::PostingSource::get_weight();
  } else {
    jresult = (double) swig_callbackGetWeight();
    c_result = (Xapian::weight)jresult; 
  }
  return c_result;
}

Xapian::docid SwigDirector_PostingSource::get_docid() const {
  Xapian::docid c_result = SwigValueInit< Xapian::docid >() ;
  unsigned int jresult = 0 ;
  
  if (!swig_callbackGetDocId) {
    throw Swig::DirectorPureVirtualException("Xapian::PostingSource::get_docid");
  } else {
    jresult = (unsigned int) swig_callbackGetDocId();
    c_result = (Xapian::docid)jresult; 
  }
  return c_result;
}

void SwigDirector_PostingSource::next(Xapian::weight min_wt) {
  double jmin_wt  ;
  
  if (!swig_callbackNext) {
    throw Swig::DirectorPureVirtualException("Xapian::PostingSource::next");
  } else {
    jmin_wt = min_wt;
    swig_callbackNext(jmin_wt);
  }
}

void SwigDirector_PostingSource::skip_to(Xapian::docid did, Xapian::weight min_wt) {
  unsigned int jdid  ;
  double jmin_wt  ;
  
  if (!swig_callbackSkipTo) {
    Xapian::PostingSource::skip_to(did,min_wt);
    return;
  } else {
    jdid = did;
    jmin_wt = min_wt;
    swig_callbackSkipTo(jdid, jmin_wt);
  }
}

bool SwigDirector_PostingSource::check(Xapian::docid did, Xapian::weight min_wt) {
  bool c_result = SwigValueInit< bool >() ;
  unsigned int jresult = 0 ;
  unsigned int jdid  ;
  double jmin_wt  ;
  
  if (!swig_callbackCheck) {
    return Xapian::PostingSource::check(did,min_wt);
  } else {
    jdid = did;
    jmin_wt = min_wt;
    jresult = (unsigned int) swig_callbackCheck(jdid, jmin_wt);
    c_result = jresult ? true : false; 
  }
  return c_result;
}

bool SwigDirector_PostingSource::at_end() const {
  bool c_result = SwigValueInit< bool >() ;
  unsigned int jresult = 0 ;
  
  if (!swig_callbackAtEnd) {
    throw Swig::DirectorPureVirtualException("Xapian::PostingSource::at_end");
  } else {
    jresult = (unsigned int) swig_callbackAtEnd();
    c_result = jresult ? true : false; 
  }
  return c_result;
}

Xapian::PostingSource *SwigDirector_PostingSource::clone() const {
  return Xapian::PostingSource::clone();
}

std::string SwigDirector_PostingSource::name() const {
  std::string c_result ;
  char * jresult = 0 ;
  
  if (!swig_callbackName) {
    return Xapian::PostingSource::name();
  } else {
    jresult = (char *) swig_callbackName();
    if (!jresult) {
      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
      return c_result;
    }
    c_result.assign(jresult); 
  }
  return c_result;
}

std::string SwigDirector_PostingSource::serialise() const {
  return Xapian::PostingSource::serialise();
}

Xapian::PostingSource *SwigDirector_PostingSource::unserialise(std::string const &s) const {
  return Xapian::PostingSource::unserialise(s);
}

void SwigDirector_PostingSource::init(Xapian::Database const &db) {
  void * jdb = 0 ;
  
  if (!swig_callbackInit) {
    throw Swig::DirectorPureVirtualException("Xapian::PostingSource::init");
  } else {
    jdb = (Xapian::Database *) &db; 
    swig_callbackInit(jdb);
  }
}

std::string SwigDirector_PostingSource::get_description() const {
  std::string c_result ;
  char * jresult = 0 ;
  
  if (!swig_callbackGetDescription) {
    return Xapian::PostingSource::get_description();
  } else {
    jresult = (char *) swig_callbackGetDescription();
    if (!jresult) {
      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
      return c_result;
    }
    c_result.assign(jresult); 
  }
  return c_result;
}

void SwigDirector_PostingSource::swig_connect_director(SWIG_Callback0_t callbackGetTermfreqMin, SWIG_Callback1_t callbackGetTermfreqEst, SWIG_Callback2_t callbackGetTermfreqMax, SWIG_Callback3_t callbackGetWeight, SWIG_Callback4_t callbackGetDocId, SWIG_Callback5_t callbackNext, SWIG_Callback6_t callbackSkipTo, SWIG_Callback7_t callbackCheck, SWIG_Callback8_t callbackAtEnd, SWIG_Callback9_t callbackName, SWIG_Callback10_t callbackInit, SWIG_Callback11_t callbackGetDescription) {
  swig_callbackGetTermfreqMin = callbackGetTermfreqMin;
  swig_callbackGetTermfreqEst = callbackGetTermfreqEst;
  swig_callbackGetTermfreqMax = callbackGetTermfreqMax;
  swig_callbackGetWeight = callbackGetWeight;
  swig_callbackGetDocId = callbackGetDocId;
  swig_callbackNext = callbackNext;
  swig_callbackSkipTo = callbackSkipTo;
  swig_callbackCheck = callbackCheck;
  swig_callbackAtEnd = callbackAtEnd;
  swig_callbackName = callbackName;
  swig_callbackInit = callbackInit;
  swig_callbackGetDescription = callbackGetDescription;
}

void SwigDirector_PostingSource::swig_init_callbacks() {
  swig_callbackGetTermfreqMin = 0;
  swig_callbackGetTermfreqEst = 0;
  swig_callbackGetTermfreqMax = 0;
  swig_callbackGetWeight = 0;
  swig_callbackGetDocId = 0;
  swig_callbackNext = 0;
  swig_callbackSkipTo = 0;
  swig_callbackCheck = 0;
  swig_callbackAtEnd = 0;
  swig_callbackName = 0;
  swig_callbackInit = 0;
  swig_callbackGetDescription = 0;
}

SwigDirector_MatchDecider::SwigDirector_MatchDecider() : Xapian::MatchDecider(), Swig::Director() {
  swig_init_callbacks();
}

bool SwigDirector_MatchDecider::operator ()(Xapian::Document const &doc) const {
  bool c_result = SwigValueInit< bool >() ;
  unsigned int jresult = 0 ;
  void * jdoc = 0 ;
  
  if (!swig_callbackApply) {
    throw Swig::DirectorPureVirtualException("Xapian::MatchDecider::operator ()");
  } else {
    jdoc = (Xapian::Document *) &doc; 
    jresult = (unsigned int) swig_callbackApply(jdoc);
    c_result = jresult ? true : false; 
  }
  return c_result;
}

SwigDirector_MatchDecider::~SwigDirector_MatchDecider() {
  
}


void SwigDirector_MatchDecider::swig_connect_director(SWIG_Callback0_t callbackApply) {
  swig_callbackApply = callbackApply;
}

void SwigDirector_MatchDecider::swig_init_callbacks() {
  swig_callbackApply = 0;
}

SwigDirector_ExpandDecider::SwigDirector_ExpandDecider() : Xapian::ExpandDecider(), Swig::Director() {
  swig_init_callbacks();
}

bool SwigDirector_ExpandDecider::operator ()(std::string const &term) const {
  bool c_result = SwigValueInit< bool >() ;
  unsigned int jresult = 0 ;
  char * jterm = 0 ;
  
  if (!swig_callbackApply) {
    throw Swig::DirectorPureVirtualException("Xapian::ExpandDecider::operator ()");
  } else {
    jterm = SWIG_csharp_string_callback((&term)->c_str()); 
    jresult = (unsigned int) swig_callbackApply(jterm);
    c_result = jresult ? true : false; 
  }
  return c_result;
}

SwigDirector_ExpandDecider::~SwigDirector_ExpandDecider() {
  
}


void SwigDirector_ExpandDecider::swig_connect_director(SWIG_Callback0_t callbackApply) {
  swig_callbackApply = callbackApply;
}

void SwigDirector_ExpandDecider::swig_init_callbacks() {
  swig_callbackApply = 0;
}

SwigDirector_MatchSpy::SwigDirector_MatchSpy() : Xapian::MatchSpy(), Swig::Director() {
  swig_init_callbacks();
}

SwigDirector_MatchSpy::~SwigDirector_MatchSpy() {
  
}


void SwigDirector_MatchSpy::operator ()(Xapian::Document const &doc, Xapian::weight wt) {
  void * jdoc = 0 ;
  double jwt  ;
  
  if (!swig_callbackApply) {
    throw Swig::DirectorPureVirtualException("Xapian::MatchSpy::operator ()");
  } else {
    jdoc = (Xapian::Document *) &doc; 
    jwt = wt;
    swig_callbackApply(jdoc, jwt);
  }
}

Xapian::MatchSpy *SwigDirector_MatchSpy::clone() const {
  return Xapian::MatchSpy::clone();
}

std::string SwigDirector_MatchSpy::name() const {
  std::string c_result ;
  char * jresult = 0 ;
  
  if (!swig_callbackName) {
    return Xapian::MatchSpy::name();
  } else {
    jresult = (char *) swig_callbackName();
    if (!jresult) {
      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
      return c_result;
    }
    c_result.assign(jresult); 
  }
  return c_result;
}

std::string SwigDirector_MatchSpy::serialise() const {
  return Xapian::MatchSpy::serialise();
}

Xapian::MatchSpy *SwigDirector_MatchSpy::unserialise(std::string const &s, Xapian::Registry const &context) const {
  return Xapian::MatchSpy::unserialise(s,context);
}

std::string SwigDirector_MatchSpy::serialise_results() const {
  return Xapian::MatchSpy::serialise_results();
}

void SwigDirector_MatchSpy::merge_results(std::string const &s) {
  char * js = 0 ;
  
  if (!swig_callbackMergeResults) {
    Xapian::MatchSpy::merge_results(s);
    return;
  } else {
    js = SWIG_csharp_string_callback((&s)->c_str()); 
    swig_callbackMergeResults(js);
  }
}

std::string SwigDirector_MatchSpy::get_description() const {
  std::string c_result ;
  char * jresult = 0 ;
  
  if (!swig_callbackGetDescription) {
    return Xapian::MatchSpy::get_description();
  } else {
    jresult = (char *) swig_callbackGetDescription();
    if (!jresult) {
      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
      return c_result;
    }
    c_result.assign(jresult); 
  }
  return c_result;
}

void SwigDirector_MatchSpy::swig_connect_director(SWIG_Callback0_t callbackApply, SWIG_Callback1_t callbackName, SWIG_Callback2_t callbackMergeResults, SWIG_Callback3_t callbackGetDescription) {
  swig_callbackApply = callbackApply;
  swig_callbackName = callbackName;
  swig_callbackMergeResults = callbackMergeResults;
  swig_callbackGetDescription = callbackGetDescription;
}

void SwigDirector_MatchSpy::swig_init_callbacks() {
  swig_callbackApply = 0;
  swig_callbackName = 0;
  swig_callbackMergeResults = 0;
  swig_callbackGetDescription = 0;
}

SwigDirector_Stopper::SwigDirector_Stopper() : Xapian::Stopper(), Swig::Director() {
  swig_init_callbacks();
}

bool SwigDirector_Stopper::operator ()(std::string const &term) const {
  bool c_result = SwigValueInit< bool >() ;
  unsigned int jresult = 0 ;
  char * jterm = 0 ;
  
  if (!swig_callbackApply) {
    throw Swig::DirectorPureVirtualException("Xapian::Stopper::operator ()");
  } else {
    jterm = SWIG_csharp_string_callback((&term)->c_str()); 
    jresult = (unsigned int) swig_callbackApply(jterm);
    c_result = jresult ? true : false; 
  }
  return c_result;
}

SwigDirector_Stopper::~SwigDirector_Stopper() {
  
}


std::string SwigDirector_Stopper::get_description() const {
  std::string c_result ;
  char * jresult = 0 ;
  
  if (!swig_callbackGetDescription) {
    return Xapian::Stopper::get_description();
  } else {
    jresult = (char *) swig_callbackGetDescription();
    if (!jresult) {
      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
      return c_result;
    }
    c_result.assign(jresult); 
  }
  return c_result;
}

void SwigDirector_Stopper::swig_connect_director(SWIG_Callback0_t callbackApply, SWIG_Callback1_t callbackGetDescription) {
  swig_callbackApply = callbackApply;
  swig_callbackGetDescription = callbackGetDescription;
}

void SwigDirector_Stopper::swig_init_callbacks() {
  swig_callbackApply = 0;
  swig_callbackGetDescription = 0;
}

SwigDirector_ValueRangeProcessor::SwigDirector_ValueRangeProcessor() : Xapian::ValueRangeProcessor(), Swig::Director() {
  swig_init_callbacks();
}

SwigDirector_ValueRangeProcessor::~SwigDirector_ValueRangeProcessor() {
  
}


Xapian::valueno SwigDirector_ValueRangeProcessor::operator ()(std::string &begin, std::string &end) {
  Xapian::valueno c_result = SwigValueInit< Xapian::valueno >() ;
  unsigned int jresult = 0 ;
  void * jbegin = 0 ;
  void * jend = 0 ;
  
  if (!swig_callbackApply) {
    throw Swig::DirectorPureVirtualException("Xapian::ValueRangeProcessor::operator ()");
  } else {
    jbegin = (std::string *) &begin; 
    jend = (std::string *) &end; 
    jresult = (unsigned int) swig_callbackApply(jbegin, jend);
    c_result = (Xapian::valueno)jresult; 
  }
  return c_result;
}

void SwigDirector_ValueRangeProcessor::swig_connect_director(SWIG_Callback0_t callbackApply) {
  swig_callbackApply = callbackApply;
}

void SwigDirector_ValueRangeProcessor::swig_init_callbacks() {
  swig_callbackApply = 0;
}

SwigDirector_StemImplementation::SwigDirector_StemImplementation() : Xapian::StemImplementation(), Swig::Director() {
  swig_init_callbacks();
}

SwigDirector_StemImplementation::~SwigDirector_StemImplementation() {
  
}


std::string SwigDirector_StemImplementation::operator ()(std::string const &word) {
  std::string c_result ;
  char * jresult = 0 ;
  char * jword = 0 ;
  
  if (!swig_callbackApply) {
    throw Swig::DirectorPureVirtualException("Xapian::StemImplementation::operator ()");
  } else {
    jword = SWIG_csharp_string_callback((&word)->c_str()); 
    jresult = (char *) swig_callbackApply(jword);
    if (!jresult) {
      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
      return c_result;
    }
    c_result.assign(jresult); 
  }
  return c_result;
}

std::string SwigDirector_StemImplementation::get_description() const {
  std::string c_result ;
  char * jresult = 0 ;
  
  if (!swig_callbackGetDescription) {
    throw Swig::DirectorPureVirtualException("Xapian::StemImplementation::get_description");
  } else {
    jresult = (char *) swig_callbackGetDescription();
    if (!jresult) {
      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
      return c_result;
    }
    c_result.assign(jresult); 
  }
  return c_result;
}

void SwigDirector_StemImplementation::swig_connect_director(SWIG_Callback0_t callbackApply, SWIG_Callback1_t callbackGetDescription) {
  swig_callbackApply = callbackApply;
  swig_callbackGetDescription = callbackGetDescription;
}

void SwigDirector_StemImplementation::swig_init_callbacks() {
  swig_callbackApply = 0;
  swig_callbackGetDescription = 0;
}

SwigDirector_KeyMaker::SwigDirector_KeyMaker() : Xapian::KeyMaker(), Swig::Director() {
  swig_init_callbacks();
}

std::string SwigDirector_KeyMaker::operator ()(Xapian::Document const &doc) const {
  std::string c_result ;
  char * jresult = 0 ;
  void * jdoc = 0 ;
  
  if (!swig_callbackApply) {
    throw Swig::DirectorPureVirtualException("Xapian::KeyMaker::operator ()");
  } else {
    jdoc = (Xapian::Document *) &doc; 
    jresult = (char *) swig_callbackApply(jdoc);
    if (!jresult) {
      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
      return c_result;
    }
    c_result.assign(jresult); 
  }
  return c_result;
}

SwigDirector_KeyMaker::~SwigDirector_KeyMaker() {
  
}


void SwigDirector_KeyMaker::swig_connect_director(SWIG_Callback0_t callbackApply) {
  swig_callbackApply = callbackApply;
}

void SwigDirector_KeyMaker::swig_init_callbacks() {
  swig_callbackApply = 0;
}

SwigDirector_Compactor::SwigDirector_Compactor() : Xapian::Compactor(), Swig::Director() {
  swig_init_callbacks();
}

SwigDirector_Compactor::~SwigDirector_Compactor() {
  
}


void SwigDirector_Compactor::set_status(std::string const &table, std::string const &status) {
  char * jtable = 0 ;
  char * jstatus = 0 ;
  
  if (!swig_callbackSetStatus) {
    Xapian::Compactor::set_status(table,status);
    return;
  } else {
    jtable = SWIG_csharp_string_callback((&table)->c_str()); 
    jstatus = SWIG_csharp_string_callback((&status)->c_str()); 
    swig_callbackSetStatus(jtable, jstatus);
  }
}

std::string SwigDirector_Compactor::resolve_duplicate_metadata(std::string const &key, size_t num_tags, std::string const tags[]) {
  std::string c_result ;
  char * jresult = 0 ;
  char * jkey = 0 ;
  unsigned long jnum_tags  ;
  void * jtags  ;
  
  if (!swig_callbackResolveDuplicateMetadata) {
    return Xapian::Compactor::resolve_duplicate_metadata(key,num_tags,tags);
  } else {
    jkey = SWIG_csharp_string_callback((&key)->c_str()); 
    jnum_tags = num_tags;
    jtags = (void *) tags; 
    jresult = (char *) swig_callbackResolveDuplicateMetadata(jkey, jnum_tags, jtags);
    if (!jresult) {
      SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
      return c_result;
    }
    c_result.assign(jresult); 
  }
  return c_result;
}

void SwigDirector_Compactor::swig_connect_director(SWIG_Callback0_t callbackSetStatus, SWIG_Callback1_t callbackResolveDuplicateMetadata) {
  swig_callbackSetStatus = callbackSetStatus;
  swig_callbackResolveDuplicateMetadata = callbackResolveDuplicateMetadata;
}

void SwigDirector_Compactor::swig_init_callbacks() {
  swig_callbackSetStatus = 0;
  swig_callbackResolveDuplicateMetadata = 0;
}


#ifdef __cplusplus
extern "C" {
#endif

SWIGEXPORT char * SWIGSTDCALL CSharp_Version_String() {
  char * jresult ;
  char *result = 0 ;
  
  result = (char *)Xapian::Version::String();
  jresult = SWIG_csharp_string_callback((const char *)result); 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Version_Major() {
  int jresult ;
  int result;
  
  result = (int)Xapian::Version::Major();
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Version_Minor() {
  int jresult ;
  int result;
  
  result = (int)Xapian::Version::Minor();
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Version_Revision() {
  int jresult ;
  int result;
  
  result = (int)Xapian::Version::Revision();
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_BAD_VALUENO_get() {
  unsigned int jresult ;
  Xapian::valueno result;
  
  result = (Xapian::valueno)(Xapian::valueno)Xapian::BAD_VALUENO;
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_PositionIterator__SWIG_0() {
  void * jresult ;
  Xapian::PositionIterator *result = 0 ;
  
  {
    try {
      result = (Xapian::PositionIterator *)new Xapian::PositionIterator();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_PositionIterator__SWIG_1(void * jarg1) {
  void * jresult ;
  Xapian::PositionIterator *arg1 = 0 ;
  Xapian::PositionIterator *result = 0 ;
  
  arg1 = (Xapian::PositionIterator *)jarg1;
  if (!arg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::PositionIterator const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::PositionIterator *)new Xapian::PositionIterator((Xapian::PositionIterator const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_PositionIterator(void * jarg1) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  
  arg1 = (Xapian::PositionIterator *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_PositionIterator_GetTermPos(void * jarg1) {
  unsigned int jresult ;
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::termpos result;
  
  arg1 = (Xapian::PositionIterator *)jarg1; 
  {
    try {
      result = (Xapian::termpos)Xapian_PositionIterator_get_termpos((Xapian::PositionIterator const *)arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_PositionIterator_Next(void * jarg1) {
  void * jresult ;
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::PositionIterator result;
  
  arg1 = (Xapian::PositionIterator *)jarg1; 
  {
    try {
      result = Xapian_PositionIterator_next(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::PositionIterator((const Xapian::PositionIterator &)result); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_PositionIterator_Equals(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::PositionIterator *arg2 = 0 ;
  bool result;
  
  arg1 = (Xapian::PositionIterator *)jarg1; 
  arg2 = (Xapian::PositionIterator *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::PositionIterator const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (bool)Xapian_PositionIterator_equals((Xapian::PositionIterator const *)arg1,(Xapian::PositionIterator const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_PositionIterator_SkipTo(void * jarg1, unsigned int jarg2) {
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  Xapian::termpos arg2 ;
  
  arg1 = (Xapian::PositionIterator *)jarg1; 
  arg2 = (Xapian::termpos)jarg2; 
  {
    try {
      (arg1)->skip_to(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_PositionIterator_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::PositionIterator *arg1 = (Xapian::PositionIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::PositionIterator *)jarg1; 
  {
    try {
      result = ((Xapian::PositionIterator const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_PostingIterator__SWIG_0() {
  void * jresult ;
  Xapian::PostingIterator *result = 0 ;
  
  {
    try {
      result = (Xapian::PostingIterator *)new Xapian::PostingIterator();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_PostingIterator(void * jarg1) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  
  arg1 = (Xapian::PostingIterator *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_PostingIterator__SWIG_1(void * jarg1) {
  void * jresult ;
  Xapian::PostingIterator *arg1 = 0 ;
  Xapian::PostingIterator *result = 0 ;
  
  arg1 = (Xapian::PostingIterator *)jarg1;
  if (!arg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::PostingIterator const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::PostingIterator *)new Xapian::PostingIterator((Xapian::PostingIterator const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_PostingIterator_SkipTo(void * jarg1, unsigned int jarg2) {
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::docid arg2 ;
  
  arg1 = (Xapian::PostingIterator *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  {
    try {
      (arg1)->skip_to(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_PostingIterator_GetDocLength(void * jarg1) {
  unsigned int jresult ;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::PostingIterator *)jarg1; 
  {
    try {
      result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_doclength();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_PostingIterator_GetWdf(void * jarg1) {
  unsigned int jresult ;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::PostingIterator *)jarg1; 
  {
    try {
      result = (Xapian::termcount)((Xapian::PostingIterator const *)arg1)->get_wdf();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_PostingIterator_PositionListBegin(void * jarg1) {
  void * jresult ;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::PositionIterator result;
  
  arg1 = (Xapian::PostingIterator *)jarg1; 
  {
    try {
      result = ((Xapian::PostingIterator const *)arg1)->positionlist_begin();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::PositionIterator((const Xapian::PositionIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_PostingIterator_PositionListEnd(void * jarg1) {
  void * jresult ;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::PositionIterator result;
  
  arg1 = (Xapian::PostingIterator *)jarg1; 
  {
    try {
      result = ((Xapian::PostingIterator const *)arg1)->positionlist_end();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::PositionIterator((const Xapian::PositionIterator &)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_PostingIterator_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::PostingIterator *)jarg1; 
  {
    try {
      result = ((Xapian::PostingIterator const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_PostingIterator_GetDocId(void * jarg1) {
  unsigned int jresult ;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::PostingIterator *)jarg1; 
  {
    try {
      result = (Xapian::docid)Xapian_PostingIterator_get_docid((Xapian::PostingIterator const *)arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_PostingIterator_Next(void * jarg1) {
  void * jresult ;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::PostingIterator result;
  
  arg1 = (Xapian::PostingIterator *)jarg1; 
  {
    try {
      result = Xapian_PostingIterator_next(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::PostingIterator((const Xapian::PostingIterator &)result); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_PostingIterator_Equals(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  Xapian::PostingIterator *arg1 = (Xapian::PostingIterator *) 0 ;
  Xapian::PostingIterator *arg2 = 0 ;
  bool result;
  
  arg1 = (Xapian::PostingIterator *)jarg1; 
  arg2 = (Xapian::PostingIterator *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::PostingIterator const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (bool)Xapian_PostingIterator_equals((Xapian::PostingIterator const *)arg1,(Xapian::PostingIterator const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_TermIterator__SWIG_0() {
  void * jresult ;
  Xapian::TermIterator *result = 0 ;
  
  {
    try {
      result = (Xapian::TermIterator *)new Xapian::TermIterator();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_TermIterator__SWIG_1(void * jarg1) {
  void * jresult ;
  Xapian::TermIterator *arg1 = 0 ;
  Xapian::TermIterator *result = 0 ;
  
  arg1 = (Xapian::TermIterator *)jarg1;
  if (!arg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::TermIterator const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::TermIterator *)new Xapian::TermIterator((Xapian::TermIterator const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_TermIterator(void * jarg1) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  
  arg1 = (Xapian::TermIterator *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_TermIterator_GetTerm(void * jarg1) {
  char * jresult ;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::TermIterator *)jarg1; 
  {
    try {
      result = Xapian_TermIterator_get_term((Xapian::TermIterator const *)arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_TermIterator_Next(void * jarg1) {
  void * jresult ;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::TermIterator *)jarg1; 
  {
    try {
      result = Xapian_TermIterator_next(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_TermIterator_Equals(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::TermIterator *arg2 = 0 ;
  bool result;
  
  arg1 = (Xapian::TermIterator *)jarg1; 
  arg2 = (Xapian::TermIterator *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::TermIterator const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (bool)Xapian_TermIterator_equals((Xapian::TermIterator const *)arg1,(Xapian::TermIterator const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_TermIterator_SkipTo(void * jarg1, char * jarg2) {
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::TermIterator *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      (arg1)->skip_to((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_TermIterator_GetWdf(void * jarg1) {
  unsigned int jresult ;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::TermIterator *)jarg1; 
  {
    try {
      result = (Xapian::termcount)((Xapian::TermIterator const *)arg1)->get_wdf();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_TermIterator_GetTermFreq(void * jarg1) {
  unsigned int jresult ;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::TermIterator *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::TermIterator const *)arg1)->get_termfreq();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_TermIterator_PositionlistCount(void * jarg1) {
  unsigned int jresult ;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::TermIterator *)jarg1; 
  {
    try {
      result = (Xapian::termcount)((Xapian::TermIterator const *)arg1)->positionlist_count();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_TermIterator_PositionListBegin(void * jarg1) {
  void * jresult ;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::PositionIterator result;
  
  arg1 = (Xapian::TermIterator *)jarg1; 
  {
    try {
      result = (arg1)->positionlist_begin();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::PositionIterator((const Xapian::PositionIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_TermIterator_PositionListEnd(void * jarg1) {
  void * jresult ;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  Xapian::PositionIterator result;
  
  arg1 = (Xapian::TermIterator *)jarg1; 
  {
    try {
      result = (arg1)->positionlist_end();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::PositionIterator((const Xapian::PositionIterator &)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_TermIterator_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::TermIterator *arg1 = (Xapian::TermIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::TermIterator *)jarg1; 
  {
    try {
      result = ((Xapian::TermIterator const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_ValueIterator__SWIG_0() {
  void * jresult ;
  Xapian::ValueIterator *result = 0 ;
  
  {
    try {
      result = (Xapian::ValueIterator *)new Xapian::ValueIterator();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_ValueIterator__SWIG_1(void * jarg1) {
  void * jresult ;
  Xapian::ValueIterator *arg1 = 0 ;
  Xapian::ValueIterator *result = 0 ;
  
  arg1 = (Xapian::ValueIterator *)jarg1;
  if (!arg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::ValueIterator const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::ValueIterator *)new Xapian::ValueIterator((Xapian::ValueIterator const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_ValueIterator(void * jarg1) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  
  arg1 = (Xapian::ValueIterator *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ValueIterator_GetValue(void * jarg1) {
  char * jresult ;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ValueIterator *)jarg1; 
  {
    try {
      result = Xapian_ValueIterator_get_value((Xapian::ValueIterator const *)arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ValueIterator_Next(void * jarg1) {
  void * jresult ;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::ValueIterator result;
  
  arg1 = (Xapian::ValueIterator *)jarg1; 
  {
    try {
      result = Xapian_ValueIterator_next(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::ValueIterator((const Xapian::ValueIterator &)result); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ValueIterator_Equals(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::ValueIterator *arg2 = 0 ;
  bool result;
  
  arg1 = (Xapian::ValueIterator *)jarg1; 
  arg2 = (Xapian::ValueIterator *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::ValueIterator const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (bool)Xapian_ValueIterator_equals((Xapian::ValueIterator const *)arg1,(Xapian::ValueIterator const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ValueIterator_GetDocId(void * jarg1) {
  unsigned int jresult ;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::ValueIterator *)jarg1; 
  {
    try {
      result = (Xapian::docid)((Xapian::ValueIterator const *)arg1)->get_docid();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ValueIterator_GetValueNo(void * jarg1) {
  unsigned int jresult ;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::valueno result;
  
  arg1 = (Xapian::ValueIterator *)jarg1; 
  {
    try {
      result = (Xapian::valueno)((Xapian::ValueIterator const *)arg1)->get_valueno();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_ValueIterator_SkipTo(void * jarg1, unsigned int jarg2) {
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::docid arg2 ;
  
  arg1 = (Xapian::ValueIterator *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  {
    try {
      (arg1)->skip_to(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ValueIterator_Check(void * jarg1, unsigned int jarg2) {
  unsigned int jresult ;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  Xapian::docid arg2 ;
  bool result;
  
  arg1 = (Xapian::ValueIterator *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  {
    try {
      result = (bool)(arg1)->check(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ValueIterator_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::ValueIterator *arg1 = (Xapian::ValueIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ValueIterator *)jarg1; 
  {
    try {
      result = ((Xapian::ValueIterator const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Document__SWIG_0(void * jarg1) {
  void * jresult ;
  Xapian::Document *arg1 = 0 ;
  Xapian::Document *result = 0 ;
  
  arg1 = (Xapian::Document *)jarg1;
  if (!arg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Document const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::Document *)new Xapian::Document((Xapian::Document const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Document__SWIG_1() {
  void * jresult ;
  Xapian::Document *result = 0 ;
  
  {
    try {
      result = (Xapian::Document *)new Xapian::Document();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_Document(void * jarg1) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  
  arg1 = (Xapian::Document *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Document_GetValue(void * jarg1, unsigned int jarg2) {
  char * jresult ;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::valueno arg2 ;
  std::string result;
  
  arg1 = (Xapian::Document *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  {
    try {
      result = ((Xapian::Document const *)arg1)->get_value(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Document_AddValue(void * jarg1, unsigned int jarg2, char * jarg3) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::valueno arg2 ;
  std::string *arg3 = 0 ;
  
  arg1 = (Xapian::Document *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  if (!jarg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg3_str(jarg3);
  arg3 = &arg3_str; 
  {
    try {
      (arg1)->add_value(arg2,(std::string const &)*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Document_RemoveValue(void * jarg1, unsigned int jarg2) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::valueno arg2 ;
  
  arg1 = (Xapian::Document *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  {
    try {
      (arg1)->remove_value(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Document_ClearValues(void * jarg1) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  
  arg1 = (Xapian::Document *)jarg1; 
  {
    try {
      (arg1)->clear_values();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Document_GetData(void * jarg1) {
  char * jresult ;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Document *)jarg1; 
  {
    try {
      result = ((Xapian::Document const *)arg1)->get_data();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Document_SetData(void * jarg1, char * jarg2) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::Document *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      (arg1)->set_data((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Document_AddPosting__SWIG_0(void * jarg1, char * jarg2, unsigned int jarg3, unsigned int jarg4) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termpos arg3 ;
  Xapian::termcount arg4 ;
  
  arg1 = (Xapian::Document *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (Xapian::termpos)jarg3; 
  arg4 = (Xapian::termcount)jarg4; 
  {
    try {
      (arg1)->add_posting((std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Document_AddPosting__SWIG_1(void * jarg1, char * jarg2, unsigned int jarg3) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termpos arg3 ;
  
  arg1 = (Xapian::Document *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (Xapian::termpos)jarg3; 
  {
    try {
      (arg1)->add_posting((std::string const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Document_AddTerm__SWIG_0(void * jarg1, char * jarg2, unsigned int jarg3) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  
  arg1 = (Xapian::Document *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (Xapian::termcount)jarg3; 
  {
    try {
      (arg1)->add_term((std::string const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Document_AddTerm__SWIG_1(void * jarg1, char * jarg2) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::Document *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      (arg1)->add_term((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Document_AddBooleanTerm(void * jarg1, char * jarg2) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::Document *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      (arg1)->add_boolean_term((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Document_RemovePosting__SWIG_0(void * jarg1, char * jarg2, unsigned int jarg3, unsigned int jarg4) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termpos arg3 ;
  Xapian::termcount arg4 ;
  
  arg1 = (Xapian::Document *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (Xapian::termpos)jarg3; 
  arg4 = (Xapian::termcount)jarg4; 
  {
    try {
      (arg1)->remove_posting((std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Document_RemovePosting__SWIG_1(void * jarg1, char * jarg2, unsigned int jarg3) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termpos arg3 ;
  
  arg1 = (Xapian::Document *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (Xapian::termpos)jarg3; 
  {
    try {
      (arg1)->remove_posting((std::string const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Document_RemoveTerm(void * jarg1, char * jarg2) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::Document *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      (arg1)->remove_term((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Document_ClearTerms(void * jarg1) {
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  
  arg1 = (Xapian::Document *)jarg1; 
  {
    try {
      (arg1)->clear_terms();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Document_TermListCount(void * jarg1) {
  unsigned int jresult ;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::Document *)jarg1; 
  {
    try {
      result = (Xapian::termcount)((Xapian::Document const *)arg1)->termlist_count();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Document_TermListBegin(void * jarg1) {
  void * jresult ;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Document *)jarg1; 
  {
    try {
      result = ((Xapian::Document const *)arg1)->termlist_begin();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Document_TermListEnd(void * jarg1) {
  void * jresult ;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Document *)jarg1; 
  {
    try {
      result = ((Xapian::Document const *)arg1)->termlist_end();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Document_ValuesCount(void * jarg1) {
  unsigned int jresult ;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::Document *)jarg1; 
  {
    try {
      result = (Xapian::termcount)((Xapian::Document const *)arg1)->values_count();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Document_ValuesBegin(void * jarg1) {
  void * jresult ;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::ValueIterator result;
  
  arg1 = (Xapian::Document *)jarg1; 
  {
    try {
      result = ((Xapian::Document const *)arg1)->values_begin();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::ValueIterator((const Xapian::ValueIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Document_ValuesEnd(void * jarg1) {
  void * jresult ;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::ValueIterator result;
  
  arg1 = (Xapian::Document *)jarg1; 
  {
    try {
      result = ((Xapian::Document const *)arg1)->values_end();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::ValueIterator((const Xapian::ValueIterator &)result); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Document_GetDocId(void * jarg1) {
  unsigned int jresult ;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::Document *)jarg1; 
  {
    try {
      result = (Xapian::docid)((Xapian::Document const *)arg1)->get_docid();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Document_Serialise(void * jarg1) {
  char * jresult ;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Document *)jarg1; 
  {
    try {
      result = ((Xapian::Document const *)arg1)->serialise();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Document_Unserialise(char * jarg1) {
  void * jresult ;
  std::string *arg1 = 0 ;
  Xapian::Document result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  {
    try {
      result = Xapian::Document::unserialise((std::string const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Document((const Xapian::Document &)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Document_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::Document *arg1 = (Xapian::Document *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Document *)jarg1; 
  {
    try {
      result = ((Xapian::Document const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_PostingSource() {
  void * jresult ;
  Xapian::PostingSource *result = 0 ;
  
  {
    try {
      result = (Xapian::PostingSource *)new SwigDirector_PostingSource();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_PostingSource(void * jarg1) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_PostingSource_GetTermfreqMin(void * jarg1) {
  unsigned int jresult ;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_min();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_PostingSource_GetTermfreqEst(void * jarg1) {
  unsigned int jresult ;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_est();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_PostingSource_GetTermfreqMax(void * jarg1) {
  unsigned int jresult ;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::PostingSource const *)arg1)->get_termfreq_max();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_PostingSource_GetMaxweight(void * jarg1) {
  double jresult ;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::PostingSource const *)arg1)->get_maxweight();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_PostingSource_GetWeight(void * jarg1) {
  double jresult ;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::PostingSource const *)arg1)->get_weight();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_PostingSource_GetWeightSwigExplicitPostingSource(void * jarg1) {
  double jresult ;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::PostingSource const *)arg1)->Xapian::PostingSource::get_weight();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_PostingSource_GetDocId(void * jarg1) {
  unsigned int jresult ;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  {
    try {
      result = (Xapian::docid)((Xapian::PostingSource const *)arg1)->get_docid();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_PostingSource_Next(void * jarg1, double jarg2) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::weight arg2 ;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  arg2 = (Xapian::weight)jarg2; 
  {
    try {
      (arg1)->next(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_PostingSource_SkipTo(void * jarg1, unsigned int jarg2, double jarg3) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  arg3 = (Xapian::weight)jarg3; 
  {
    try {
      (arg1)->skip_to(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_PostingSource_SkipToSwigExplicitPostingSource(void * jarg1, unsigned int jarg2, double jarg3) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  arg3 = (Xapian::weight)jarg3; 
  {
    try {
      (arg1)->Xapian::PostingSource::skip_to(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_PostingSource_Check(void * jarg1, unsigned int jarg2, double jarg3) {
  unsigned int jresult ;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  bool result;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  arg3 = (Xapian::weight)jarg3; 
  {
    try {
      result = (bool)(arg1)->check(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_PostingSource_CheckSwigExplicitPostingSource(void * jarg1, unsigned int jarg2, double jarg3) {
  unsigned int jresult ;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  bool result;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  arg3 = (Xapian::weight)jarg3; 
  {
    try {
      result = (bool)(arg1)->Xapian::PostingSource::check(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_PostingSource_AtEnd(void * jarg1) {
  unsigned int jresult ;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  bool result;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  {
    try {
      result = (bool)((Xapian::PostingSource const *)arg1)->at_end();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_PostingSource_Name(void * jarg1) {
  char * jresult ;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  {
    try {
      result = ((Xapian::PostingSource const *)arg1)->name();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_PostingSource_NameSwigExplicitPostingSource(void * jarg1) {
  char * jresult ;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  {
    try {
      result = ((Xapian::PostingSource const *)arg1)->Xapian::PostingSource::name();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_PostingSource_Init(void * jarg1, void * jarg2) {
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  arg2 = (Xapian::Database *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Database const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_PostingSource_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  {
    try {
      result = ((Xapian::PostingSource const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_PostingSource_GetDescriptionSwigExplicitPostingSource(void * jarg1) {
  char * jresult ;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  {
    try {
      result = ((Xapian::PostingSource const *)arg1)->Xapian::PostingSource::get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_PostingSource_director_connect(void *objarg, SwigDirector_PostingSource::SWIG_Callback0_t callback0, SwigDirector_PostingSource::SWIG_Callback1_t callback1, SwigDirector_PostingSource::SWIG_Callback2_t callback2, SwigDirector_PostingSource::SWIG_Callback3_t callback3, SwigDirector_PostingSource::SWIG_Callback4_t callback4, SwigDirector_PostingSource::SWIG_Callback5_t callback5, SwigDirector_PostingSource::SWIG_Callback6_t callback6, SwigDirector_PostingSource::SWIG_Callback7_t callback7, SwigDirector_PostingSource::SWIG_Callback8_t callback8, SwigDirector_PostingSource::SWIG_Callback9_t callback9, SwigDirector_PostingSource::SWIG_Callback10_t callback10, SwigDirector_PostingSource::SWIG_Callback11_t callback11) {
  Xapian::PostingSource *obj = (Xapian::PostingSource *)objarg;
  SwigDirector_PostingSource *director = dynamic_cast<SwigDirector_PostingSource *>(obj);
  if (director) {
    director->swig_connect_director(callback0, callback1, callback2, callback3, callback4, callback5, callback6, callback7, callback8, callback9, callback10, callback11);
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_ValuePostingSource(unsigned int jarg1) {
  void * jresult ;
  Xapian::valueno arg1 ;
  Xapian::ValuePostingSource *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  {
    try {
      result = (Xapian::ValuePostingSource *)new Xapian::ValuePostingSource(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ValuePostingSource_GetTermfreqMin(void * jarg1) {
  unsigned int jresult ;
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::ValuePostingSource *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->get_termfreq_min();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ValuePostingSource_GetTermfreqEst(void * jarg1) {
  unsigned int jresult ;
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::ValuePostingSource *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->get_termfreq_est();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ValuePostingSource_GetTermfreqMax(void * jarg1) {
  unsigned int jresult ;
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::ValuePostingSource *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::ValuePostingSource const *)arg1)->get_termfreq_max();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_ValuePostingSource_Next(void * jarg1, double jarg2) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::weight arg2 ;
  
  arg1 = (Xapian::ValuePostingSource *)jarg1; 
  arg2 = (Xapian::weight)jarg2; 
  {
    try {
      (arg1)->next(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_ValuePostingSource_SkipTo(void * jarg1, unsigned int jarg2, double jarg3) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  
  arg1 = (Xapian::ValuePostingSource *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  arg3 = (Xapian::weight)jarg3; 
  {
    try {
      (arg1)->skip_to(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ValuePostingSource_Check(void * jarg1, unsigned int jarg2, double jarg3) {
  unsigned int jresult ;
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  bool result;
  
  arg1 = (Xapian::ValuePostingSource *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  arg3 = (Xapian::weight)jarg3; 
  {
    try {
      result = (bool)(arg1)->check(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ValuePostingSource_AtEnd(void * jarg1) {
  unsigned int jresult ;
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  bool result;
  
  arg1 = (Xapian::ValuePostingSource *)jarg1; 
  {
    try {
      result = (bool)((Xapian::ValuePostingSource const *)arg1)->at_end();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ValuePostingSource_GetDocId(void * jarg1) {
  unsigned int jresult ;
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::ValuePostingSource *)jarg1; 
  {
    try {
      result = (Xapian::docid)((Xapian::ValuePostingSource const *)arg1)->get_docid();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_ValuePostingSource_Init(void * jarg1, void * jarg2) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  
  arg1 = (Xapian::ValuePostingSource *)jarg1; 
  arg2 = (Xapian::Database *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Database const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_ValuePostingSource(void * jarg1) {
  Xapian::ValuePostingSource *arg1 = (Xapian::ValuePostingSource *) 0 ;
  
  arg1 = (Xapian::ValuePostingSource *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_ValueWeightPostingSource(unsigned int jarg1) {
  void * jresult ;
  Xapian::valueno arg1 ;
  Xapian::ValueWeightPostingSource *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  {
    try {
      result = (Xapian::ValueWeightPostingSource *)new Xapian::ValueWeightPostingSource(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_ValueWeightPostingSource_GetWeight(void * jarg1) {
  double jresult ;
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::ValueWeightPostingSource *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::ValueWeightPostingSource const *)arg1)->get_weight();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ValueWeightPostingSource_Name(void * jarg1) {
  char * jresult ;
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ValueWeightPostingSource *)jarg1; 
  {
    try {
      result = ((Xapian::ValueWeightPostingSource const *)arg1)->name();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_ValueWeightPostingSource_Init(void * jarg1, void * jarg2) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  
  arg1 = (Xapian::ValueWeightPostingSource *)jarg1; 
  arg2 = (Xapian::Database *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Database const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ValueWeightPostingSource_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ValueWeightPostingSource *)jarg1; 
  {
    try {
      result = ((Xapian::ValueWeightPostingSource const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_ValueWeightPostingSource(void * jarg1) {
  Xapian::ValueWeightPostingSource *arg1 = (Xapian::ValueWeightPostingSource *) 0 ;
  
  arg1 = (Xapian::ValueWeightPostingSource *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_DecreasingValueWeightPostingSource__SWIG_0(unsigned int jarg1, unsigned int jarg2, unsigned int jarg3) {
  void * jresult ;
  Xapian::valueno arg1 ;
  Xapian::docid arg2 ;
  Xapian::docid arg3 ;
  Xapian::DecreasingValueWeightPostingSource *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  arg3 = (Xapian::docid)jarg3; 
  {
    try {
      result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1,arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_DecreasingValueWeightPostingSource__SWIG_1(unsigned int jarg1, unsigned int jarg2) {
  void * jresult ;
  Xapian::valueno arg1 ;
  Xapian::docid arg2 ;
  Xapian::DecreasingValueWeightPostingSource *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  {
    try {
      result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1,arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_DecreasingValueWeightPostingSource__SWIG_2(unsigned int jarg1) {
  void * jresult ;
  Xapian::valueno arg1 ;
  Xapian::DecreasingValueWeightPostingSource *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  {
    try {
      result = (Xapian::DecreasingValueWeightPostingSource *)new Xapian::DecreasingValueWeightPostingSource(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_DecreasingValueWeightPostingSource_GetWeight(void * jarg1) {
  double jresult ;
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::DecreasingValueWeightPostingSource *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::DecreasingValueWeightPostingSource const *)arg1)->get_weight();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_DecreasingValueWeightPostingSource_Name(void * jarg1) {
  char * jresult ;
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::DecreasingValueWeightPostingSource *)jarg1; 
  {
    try {
      result = ((Xapian::DecreasingValueWeightPostingSource const *)arg1)->name();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_DecreasingValueWeightPostingSource_Init(void * jarg1, void * jarg2) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  
  arg1 = (Xapian::DecreasingValueWeightPostingSource *)jarg1; 
  arg2 = (Xapian::Database *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Database const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_DecreasingValueWeightPostingSource_Next(void * jarg1, double jarg2) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  Xapian::weight arg2 ;
  
  arg1 = (Xapian::DecreasingValueWeightPostingSource *)jarg1; 
  arg2 = (Xapian::weight)jarg2; 
  {
    try {
      (arg1)->next(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_DecreasingValueWeightPostingSource_SkipTo(void * jarg1, unsigned int jarg2, double jarg3) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  
  arg1 = (Xapian::DecreasingValueWeightPostingSource *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  arg3 = (Xapian::weight)jarg3; 
  {
    try {
      (arg1)->skip_to(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_DecreasingValueWeightPostingSource_Check(void * jarg1, unsigned int jarg2, double jarg3) {
  unsigned int jresult ;
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  bool result;
  
  arg1 = (Xapian::DecreasingValueWeightPostingSource *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  arg3 = (Xapian::weight)jarg3; 
  {
    try {
      result = (bool)(arg1)->check(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_DecreasingValueWeightPostingSource_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::DecreasingValueWeightPostingSource *)jarg1; 
  {
    try {
      result = ((Xapian::DecreasingValueWeightPostingSource const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_DecreasingValueWeightPostingSource(void * jarg1) {
  Xapian::DecreasingValueWeightPostingSource *arg1 = (Xapian::DecreasingValueWeightPostingSource *) 0 ;
  
  arg1 = (Xapian::DecreasingValueWeightPostingSource *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_ValueMapPostingSource(unsigned int jarg1) {
  void * jresult ;
  Xapian::valueno arg1 ;
  Xapian::ValueMapPostingSource *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  {
    try {
      result = (Xapian::ValueMapPostingSource *)new Xapian::ValueMapPostingSource(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_ValueMapPostingSource_AddMapping(void * jarg1, char * jarg2, double jarg3) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  std::string *arg2 = 0 ;
  double arg3 ;
  
  arg1 = (Xapian::ValueMapPostingSource *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (double)jarg3; 
  {
    try {
      (arg1)->add_mapping((std::string const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_ValueMapPostingSource_ClearMappings(void * jarg1) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  
  arg1 = (Xapian::ValueMapPostingSource *)jarg1; 
  {
    try {
      (arg1)->clear_mappings();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_ValueMapPostingSource_SetDefaultWeight(void * jarg1, double jarg2) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  double arg2 ;
  
  arg1 = (Xapian::ValueMapPostingSource *)jarg1; 
  arg2 = (double)jarg2; 
  {
    try {
      (arg1)->set_default_weight(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT double SWIGSTDCALL CSharp_ValueMapPostingSource_GetWeight(void * jarg1) {
  double jresult ;
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::ValueMapPostingSource *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::ValueMapPostingSource const *)arg1)->get_weight();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ValueMapPostingSource_Name(void * jarg1) {
  char * jresult ;
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ValueMapPostingSource *)jarg1; 
  {
    try {
      result = ((Xapian::ValueMapPostingSource const *)arg1)->name();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_ValueMapPostingSource_Init(void * jarg1, void * jarg2) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  
  arg1 = (Xapian::ValueMapPostingSource *)jarg1; 
  arg2 = (Xapian::Database *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Database const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ValueMapPostingSource_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ValueMapPostingSource *)jarg1; 
  {
    try {
      result = ((Xapian::ValueMapPostingSource const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_ValueMapPostingSource(void * jarg1) {
  Xapian::ValueMapPostingSource *arg1 = (Xapian::ValueMapPostingSource *) 0 ;
  
  arg1 = (Xapian::ValueMapPostingSource *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_FixedWeightPostingSource(double jarg1) {
  void * jresult ;
  Xapian::weight arg1 ;
  Xapian::FixedWeightPostingSource *result = 0 ;
  
  arg1 = (Xapian::weight)jarg1; 
  {
    try {
      result = (Xapian::FixedWeightPostingSource *)new Xapian::FixedWeightPostingSource(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_FixedWeightPostingSource_GetTermfreqMin(void * jarg1) {
  unsigned int jresult ;
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_min();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_FixedWeightPostingSource_GetTermfreqEst(void * jarg1) {
  unsigned int jresult ;
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_est();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_FixedWeightPostingSource_GetTermfreqMax(void * jarg1) {
  unsigned int jresult ;
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::FixedWeightPostingSource const *)arg1)->get_termfreq_max();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_FixedWeightPostingSource_GetWeight(void * jarg1) {
  double jresult ;
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::FixedWeightPostingSource const *)arg1)->get_weight();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FixedWeightPostingSource_Next(void * jarg1, double jarg2) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::weight arg2 ;
  
  arg1 = (Xapian::FixedWeightPostingSource *)jarg1; 
  arg2 = (Xapian::weight)jarg2; 
  {
    try {
      (arg1)->next(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_FixedWeightPostingSource_SkipTo(void * jarg1, unsigned int jarg2, double jarg3) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  
  arg1 = (Xapian::FixedWeightPostingSource *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  arg3 = (Xapian::weight)jarg3; 
  {
    try {
      (arg1)->skip_to(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_FixedWeightPostingSource_Check(void * jarg1, unsigned int jarg2, double jarg3) {
  unsigned int jresult ;
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::docid arg2 ;
  Xapian::weight arg3 ;
  bool result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  arg3 = (Xapian::weight)jarg3; 
  {
    try {
      result = (bool)(arg1)->check(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_FixedWeightPostingSource_AtEnd(void * jarg1) {
  unsigned int jresult ;
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  bool result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)jarg1; 
  {
    try {
      result = (bool)((Xapian::FixedWeightPostingSource const *)arg1)->at_end();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_FixedWeightPostingSource_GetDocId(void * jarg1) {
  unsigned int jresult ;
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)jarg1; 
  {
    try {
      result = (Xapian::docid)((Xapian::FixedWeightPostingSource const *)arg1)->get_docid();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_FixedWeightPostingSource_Name(void * jarg1) {
  char * jresult ;
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)jarg1; 
  {
    try {
      result = ((Xapian::FixedWeightPostingSource const *)arg1)->name();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_FixedWeightPostingSource_Init(void * jarg1, void * jarg2) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  Xapian::Database *arg2 = 0 ;
  
  arg1 = (Xapian::FixedWeightPostingSource *)jarg1; 
  arg2 = (Xapian::Database *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Database const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->init((Xapian::Database const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_FixedWeightPostingSource_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  std::string result;
  
  arg1 = (Xapian::FixedWeightPostingSource *)jarg1; 
  {
    try {
      result = ((Xapian::FixedWeightPostingSource const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_FixedWeightPostingSource(void * jarg1) {
  Xapian::FixedWeightPostingSource *arg1 = (Xapian::FixedWeightPostingSource *) 0 ;
  
  arg1 = (Xapian::FixedWeightPostingSource *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_MSet__SWIG_0() {
  void * jresult ;
  Xapian::MSet *result = 0 ;
  
  {
    try {
      result = (Xapian::MSet *)new Xapian::MSet();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_MSet__SWIG_1(void * jarg1) {
  void * jresult ;
  Xapian::MSet *arg1 = 0 ;
  Xapian::MSet *result = 0 ;
  
  arg1 = (Xapian::MSet *)jarg1;
  if (!arg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::MSet const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::MSet *)new Xapian::MSet((Xapian::MSet const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_MSet(void * jarg1) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_MSet_Fetch__SWIG_0(void * jarg1, void * jarg2, void * jarg3) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  Xapian::MSetIterator *arg3 = 0 ;
  
  arg1 = (Xapian::MSet *)jarg1; 
  arg2 = (Xapian::MSetIterator *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::MSetIterator & type is null", 0);
    return ;
  } 
  arg3 = (Xapian::MSetIterator *)jarg3;
  if (!arg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::MSetIterator & type is null", 0);
    return ;
  } 
  {
    try {
      ((Xapian::MSet const *)arg1)->fetch(*arg2,*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_MSet_Fetch__SWIG_1(void * jarg1, void * jarg2) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  
  arg1 = (Xapian::MSet *)jarg1; 
  arg2 = (Xapian::MSetIterator *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::MSetIterator & type is null", 0);
    return ;
  } 
  {
    try {
      ((Xapian::MSet const *)arg1)->fetch(*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_MSet_Fetch__SWIG_2(void * jarg1) {
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      ((Xapian::MSet const *)arg1)->fetch();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_MSet_ConvertToPercent__SWIG_0(void * jarg1, double jarg2) {
  int jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::weight arg2 ;
  Xapian::percent result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  arg2 = (Xapian::weight)jarg2; 
  {
    try {
      result = (Xapian::percent)((Xapian::MSet const *)arg1)->convert_to_percent(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_MSet_ConvertToPercent__SWIG_1(void * jarg1, void * jarg2) {
  int jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  Xapian::percent result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  arg2 = (Xapian::MSetIterator *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::MSetIterator const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::percent)((Xapian::MSet const *)arg1)->convert_to_percent((Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MSet_GetTermFreq(void * jarg1, char * jarg2) {
  unsigned int jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string arg2 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  (&arg2)->assign(jarg2); 
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_termfreq(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_MSet_GetTermWeight(void * jarg1, char * jarg2) {
  double jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string arg2 ;
  Xapian::weight result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  (&arg2)->assign(jarg2); 
  {
    try {
      result = (Xapian::weight)((Xapian::MSet const *)arg1)->get_termweight(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MSet_GetFirstItem(void * jarg1) {
  unsigned int jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_firstitem();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MSet_GetMatchesLowerBound(void * jarg1) {
  unsigned int jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_lower_bound();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MSet_GetMatchesEstimated(void * jarg1) {
  unsigned int jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_estimated();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MSet_GetMatchesUpperBound(void * jarg1) {
  unsigned int jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_matches_upper_bound();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MSet_GetUncollapsedMatchesLowerBound(void * jarg1) {
  unsigned int jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_lower_bound();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MSet_GetUncollapsedMatchesEstimated(void * jarg1) {
  unsigned int jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_estimated();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MSet_GetUncollapsedMatchesUpperBound(void * jarg1) {
  unsigned int jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->get_uncollapsed_matches_upper_bound();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_MSet_GetMaxPossible(void * jarg1) {
  double jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      result = (Xapian::weight)(arg1)->get_max_possible();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_MSet_GetMaxAttained(void * jarg1) {
  double jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      result = (Xapian::weight)(arg1)->get_max_attained();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MSet_Size(void * jarg1) {
  unsigned int jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::MSet const *)arg1)->size();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MSet_Empty(void * jarg1) {
  unsigned int jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  bool result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      result = (bool)((Xapian::MSet const *)arg1)->empty();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_MSet_Begin(void * jarg1) {
  void * jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      result = ((Xapian::MSet const *)arg1)->begin();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::MSetIterator((const Xapian::MSetIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_MSet_End(void * jarg1) {
  void * jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      result = ((Xapian::MSet const *)arg1)->end();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::MSetIterator((const Xapian::MSetIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_MSet_Back(void * jarg1) {
  void * jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::MSetIterator result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      result = ((Xapian::MSet const *)arg1)->back();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::MSetIterator((const Xapian::MSetIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_MSet_GetHit(void * jarg1, unsigned int jarg2) {
  void * jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::MSetIterator result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  arg2 = (Xapian::doccount)jarg2; 
  {
    try {
      result = Xapian_MSet_get_hit((Xapian::MSet const *)arg1,arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::MSetIterator((const Xapian::MSetIterator &)result); 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_MSet_GetDocumentPercentage(void * jarg1, unsigned int jarg2) {
  int jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  int result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  arg2 = (Xapian::doccount)jarg2; 
  {
    try {
      result = (int)Xapian_MSet_get_document_percentage((Xapian::MSet const *)arg1,arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_MSet_GetDocument(void * jarg1, unsigned int jarg2) {
  void * jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::Document result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  arg2 = (Xapian::doccount)jarg2; 
  {
    try {
      result = Xapian_MSet_get_document((Xapian::MSet const *)arg1,arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Document((const Xapian::Document &)result); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MSet_GetDocId(void * jarg1, unsigned int jarg2) {
  unsigned int jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::docid result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  arg2 = (Xapian::doccount)jarg2; 
  {
    try {
      result = (Xapian::docid)Xapian_MSet_get_docid((Xapian::MSet const *)arg1,arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_MSet_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::MSet *arg1 = (Xapian::MSet *) 0 ;
  std::string result;
  
  arg1 = (Xapian::MSet *)jarg1; 
  {
    try {
      result = ((Xapian::MSet const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_MSetIterator__SWIG_0() {
  void * jresult ;
  Xapian::MSetIterator *result = 0 ;
  
  {
    try {
      result = (Xapian::MSetIterator *)new Xapian::MSetIterator();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_MSetIterator__SWIG_1(void * jarg1) {
  void * jresult ;
  Xapian::MSetIterator *arg1 = 0 ;
  Xapian::MSetIterator *result = 0 ;
  
  arg1 = (Xapian::MSetIterator *)jarg1;
  if (!arg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::MSetIterator const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::MSetIterator *)new Xapian::MSetIterator((Xapian::MSetIterator const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_MSetIterator(void * jarg1) {
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  
  arg1 = (Xapian::MSetIterator *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MSetIterator_GetDocId(void * jarg1) {
  unsigned int jresult ;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::MSetIterator *)jarg1; 
  {
    try {
      result = (Xapian::docid)Xapian_MSetIterator_get_docid((Xapian::MSetIterator const *)arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_MSetIterator_Next(void * jarg1) {
  void * jresult ;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::MSetIterator result;
  
  arg1 = (Xapian::MSetIterator *)jarg1; 
  {
    try {
      result = Xapian_MSetIterator_next(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::MSetIterator((const Xapian::MSetIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_MSetIterator_Prev(void * jarg1) {
  void * jresult ;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::MSetIterator result;
  
  arg1 = (Xapian::MSetIterator *)jarg1; 
  {
    try {
      result = Xapian_MSetIterator_prev(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::MSetIterator((const Xapian::MSetIterator &)result); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MSetIterator_Equals(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  bool result;
  
  arg1 = (Xapian::MSetIterator *)jarg1; 
  arg2 = (Xapian::MSetIterator *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::MSetIterator const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (bool)Xapian_MSetIterator_equals((Xapian::MSetIterator const *)arg1,(Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_MSetIterator_GetDocument(void * jarg1) {
  void * jresult ;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::Document result;
  
  arg1 = (Xapian::MSetIterator *)jarg1; 
  {
    try {
      result = ((Xapian::MSetIterator const *)arg1)->get_document();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Document((const Xapian::Document &)result); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MSetIterator_GetRank(void * jarg1) {
  unsigned int jresult ;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSetIterator *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::MSetIterator const *)arg1)->get_rank();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_MSetIterator_GetWeight(void * jarg1) {
  double jresult ;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::MSetIterator *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::MSetIterator const *)arg1)->get_weight();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_MSetIterator_GetCollapseKey(void * jarg1) {
  char * jresult ;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::MSetIterator *)jarg1; 
  {
    try {
      result = ((Xapian::MSetIterator const *)arg1)->get_collapse_key();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MSetIterator_GetCollapseCount(void * jarg1) {
  unsigned int jresult ;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::MSetIterator *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::MSetIterator const *)arg1)->get_collapse_count();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_MSetIterator_GetPercent(void * jarg1) {
  int jresult ;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  Xapian::percent result;
  
  arg1 = (Xapian::MSetIterator *)jarg1; 
  {
    try {
      result = (Xapian::percent)((Xapian::MSetIterator const *)arg1)->get_percent();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_MSetIterator_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::MSetIterator *arg1 = (Xapian::MSetIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::MSetIterator *)jarg1; 
  {
    try {
      result = ((Xapian::MSetIterator const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESet__SWIG_0() {
  void * jresult ;
  Xapian::ESet *result = 0 ;
  
  {
    try {
      result = (Xapian::ESet *)new Xapian::ESet();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESet__SWIG_1(void * jarg1) {
  void * jresult ;
  Xapian::ESet *arg1 = 0 ;
  Xapian::ESet *result = 0 ;
  
  arg1 = (Xapian::ESet *)jarg1;
  if (!arg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::ESet const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::ESet *)new Xapian::ESet((Xapian::ESet const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_ESet(void * jarg1) {
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  
  arg1 = (Xapian::ESet *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESet_GetEbound(void * jarg1) {
  unsigned int jresult ;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::ESet *)jarg1; 
  {
    try {
      result = (Xapian::termcount)((Xapian::ESet const *)arg1)->get_ebound();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESet_Size(void * jarg1) {
  unsigned int jresult ;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::ESet *)jarg1; 
  {
    try {
      result = (Xapian::termcount)((Xapian::ESet const *)arg1)->size();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESet_Empty(void * jarg1) {
  unsigned int jresult ;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  bool result;
  
  arg1 = (Xapian::ESet *)jarg1; 
  {
    try {
      result = (bool)((Xapian::ESet const *)arg1)->empty();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ESet_Begin(void * jarg1) {
  void * jresult ;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  Xapian::ESetIterator result;
  
  arg1 = (Xapian::ESet *)jarg1; 
  {
    try {
      result = ((Xapian::ESet const *)arg1)->begin();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::ESetIterator((const Xapian::ESetIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ESet_End(void * jarg1) {
  void * jresult ;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  Xapian::ESetIterator result;
  
  arg1 = (Xapian::ESet *)jarg1; 
  {
    try {
      result = ((Xapian::ESet const *)arg1)->end();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::ESetIterator((const Xapian::ESetIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ESet_Back(void * jarg1) {
  void * jresult ;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  Xapian::ESetIterator result;
  
  arg1 = (Xapian::ESet *)jarg1; 
  {
    try {
      result = ((Xapian::ESet const *)arg1)->back();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::ESetIterator((const Xapian::ESetIterator &)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ESet_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::ESet *arg1 = (Xapian::ESet *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ESet *)jarg1; 
  {
    try {
      result = ((Xapian::ESet const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESetIterator__SWIG_0() {
  void * jresult ;
  Xapian::ESetIterator *result = 0 ;
  
  {
    try {
      result = (Xapian::ESetIterator *)new Xapian::ESetIterator();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_ESetIterator__SWIG_1(void * jarg1) {
  void * jresult ;
  Xapian::ESetIterator *arg1 = 0 ;
  Xapian::ESetIterator *result = 0 ;
  
  arg1 = (Xapian::ESetIterator *)jarg1;
  if (!arg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::ESetIterator const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::ESetIterator *)new Xapian::ESetIterator((Xapian::ESetIterator const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_ESetIterator(void * jarg1) {
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  
  arg1 = (Xapian::ESetIterator *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ESetIterator_GetTerm(void * jarg1) {
  char * jresult ;
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ESetIterator *)jarg1; 
  {
    try {
      result = Xapian_ESetIterator_get_term((Xapian::ESetIterator const *)arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ESetIterator_Next(void * jarg1) {
  void * jresult ;
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::ESetIterator result;
  
  arg1 = (Xapian::ESetIterator *)jarg1; 
  {
    try {
      result = Xapian_ESetIterator_next(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::ESetIterator((const Xapian::ESetIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ESetIterator_Prev(void * jarg1) {
  void * jresult ;
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::ESetIterator result;
  
  arg1 = (Xapian::ESetIterator *)jarg1; 
  {
    try {
      result = Xapian_ESetIterator_prev(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::ESetIterator((const Xapian::ESetIterator &)result); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ESetIterator_Equals(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::ESetIterator *arg2 = 0 ;
  bool result;
  
  arg1 = (Xapian::ESetIterator *)jarg1; 
  arg2 = (Xapian::ESetIterator *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::ESetIterator const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (bool)Xapian_ESetIterator_equals((Xapian::ESetIterator const *)arg1,(Xapian::ESetIterator const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_ESetIterator_GetWeight(void * jarg1) {
  double jresult ;
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::ESetIterator *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::ESetIterator const *)arg1)->get_weight();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ESetIterator_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::ESetIterator *arg1 = (Xapian::ESetIterator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ESetIterator *)jarg1; 
  {
    try {
      result = ((Xapian::ESetIterator const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_RSet__SWIG_0(void * jarg1) {
  void * jresult ;
  Xapian::RSet *arg1 = 0 ;
  Xapian::RSet *result = 0 ;
  
  arg1 = (Xapian::RSet *)jarg1;
  if (!arg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::RSet const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::RSet *)new Xapian::RSet((Xapian::RSet const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_RSet__SWIG_1() {
  void * jresult ;
  Xapian::RSet *result = 0 ;
  
  {
    try {
      result = (Xapian::RSet *)new Xapian::RSet();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_RSet(void * jarg1) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  
  arg1 = (Xapian::RSet *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_RSet_Size(void * jarg1) {
  unsigned int jresult ;
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::RSet *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::RSet const *)arg1)->size();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_RSet_Empty(void * jarg1) {
  unsigned int jresult ;
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  bool result;
  
  arg1 = (Xapian::RSet *)jarg1; 
  {
    try {
      result = (bool)((Xapian::RSet const *)arg1)->empty();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_RSet_AddDocument__SWIG_0(void * jarg1, unsigned int jarg2) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::docid arg2 ;
  
  arg1 = (Xapian::RSet *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  {
    try {
      (arg1)->add_document(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_RSet_AddDocument__SWIG_1(void * jarg1, void * jarg2) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  
  arg1 = (Xapian::RSet *)jarg1; 
  arg2 = (Xapian::MSetIterator *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::MSetIterator & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->add_document(*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_RSet_RemoveDocument__SWIG_0(void * jarg1, unsigned int jarg2) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::docid arg2 ;
  
  arg1 = (Xapian::RSet *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  {
    try {
      (arg1)->remove_document(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_RSet_RemoveDocument__SWIG_1(void * jarg1, void * jarg2) {
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  
  arg1 = (Xapian::RSet *)jarg1; 
  arg2 = (Xapian::MSetIterator *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::MSetIterator & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->remove_document(*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_RSet_Contains__SWIG_0(void * jarg1, unsigned int jarg2) {
  unsigned int jresult ;
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::docid arg2 ;
  bool result;
  
  arg1 = (Xapian::RSet *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  {
    try {
      result = (bool)(arg1)->contains(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_RSet_Contains__SWIG_1(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  bool result;
  
  arg1 = (Xapian::RSet *)jarg1; 
  arg2 = (Xapian::MSetIterator *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::MSetIterator & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (bool)(arg1)->contains(*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_RSet_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::RSet *arg1 = (Xapian::RSet *) 0 ;
  std::string result;
  
  arg1 = (Xapian::RSet *)jarg1; 
  {
    try {
      result = ((Xapian::RSet const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_MatchDecider_Apply(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ;
  Xapian::Document *arg2 = 0 ;
  bool result;
  
  arg1 = (Xapian::MatchDecider *)jarg1; 
  arg2 = (Xapian::Document *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Document const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (bool)((Xapian::MatchDecider const *)arg1)->operator ()((Xapian::Document const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_MatchDecider(void * jarg1) {
  Xapian::MatchDecider *arg1 = (Xapian::MatchDecider *) 0 ;
  
  arg1 = (Xapian::MatchDecider *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_MatchDecider() {
  void * jresult ;
  Xapian::MatchDecider *result = 0 ;
  
  {
    try {
      result = (Xapian::MatchDecider *)new SwigDirector_MatchDecider();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_MatchDecider_director_connect(void *objarg, SwigDirector_MatchDecider::SWIG_Callback0_t callback0) {
  Xapian::MatchDecider *obj = (Xapian::MatchDecider *)objarg;
  SwigDirector_MatchDecider *director = dynamic_cast<SwigDirector_MatchDecider *>(obj);
  if (director) {
    director->swig_connect_director(callback0);
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ExpandDecider_Apply(void * jarg1, char * jarg2) {
  unsigned int jresult ;
  Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ;
  std::string *arg2 = 0 ;
  bool result;
  
  arg1 = (Xapian::ExpandDecider *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = (bool)((Xapian::ExpandDecider const *)arg1)->operator ()((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_ExpandDecider(void * jarg1) {
  Xapian::ExpandDecider *arg1 = (Xapian::ExpandDecider *) 0 ;
  
  arg1 = (Xapian::ExpandDecider *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_ExpandDecider() {
  void * jresult ;
  Xapian::ExpandDecider *result = 0 ;
  
  {
    try {
      result = (Xapian::ExpandDecider *)new SwigDirector_ExpandDecider();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_ExpandDecider_director_connect(void *objarg, SwigDirector_ExpandDecider::SWIG_Callback0_t callback0) {
  Xapian::ExpandDecider *obj = (Xapian::ExpandDecider *)objarg;
  SwigDirector_ExpandDecider *director = dynamic_cast<SwigDirector_ExpandDecider *>(obj);
  if (director) {
    director->swig_connect_director(callback0);
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Enquire(void * jarg1) {
  void * jresult ;
  Xapian::Database *arg1 = 0 ;
  Xapian::Enquire *result = 0 ;
  
  arg1 = (Xapian::Database *)jarg1;
  if (!arg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Database const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::Enquire *)new Xapian::Enquire((Xapian::Database const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_Enquire(void * jarg1) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetQuery__SWIG_0(void * jarg1, void * jarg2, unsigned int jarg3) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Query *arg2 = 0 ;
  Xapian::termcount arg3 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::Query *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Query const & type is null", 0);
    return ;
  } 
  arg3 = (Xapian::termcount)jarg3; 
  {
    try {
      (arg1)->set_query((Xapian::Query const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetQuery__SWIG_1(void * jarg1, void * jarg2) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Query *arg2 = 0 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::Query *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Query const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->set_query((Xapian::Query const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetQuery(void * jarg1) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Query *result = 0 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  {
    try {
      result = (Xapian::Query *) &(arg1)->get_query();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_AddMatchspy(void * jarg1, void * jarg2) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MatchSpy *arg2 = (Xapian::MatchSpy *) 0 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::MatchSpy *)jarg2; 
  {
    try {
      (arg1)->add_matchspy(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_ClearMatchspies(void * jarg1) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  {
    try {
      (arg1)->clear_matchspies();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetWeightingScheme(void * jarg1, void * jarg2) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Weight *arg2 = 0 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::Weight *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Weight const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->set_weighting_scheme((Xapian::Weight const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetCollapseKey__SWIG_0(void * jarg1, unsigned int jarg2, unsigned int jarg3) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  Xapian::doccount arg3 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  arg3 = (Xapian::doccount)jarg3; 
  {
    try {
      (arg1)->set_collapse_key(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetCollapseKey__SWIG_1(void * jarg1, unsigned int jarg2) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  {
    try {
      (arg1)->set_collapse_key(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetDocidOrder(void * jarg1, int jarg2) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Enquire::docid_order arg2 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::Enquire::docid_order)jarg2; 
  {
    try {
      (arg1)->set_docid_order(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetCutoff__SWIG_0(void * jarg1, int jarg2, double jarg3) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  int arg2 ;
  Xapian::weight arg3 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (int)jarg2; 
  arg3 = (Xapian::weight)jarg3; 
  {
    try {
      (arg1)->set_cutoff(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetCutoff__SWIG_1(void * jarg1, int jarg2) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  int arg2 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (int)jarg2; 
  {
    try {
      (arg1)->set_cutoff(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetSortByRelevance(void * jarg1) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  {
    try {
      (arg1)->set_sort_by_relevance();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetSortByValue__SWIG_0(void * jarg1, unsigned int jarg2, unsigned int jarg3) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  arg3 = jarg3 ? true : false; 
  {
    try {
      (arg1)->set_sort_by_value(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetSortByValue__SWIG_1(void * jarg1, unsigned int jarg2) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  {
    try {
      (arg1)->set_sort_by_value(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetSortByValueThenRelevance__SWIG_0(void * jarg1, unsigned int jarg2, unsigned int jarg3) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  arg3 = jarg3 ? true : false; 
  {
    try {
      (arg1)->set_sort_by_value_then_relevance(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetSortByValueThenRelevance__SWIG_1(void * jarg1, unsigned int jarg2) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  {
    try {
      (arg1)->set_sort_by_value_then_relevance(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetSortByRelevanceThenValue__SWIG_0(void * jarg1, unsigned int jarg2, unsigned int jarg3) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  arg3 = jarg3 ? true : false; 
  {
    try {
      (arg1)->set_sort_by_relevance_then_value(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetSortByRelevanceThenValue__SWIG_1(void * jarg1, unsigned int jarg2) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::valueno arg2 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  {
    try {
      (arg1)->set_sort_by_relevance_then_value(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetSortByKey__SWIG_0(void * jarg1, void * jarg2, unsigned int jarg3) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
  bool arg3 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::KeyMaker *)jarg2; 
  arg3 = jarg3 ? true : false; 
  {
    try {
      (arg1)->set_sort_by_key(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetSortByKey__SWIG_1(void * jarg1, void * jarg2) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Sorter *arg2 = (Xapian::Sorter *) 0 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::Sorter *)jarg2; 
  {
    try {
      (arg1)->set_sort_by_key(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetSortByKeyThenRelevance__SWIG_0(void * jarg1, void * jarg2, unsigned int jarg3) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
  bool arg3 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::KeyMaker *)jarg2; 
  arg3 = jarg3 ? true : false; 
  {
    try {
      (arg1)->set_sort_by_key_then_relevance(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetSortByKeyThenRelevance__SWIG_1(void * jarg1, void * jarg2) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Sorter *arg2 = (Xapian::Sorter *) 0 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::Sorter *)jarg2; 
  {
    try {
      (arg1)->set_sort_by_key_then_relevance(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetSortByRelevanceThenKey__SWIG_0(void * jarg1, void * jarg2, unsigned int jarg3) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::KeyMaker *arg2 = (Xapian::KeyMaker *) 0 ;
  bool arg3 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::KeyMaker *)jarg2; 
  arg3 = jarg3 ? true : false; 
  {
    try {
      (arg1)->set_sort_by_relevance_then_key(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Enquire_SetSortByRelevanceThenKey__SWIG_1(void * jarg1, void * jarg2) {
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::Sorter *arg2 = (Xapian::Sorter *) 0 ;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::Sorter *)jarg2; 
  {
    try {
      (arg1)->set_sort_by_relevance_then_key(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_Enquire_INCLUDE_QUERY_TERMS_get() {
  int jresult ;
  int result;
  
  result = (int)Xapian::Enquire::INCLUDE_QUERY_TERMS;
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_Enquire_USE_EXACT_TERMFREQ_get() {
  int jresult ;
  int result;
  
  result = (int)Xapian::Enquire::USE_EXACT_TERMFREQ;
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetMSet__SWIG_0(void * jarg1, unsigned int jarg2, unsigned int jarg3, unsigned int jarg4, void * jarg5, void * jarg6, void * jarg7) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::doccount arg3 ;
  Xapian::doccount arg4 ;
  Xapian::RSet *arg5 = (Xapian::RSet *) 0 ;
  Xapian::MatchDecider *arg6 = (Xapian::MatchDecider *) 0 ;
  Xapian::MatchDecider *arg7 = (Xapian::MatchDecider *) 0 ;
  Xapian::MSet result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::doccount)jarg2; 
  arg3 = (Xapian::doccount)jarg3; 
  arg4 = (Xapian::doccount)jarg4; 
  arg5 = (Xapian::RSet *)jarg5; 
  arg6 = (Xapian::MatchDecider *)jarg6; 
  arg7 = (Xapian::MatchDecider *)jarg7; 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5,(Xapian::MatchDecider const *)arg6,(Xapian::MatchDecider const *)arg7);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::MSet((const Xapian::MSet &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetMSet__SWIG_1(void * jarg1, unsigned int jarg2, unsigned int jarg3, unsigned int jarg4, void * jarg5, void * jarg6) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::doccount arg3 ;
  Xapian::doccount arg4 ;
  Xapian::RSet *arg5 = (Xapian::RSet *) 0 ;
  Xapian::MatchDecider *arg6 = (Xapian::MatchDecider *) 0 ;
  Xapian::MSet result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::doccount)jarg2; 
  arg3 = (Xapian::doccount)jarg3; 
  arg4 = (Xapian::doccount)jarg4; 
  arg5 = (Xapian::RSet *)jarg5; 
  arg6 = (Xapian::MatchDecider *)jarg6; 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5,(Xapian::MatchDecider const *)arg6);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::MSet((const Xapian::MSet &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetMSet__SWIG_2(void * jarg1, unsigned int jarg2, unsigned int jarg3, unsigned int jarg4, void * jarg5) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::doccount arg3 ;
  Xapian::doccount arg4 ;
  Xapian::RSet *arg5 = (Xapian::RSet *) 0 ;
  Xapian::MSet result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::doccount)jarg2; 
  arg3 = (Xapian::doccount)jarg3; 
  arg4 = (Xapian::doccount)jarg4; 
  arg5 = (Xapian::RSet *)jarg5; 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4,(Xapian::RSet const *)arg5);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::MSet((const Xapian::MSet &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetMSet__SWIG_3(void * jarg1, unsigned int jarg2, unsigned int jarg3, unsigned int jarg4) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::doccount arg3 ;
  Xapian::doccount arg4 ;
  Xapian::MSet result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::doccount)jarg2; 
  arg3 = (Xapian::doccount)jarg3; 
  arg4 = (Xapian::doccount)jarg4; 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,arg4);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::MSet((const Xapian::MSet &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetMSet__SWIG_4(void * jarg1, unsigned int jarg2, unsigned int jarg3) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::doccount arg3 ;
  Xapian::MSet result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::doccount)jarg2; 
  arg3 = (Xapian::doccount)jarg3; 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::MSet((const Xapian::MSet &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetMSet__SWIG_5(void * jarg1, unsigned int jarg2, unsigned int jarg3, void * jarg4, void * jarg5) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::doccount arg3 ;
  Xapian::RSet *arg4 = (Xapian::RSet *) 0 ;
  Xapian::MatchDecider *arg5 = (Xapian::MatchDecider *) 0 ;
  Xapian::MSet result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::doccount)jarg2; 
  arg3 = (Xapian::doccount)jarg3; 
  arg4 = (Xapian::RSet *)jarg4; 
  arg5 = (Xapian::MatchDecider *)jarg5; 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,(Xapian::RSet const *)arg4,(Xapian::MatchDecider const *)arg5);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::MSet((const Xapian::MSet &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetMSet__SWIG_6(void * jarg1, unsigned int jarg2, unsigned int jarg3, void * jarg4) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::doccount arg2 ;
  Xapian::doccount arg3 ;
  Xapian::RSet *arg4 = (Xapian::RSet *) 0 ;
  Xapian::MSet result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::doccount)jarg2; 
  arg3 = (Xapian::doccount)jarg3; 
  arg4 = (Xapian::RSet *)jarg4; 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_mset(arg2,arg3,(Xapian::RSet const *)arg4);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::MSet((const Xapian::MSet &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetESet__SWIG_0(void * jarg1, unsigned int jarg2, void * jarg3, int jarg4, double jarg5, void * jarg6) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  int arg4 ;
  double arg5 ;
  Xapian::ExpandDecider *arg6 = (Xapian::ExpandDecider *) 0 ;
  Xapian::ESet result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  arg3 = (Xapian::RSet *)jarg3;
  if (!arg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::RSet const & type is null", 0);
    return 0;
  } 
  arg4 = (int)jarg4; 
  arg5 = (double)jarg5; 
  arg6 = (Xapian::ExpandDecider *)jarg6; 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5,(Xapian::ExpandDecider const *)arg6);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::ESet((const Xapian::ESet &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetESet__SWIG_1(void * jarg1, unsigned int jarg2, void * jarg3, int jarg4, double jarg5) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  int arg4 ;
  double arg5 ;
  Xapian::ESet result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  arg3 = (Xapian::RSet *)jarg3;
  if (!arg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::RSet const & type is null", 0);
    return 0;
  } 
  arg4 = (int)jarg4; 
  arg5 = (double)jarg5; 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::ESet((const Xapian::ESet &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetESet__SWIG_2(void * jarg1, unsigned int jarg2, void * jarg3, int jarg4) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  int arg4 ;
  Xapian::ESet result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  arg3 = (Xapian::RSet *)jarg3;
  if (!arg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::RSet const & type is null", 0);
    return 0;
  } 
  arg4 = (int)jarg4; 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::ESet((const Xapian::ESet &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetESet__SWIG_3(void * jarg1, unsigned int jarg2, void * jarg3) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  Xapian::ESet result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  arg3 = (Xapian::RSet *)jarg3;
  if (!arg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::RSet const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::ESet((const Xapian::ESet &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetESet__SWIG_4(void * jarg1, unsigned int jarg2, void * jarg3, int jarg4, double jarg5, void * jarg6, double jarg7) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  int arg4 ;
  double arg5 ;
  Xapian::ExpandDecider *arg6 = (Xapian::ExpandDecider *) 0 ;
  Xapian::weight arg7 ;
  Xapian::ESet result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  arg3 = (Xapian::RSet *)jarg3;
  if (!arg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::RSet const & type is null", 0);
    return 0;
  } 
  arg4 = (int)jarg4; 
  arg5 = (double)jarg5; 
  arg6 = (Xapian::ExpandDecider *)jarg6; 
  arg7 = (Xapian::weight)jarg7; 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,arg4,arg5,(Xapian::ExpandDecider const *)arg6,arg7);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::ESet((const Xapian::ESet &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetESet__SWIG_5(void * jarg1, unsigned int jarg2, void * jarg3, void * jarg4) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::RSet *arg3 = 0 ;
  Xapian::ExpandDecider *arg4 = (Xapian::ExpandDecider *) 0 ;
  Xapian::ESet result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  arg3 = (Xapian::RSet *)jarg3;
  if (!arg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::RSet const & type is null", 0);
    return 0;
  } 
  arg4 = (Xapian::ExpandDecider *)jarg4; 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_eset(arg2,(Xapian::RSet const &)*arg3,(Xapian::ExpandDecider const *)arg4);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::ESet((const Xapian::ESet &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetMatchingTermsBegin__SWIG_0(void * jarg1, unsigned int jarg2) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::docid arg2 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_matching_terms_begin(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetMatchingTermsEnd__SWIG_0(void * jarg1, unsigned int jarg2) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::docid arg2 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetMatchingTermsBegin__SWIG_1(void * jarg1, void * jarg2) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::MSetIterator *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::MSetIterator const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_matching_terms_begin((Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Enquire_GetMatchingTermsEnd__SWIG_1(void * jarg1, void * jarg2) {
  void * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  Xapian::MSetIterator *arg2 = 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  arg2 = (Xapian::MSetIterator *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::MSetIterator const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_matching_terms_end((Xapian::MSetIterator const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Enquire_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::Enquire *arg1 = (Xapian::Enquire *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Enquire *)jarg1; 
  {
    try {
      result = ((Xapian::Enquire const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Registry__SWIG_0(void * jarg1) {
  void * jresult ;
  Xapian::Registry *arg1 = 0 ;
  Xapian::Registry *result = 0 ;
  
  arg1 = (Xapian::Registry *)jarg1;
  if (!arg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Registry const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::Registry *)new Xapian::Registry((Xapian::Registry const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Registry__SWIG_1() {
  void * jresult ;
  Xapian::Registry *result = 0 ;
  
  {
    try {
      result = (Xapian::Registry *)new Xapian::Registry();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_Registry(void * jarg1) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  
  arg1 = (Xapian::Registry *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Registry_RegisterWeightingScheme(void * jarg1, void * jarg2) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::Weight *arg2 = 0 ;
  
  arg1 = (Xapian::Registry *)jarg1; 
  arg2 = (Xapian::Weight *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Weight const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->register_weighting_scheme((Xapian::Weight const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Registry_GetWeightingScheme(void * jarg1, char * jarg2) {
  void * jresult ;
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::Weight *result = 0 ;
  
  arg1 = (Xapian::Registry *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = (Xapian::Weight *)((Xapian::Registry const *)arg1)->get_weighting_scheme((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Registry_RegisterPostingSource(void * jarg1, void * jarg2) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::PostingSource *arg2 = 0 ;
  
  arg1 = (Xapian::Registry *)jarg1; 
  arg2 = (Xapian::PostingSource *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::PostingSource const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->register_posting_source((Xapian::PostingSource const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Registry_GetPostingSource(void * jarg1, char * jarg2) {
  void * jresult ;
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::PostingSource *result = 0 ;
  
  arg1 = (Xapian::Registry *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = (Xapian::PostingSource *)((Xapian::Registry const *)arg1)->get_posting_source((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Registry_RegisterMatchSpy(void * jarg1, void * jarg2) {
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  Xapian::MatchSpy *arg2 = 0 ;
  
  arg1 = (Xapian::Registry *)jarg1; 
  arg2 = (Xapian::MatchSpy *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::MatchSpy const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->register_match_spy((Xapian::MatchSpy const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Registry_GetMatchSpy(void * jarg1, char * jarg2) {
  void * jresult ;
  Xapian::Registry *arg1 = (Xapian::Registry *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::MatchSpy *result = 0 ;
  
  arg1 = (Xapian::Registry *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = (Xapian::MatchSpy *)((Xapian::Registry const *)arg1)->get_match_spy((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_Weight(void * jarg1) {
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  
  arg1 = (Xapian::Weight *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Weight_Name(void * jarg1) {
  char * jresult ;
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Weight *)jarg1; 
  {
    try {
      result = ((Xapian::Weight const *)arg1)->name();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Weight_GetSumPart(void * jarg1, unsigned int jarg2, unsigned int jarg3) {
  double jresult ;
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::weight result;
  
  arg1 = (Xapian::Weight *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  arg3 = (Xapian::termcount)jarg3; 
  {
    try {
      result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_sumpart(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Weight_GetMaxPart(void * jarg1) {
  double jresult ;
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::Weight *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_maxpart();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Weight_GetSumExtra(void * jarg1, unsigned int jarg2) {
  double jresult ;
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::weight result;
  
  arg1 = (Xapian::Weight *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  {
    try {
      result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_sumextra(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Weight_GetMaxExtra(void * jarg1) {
  double jresult ;
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::Weight *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::Weight const *)arg1)->get_maxextra();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Weight_GetSumpartNeedsDoclength(void * jarg1) {
  unsigned int jresult ;
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  bool result;
  
  arg1 = (Xapian::Weight *)jarg1; 
  {
    try {
      result = (bool)((Xapian::Weight const *)arg1)->get_sumpart_needs_doclength_();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Weight_GetSumpartNeedsWdf(void * jarg1) {
  unsigned int jresult ;
  Xapian::Weight *arg1 = (Xapian::Weight *) 0 ;
  bool result;
  
  arg1 = (Xapian::Weight *)jarg1; 
  {
    try {
      result = (bool)((Xapian::Weight const *)arg1)->get_sumpart_needs_wdf_();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_BoolWeight() {
  void * jresult ;
  Xapian::BoolWeight *result = 0 ;
  
  {
    try {
      result = (Xapian::BoolWeight *)new Xapian::BoolWeight();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_BoolWeight_Name(void * jarg1) {
  char * jresult ;
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::BoolWeight *)jarg1; 
  {
    try {
      result = ((Xapian::BoolWeight const *)arg1)->name();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_BoolWeight_GetSumPart(void * jarg1, unsigned int jarg2, unsigned int jarg3) {
  double jresult ;
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::weight result;
  
  arg1 = (Xapian::BoolWeight *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  arg3 = (Xapian::termcount)jarg3; 
  {
    try {
      result = (Xapian::weight)((Xapian::BoolWeight const *)arg1)->get_sumpart(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_BoolWeight_GetMaxPart(void * jarg1) {
  double jresult ;
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::BoolWeight *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::BoolWeight const *)arg1)->get_maxpart();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_BoolWeight_GetSumExtra(void * jarg1, unsigned int jarg2) {
  double jresult ;
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::weight result;
  
  arg1 = (Xapian::BoolWeight *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  {
    try {
      result = (Xapian::weight)((Xapian::BoolWeight const *)arg1)->get_sumextra(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_BoolWeight_GetMaxExtra(void * jarg1) {
  double jresult ;
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::BoolWeight *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::BoolWeight const *)arg1)->get_maxextra();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_BoolWeight(void * jarg1) {
  Xapian::BoolWeight *arg1 = (Xapian::BoolWeight *) 0 ;
  
  arg1 = (Xapian::BoolWeight *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_BM25Weight__SWIG_0(double jarg1, double jarg2, double jarg3, double jarg4, double jarg5) {
  void * jresult ;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  Xapian::BM25Weight *result = 0 ;
  
  arg1 = (double)jarg1; 
  arg2 = (double)jarg2; 
  arg3 = (double)jarg3; 
  arg4 = (double)jarg4; 
  arg5 = (double)jarg5; 
  {
    try {
      result = (Xapian::BM25Weight *)new Xapian::BM25Weight(arg1,arg2,arg3,arg4,arg5);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_BM25Weight__SWIG_1() {
  void * jresult ;
  Xapian::BM25Weight *result = 0 ;
  
  {
    try {
      result = (Xapian::BM25Weight *)new Xapian::BM25Weight();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_BM25Weight_Name(void * jarg1) {
  char * jresult ;
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::BM25Weight *)jarg1; 
  {
    try {
      result = ((Xapian::BM25Weight const *)arg1)->name();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_BM25Weight_GetSumPart(void * jarg1, unsigned int jarg2, unsigned int jarg3) {
  double jresult ;
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::weight result;
  
  arg1 = (Xapian::BM25Weight *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  arg3 = (Xapian::termcount)jarg3; 
  {
    try {
      result = (Xapian::weight)((Xapian::BM25Weight const *)arg1)->get_sumpart(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_BM25Weight_GetMaxPart(void * jarg1) {
  double jresult ;
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::BM25Weight *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::BM25Weight const *)arg1)->get_maxpart();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_BM25Weight_GetSumExtra(void * jarg1, unsigned int jarg2) {
  double jresult ;
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::weight result;
  
  arg1 = (Xapian::BM25Weight *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  {
    try {
      result = (Xapian::weight)((Xapian::BM25Weight const *)arg1)->get_sumextra(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_BM25Weight_GetMaxExtra(void * jarg1) {
  double jresult ;
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::BM25Weight *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::BM25Weight const *)arg1)->get_maxextra();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_BM25Weight(void * jarg1) {
  Xapian::BM25Weight *arg1 = (Xapian::BM25Weight *) 0 ;
  
  arg1 = (Xapian::BM25Weight *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_TradWeight__SWIG_0(double jarg1) {
  void * jresult ;
  double arg1 ;
  Xapian::TradWeight *result = 0 ;
  
  arg1 = (double)jarg1; 
  {
    try {
      result = (Xapian::TradWeight *)new Xapian::TradWeight(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_TradWeight__SWIG_1() {
  void * jresult ;
  Xapian::TradWeight *result = 0 ;
  
  {
    try {
      result = (Xapian::TradWeight *)new Xapian::TradWeight();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_TradWeight_Name(void * jarg1) {
  char * jresult ;
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  std::string result;
  
  arg1 = (Xapian::TradWeight *)jarg1; 
  {
    try {
      result = ((Xapian::TradWeight const *)arg1)->name();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_TradWeight_GetSumPart(void * jarg1, unsigned int jarg2, unsigned int jarg3) {
  double jresult ;
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::termcount arg3 ;
  Xapian::weight result;
  
  arg1 = (Xapian::TradWeight *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  arg3 = (Xapian::termcount)jarg3; 
  {
    try {
      result = (Xapian::weight)((Xapian::TradWeight const *)arg1)->get_sumpart(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_TradWeight_GetMaxPart(void * jarg1) {
  double jresult ;
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::TradWeight *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::TradWeight const *)arg1)->get_maxpart();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_TradWeight_GetSumExtra(void * jarg1, unsigned int jarg2) {
  double jresult ;
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  Xapian::termcount arg2 ;
  Xapian::weight result;
  
  arg1 = (Xapian::TradWeight *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  {
    try {
      result = (Xapian::weight)((Xapian::TradWeight const *)arg1)->get_sumextra(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_TradWeight_GetMaxExtra(void * jarg1) {
  double jresult ;
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  Xapian::weight result;
  
  arg1 = (Xapian::TradWeight *)jarg1; 
  {
    try {
      result = (Xapian::weight)((Xapian::TradWeight const *)arg1)->get_maxextra();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_TradWeight(void * jarg1) {
  Xapian::TradWeight *arg1 = (Xapian::TradWeight *) 0 ;
  
  arg1 = (Xapian::TradWeight *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_MatchSpy() {
  void * jresult ;
  Xapian::MatchSpy *result = 0 ;
  
  {
    try {
      result = (Xapian::MatchSpy *)new SwigDirector_MatchSpy();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_MatchSpy(void * jarg1) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  
  arg1 = (Xapian::MatchSpy *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_MatchSpy_Apply(void * jarg1, void * jarg2, double jarg3) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  Xapian::Document *arg2 = 0 ;
  Xapian::weight arg3 ;
  
  arg1 = (Xapian::MatchSpy *)jarg1; 
  arg2 = (Xapian::Document *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Document const & type is null", 0);
    return ;
  } 
  arg3 = (Xapian::weight)jarg3; 
  {
    try {
      (arg1)->operator ()((Xapian::Document const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_MatchSpy_Name(void * jarg1) {
  char * jresult ;
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  std::string result;
  
  arg1 = (Xapian::MatchSpy *)jarg1; 
  {
    try {
      result = ((Xapian::MatchSpy const *)arg1)->name();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_MatchSpy_NameSwigExplicitMatchSpy(void * jarg1) {
  char * jresult ;
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  std::string result;
  
  arg1 = (Xapian::MatchSpy *)jarg1; 
  {
    try {
      result = ((Xapian::MatchSpy const *)arg1)->Xapian::MatchSpy::name();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_MatchSpy_MergeResults(void * jarg1, char * jarg2) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::MatchSpy *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      (arg1)->merge_results((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_MatchSpy_MergeResultsSwigExplicitMatchSpy(void * jarg1, char * jarg2) {
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::MatchSpy *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      (arg1)->Xapian::MatchSpy::merge_results((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_MatchSpy_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  std::string result;
  
  arg1 = (Xapian::MatchSpy *)jarg1; 
  {
    try {
      result = ((Xapian::MatchSpy const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_MatchSpy_GetDescriptionSwigExplicitMatchSpy(void * jarg1) {
  char * jresult ;
  Xapian::MatchSpy *arg1 = (Xapian::MatchSpy *) 0 ;
  std::string result;
  
  arg1 = (Xapian::MatchSpy *)jarg1; 
  {
    try {
      result = ((Xapian::MatchSpy const *)arg1)->Xapian::MatchSpy::get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_MatchSpy_director_connect(void *objarg, SwigDirector_MatchSpy::SWIG_Callback0_t callback0, SwigDirector_MatchSpy::SWIG_Callback1_t callback1, SwigDirector_MatchSpy::SWIG_Callback2_t callback2, SwigDirector_MatchSpy::SWIG_Callback3_t callback3) {
  Xapian::MatchSpy *obj = (Xapian::MatchSpy *)objarg;
  SwigDirector_MatchSpy *director = dynamic_cast<SwigDirector_MatchSpy *>(obj);
  if (director) {
    director->swig_connect_director(callback0, callback1, callback2, callback3);
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_ValueCountMatchSpy__SWIG_0() {
  void * jresult ;
  Xapian::ValueCountMatchSpy *result = 0 ;
  
  {
    try {
      result = (Xapian::ValueCountMatchSpy *)new Xapian::ValueCountMatchSpy();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_ValueCountMatchSpy__SWIG_1(unsigned int jarg1) {
  void * jresult ;
  Xapian::valueno arg1 ;
  Xapian::ValueCountMatchSpy *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  {
    try {
      result = (Xapian::ValueCountMatchSpy *)new Xapian::ValueCountMatchSpy(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT unsigned long SWIGSTDCALL CSharp_ValueCountMatchSpy_GetTotal(void * jarg1) {
  unsigned long jresult ;
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  size_t result;
  
  arg1 = (Xapian::ValueCountMatchSpy *)jarg1; 
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->get_total();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (unsigned long)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ValueCountMatchSpy_ValuesBegin(void * jarg1) {
  void * jresult ;
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::ValueCountMatchSpy *)jarg1; 
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_begin();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ValueCountMatchSpy_ValuesEnd(void * jarg1) {
  void * jresult ;
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::ValueCountMatchSpy *)jarg1; 
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->values_end();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ValueCountMatchSpy_TopValuesBegin(void * jarg1, unsigned long jarg2) {
  void * jresult ;
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  size_t arg2 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::ValueCountMatchSpy *)jarg1; 
  arg2 = (size_t)jarg2; 
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_begin(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_ValueCountMatchSpy_TopValuesEnd(void * jarg1, unsigned long jarg2) {
  void * jresult ;
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  size_t arg2 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::ValueCountMatchSpy *)jarg1; 
  arg2 = (size_t)jarg2; 
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->top_values_end(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_ValueCountMatchSpy_Apply(void * jarg1, void * jarg2, double jarg3) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  Xapian::Document *arg2 = 0 ;
  Xapian::weight arg3 ;
  
  arg1 = (Xapian::ValueCountMatchSpy *)jarg1; 
  arg2 = (Xapian::Document *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Document const & type is null", 0);
    return ;
  } 
  arg3 = (Xapian::weight)jarg3; 
  {
    try {
      (arg1)->operator ()((Xapian::Document const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ValueCountMatchSpy_Name(void * jarg1) {
  char * jresult ;
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ValueCountMatchSpy *)jarg1; 
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->name();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_ValueCountMatchSpy_MergeResults(void * jarg1, char * jarg2) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::ValueCountMatchSpy *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      (arg1)->merge_results((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_ValueCountMatchSpy_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  std::string result;
  
  arg1 = (Xapian::ValueCountMatchSpy *)jarg1; 
  {
    try {
      result = ((Xapian::ValueCountMatchSpy const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_ValueCountMatchSpy(void * jarg1) {
  Xapian::ValueCountMatchSpy *arg1 = (Xapian::ValueCountMatchSpy *) 0 ;
  
  arg1 = (Xapian::ValueCountMatchSpy *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Database_AddDatabase(void * jarg1, void * jarg2) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::Database *arg2 = 0 ;
  
  arg1 = (Xapian::Database *)jarg1; 
  arg2 = (Xapian::Database *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Database const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->add_database((Xapian::Database const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Database__SWIG_0() {
  void * jresult ;
  Xapian::Database *result = 0 ;
  
  {
    try {
      result = (Xapian::Database *)new Xapian::Database();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Database__SWIG_1(char * jarg1) {
  void * jresult ;
  std::string *arg1 = 0 ;
  Xapian::Database *result = 0 ;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  {
    try {
      result = (Xapian::Database *)new Xapian::Database((std::string const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_Database(void * jarg1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Database__SWIG_2(void * jarg1) {
  void * jresult ;
  Xapian::Database *arg1 = 0 ;
  Xapian::Database *result = 0 ;
  
  arg1 = (Xapian::Database *)jarg1;
  if (!arg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Database const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::Database *)new Xapian::Database((Xapian::Database const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Database_Reopen(void * jarg1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      (arg1)->reopen();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Database_Close(void * jarg1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      (arg1)->close();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Database_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_PostListBegin(void * jarg1, char * jarg2) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::PostingIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->postlist_begin((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::PostingIterator((const Xapian::PostingIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_PostListEnd(void * jarg1, char * jarg2) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::PostingIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->postlist_end((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::PostingIterator((const Xapian::PostingIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_TermListBegin(void * jarg1, unsigned int jarg2) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->termlist_begin(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_TermListEnd(void * jarg1, unsigned int jarg2) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->termlist_end(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_PositionListBegin(void * jarg1, unsigned int jarg2, char * jarg3) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  std::string *arg3 = 0 ;
  Xapian::PositionIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  if (!jarg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg3_str(jarg3);
  arg3 = &arg3_str; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->positionlist_begin(arg2,(std::string const &)*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::PositionIterator((const Xapian::PositionIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_PositionListEnd(void * jarg1, unsigned int jarg2, char * jarg3) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  std::string *arg3 = 0 ;
  Xapian::PositionIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  if (!jarg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg3_str(jarg3);
  arg3 = &arg3_str; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->positionlist_end(arg2,(std::string const &)*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::PositionIterator((const Xapian::PositionIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_AllTermsBegin__SWIG_0(void * jarg1) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->allterms_begin();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_AllTermsEnd__SWIG_0(void * jarg1) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->allterms_end();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_AllTermsBegin__SWIG_1(void * jarg1, char * jarg2) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->allterms_begin((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_AllTermsEnd__SWIG_1(void * jarg1, char * jarg2) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->allterms_end((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Database_GetDocCount(void * jarg1) {
  unsigned int jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_doccount();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Database_GetLastDocId(void * jarg1) {
  unsigned int jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      result = (Xapian::docid)((Xapian::Database const *)arg1)->get_lastdocid();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_Database_GetAvLength(void * jarg1) {
  double jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::doclength result;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      result = (Xapian::doclength)((Xapian::Database const *)arg1)->get_avlength();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Database_GetTermFreq(void * jarg1, char * jarg2) {
  unsigned int jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_termfreq((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Database_TermExists(void * jarg1, char * jarg2) {
  unsigned int jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  bool result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = (bool)((Xapian::Database const *)arg1)->term_exists((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Database_GetCollectionFreq(void * jarg1, char * jarg2) {
  unsigned int jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_collection_freq((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Database_GetValueFreq(void * jarg1, unsigned int jarg2) {
  unsigned int jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  Xapian::doccount result;
  
  arg1 = (Xapian::Database *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  {
    try {
      result = (Xapian::doccount)((Xapian::Database const *)arg1)->get_value_freq(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Database_GetValueLowerBound(void * jarg1, unsigned int jarg2) {
  char * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  std::string result;
  
  arg1 = (Xapian::Database *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_value_lower_bound(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Database_GetValueUpperBound(void * jarg1, unsigned int jarg2) {
  char * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  std::string result;
  
  arg1 = (Xapian::Database *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_value_upper_bound(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Database_GetDoclengthLowerBound(void * jarg1) {
  unsigned int jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength_lower_bound();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Database_GetDoclengthUpperBound(void * jarg1) {
  unsigned int jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength_upper_bound();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Database_GetWdfUpperBound(void * jarg1, char * jarg2) {
  unsigned int jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_wdf_upper_bound((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_ValuestreamBegin(void * jarg1, unsigned int jarg2) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  Xapian::ValueIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->valuestream_begin(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::ValueIterator((const Xapian::ValueIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_ValuestreamEnd(void * jarg1, unsigned int jarg2) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::valueno arg2 ;
  Xapian::ValueIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->valuestream_end(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::ValueIterator((const Xapian::ValueIterator &)result); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Database_GetDocLength(void * jarg1, unsigned int jarg2) {
  unsigned int jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::Database *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  {
    try {
      result = (Xapian::termcount)((Xapian::Database const *)arg1)->get_doclength(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Database_KeepAlive(void * jarg1) {
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      (arg1)->keep_alive();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_GetDocument(void * jarg1, unsigned int jarg2) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::docid arg2 ;
  Xapian::Document result;
  
  arg1 = (Xapian::Database *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  {
    try {
      result = (arg1)->get_document(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Document((const Xapian::Document &)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Database_GetSpellingSuggestion__SWIG_0(void * jarg1, char * jarg2, unsigned int jarg3) {
  char * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  unsigned int arg3 ;
  std::string result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (unsigned int)jarg3; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_spelling_suggestion((std::string const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Database_GetSpellingSuggestion__SWIG_1(void * jarg1, char * jarg2) {
  char * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_spelling_suggestion((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_SpellingsBegin(void * jarg1) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->spellings_begin();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_SpellingsEnd(void * jarg1) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->spellings_end();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_SynonymsBegin(void * jarg1, char * jarg2) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonyms_begin((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_SynonymsEnd(void * jarg1, char * jarg2) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonyms_end((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_SynonymKeysBegin__SWIG_0(void * jarg1, char * jarg2) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonym_keys_begin((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_SynonymKeysBegin__SWIG_1(void * jarg1) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonym_keys_begin();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_SynonymKeysEnd__SWIG_0(void * jarg1, char * jarg2) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonym_keys_end((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_SynonymKeysEnd__SWIG_1(void * jarg1) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->synonym_keys_end();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Database_GetMetadata(void * jarg1, char * jarg2) {
  char * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  std::string result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_metadata((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_MetadataKeysBegin__SWIG_0(void * jarg1, char * jarg2) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->metadata_keys_begin((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_MetadataKeysBegin__SWIG_1(void * jarg1) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->metadata_keys_begin();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_MetadataKeysEnd__SWIG_0(void * jarg1, char * jarg2) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->metadata_keys_end((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Database_MetadataKeysEnd__SWIG_1(void * jarg1) {
  void * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->metadata_keys_end();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Database_GetUuid(void * jarg1) {
  char * jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      result = ((Xapian::Database const *)arg1)->get_uuid();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Database_HasPositions(void * jarg1) {
  unsigned int jresult ;
  Xapian::Database *arg1 = (Xapian::Database *) 0 ;
  bool result;
  
  arg1 = (Xapian::Database *)jarg1; 
  {
    try {
      result = (bool)((Xapian::Database const *)arg1)->has_positions();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_WritableDatabase(void * jarg1) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_WritableDatabase__SWIG_0() {
  void * jresult ;
  Xapian::WritableDatabase *result = 0 ;
  
  {
    try {
      result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_WritableDatabase__SWIG_1(char * jarg1, int jarg2) {
  void * jresult ;
  std::string *arg1 = 0 ;
  int arg2 ;
  Xapian::WritableDatabase *result = 0 ;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  arg2 = (int)jarg2; 
  {
    try {
      result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((std::string const &)*arg1,arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_WritableDatabase__SWIG_2(void * jarg1) {
  void * jresult ;
  Xapian::WritableDatabase *arg1 = 0 ;
  Xapian::WritableDatabase *result = 0 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1;
  if (!arg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::WritableDatabase const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::WritableDatabase *)new Xapian::WritableDatabase((Xapian::WritableDatabase const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_Commit(void * jarg1) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  {
    try {
      (arg1)->commit();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_Flush(void * jarg1) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  {
    try {
      (arg1)->flush();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_BeginTransaction__SWIG_0(void * jarg1, unsigned int jarg2) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  bool arg2 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  arg2 = jarg2 ? true : false; 
  {
    try {
      (arg1)->begin_transaction(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_BeginTransaction__SWIG_1(void * jarg1) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  {
    try {
      (arg1)->begin_transaction();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_CommitTransaction(void * jarg1) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  {
    try {
      (arg1)->commit_transaction();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_CancelTransaction(void * jarg1) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  {
    try {
      (arg1)->cancel_transaction();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_WritableDatabase_AddDocument(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  Xapian::Document *arg2 = 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  arg2 = (Xapian::Document *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Document const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::docid)(arg1)->add_document((Xapian::Document const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_DeleteDocument__SWIG_0(void * jarg1, unsigned int jarg2) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  Xapian::docid arg2 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  {
    try {
      (arg1)->delete_document(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_ReplaceDocument__SWIG_0(void * jarg1, unsigned int jarg2, void * jarg3) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  Xapian::docid arg2 ;
  Xapian::Document *arg3 = 0 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  arg2 = (Xapian::docid)jarg2; 
  arg3 = (Xapian::Document *)jarg3;
  if (!arg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Document const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->replace_document(arg2,(Xapian::Document const &)*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_DeleteDocument__SWIG_1(void * jarg1, char * jarg2) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      (arg1)->delete_document((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_WritableDatabase_ReplaceDocument__SWIG_1(void * jarg1, char * jarg2, void * jarg3) {
  unsigned int jresult ;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::Document *arg3 = 0 ;
  Xapian::docid result;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (Xapian::Document *)jarg3;
  if (!arg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Document const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::docid)(arg1)->replace_document((std::string const &)*arg2,(Xapian::Document const &)*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_AddSpelling__SWIG_0(void * jarg1, char * jarg2, unsigned int jarg3) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (Xapian::termcount)jarg3; 
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->add_spelling((std::string const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_AddSpelling__SWIG_1(void * jarg1, char * jarg2) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->add_spelling((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_RemoveSpelling__SWIG_0(void * jarg1, char * jarg2, unsigned int jarg3) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (Xapian::termcount)jarg3; 
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->remove_spelling((std::string const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_RemoveSpelling__SWIG_1(void * jarg1, char * jarg2) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->remove_spelling((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_AddSynonym(void * jarg1, char * jarg2, char * jarg3) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  if (!jarg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg3_str(jarg3);
  arg3 = &arg3_str; 
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->add_synonym((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_RemoveSynonym(void * jarg1, char * jarg2, char * jarg3) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  if (!jarg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg3_str(jarg3);
  arg3 = &arg3_str; 
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->remove_synonym((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_ClearSynonyms(void * jarg1, char * jarg2) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      ((Xapian::WritableDatabase const *)arg1)->clear_synonyms((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_WritableDatabase_SetMetadata(void * jarg1, char * jarg2, char * jarg3) {
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  if (!jarg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg3_str(jarg3);
  arg3 = &arg3_str; 
  {
    try {
      (arg1)->set_metadata((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_WritableDatabase_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::WritableDatabase *arg1 = (Xapian::WritableDatabase *) 0 ;
  std::string result;
  
  arg1 = (Xapian::WritableDatabase *)jarg1; 
  {
    try {
      result = ((Xapian::WritableDatabase const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_DB_CREATE_OR_OPEN_get() {
  int jresult ;
  int result;
  
  result = (int)(Xapian::DB_CREATE_OR_OPEN);
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_DB_CREATE_get() {
  int jresult ;
  int result;
  
  result = (int)(Xapian::DB_CREATE);
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_DB_CREATE_OR_OVERWRITE_get() {
  int jresult ;
  int result;
  
  result = (int)(Xapian::DB_CREATE_OR_OVERWRITE);
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_DB_OPEN_get() {
  int jresult ;
  int result;
  
  result = (int)(Xapian::DB_OPEN);
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Auto_OpenStub(char * jarg1) {
  void * jresult ;
  std::string *arg1 = 0 ;
  Xapian::Database result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  {
    try {
      result = Xapian::Auto::open_stub((std::string const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Database((const Xapian::Database &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Brass_Open__SWIG_0(char * jarg1) {
  void * jresult ;
  std::string *arg1 = 0 ;
  Xapian::Database result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  {
    try {
      result = Xapian::Brass::open((std::string const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Database((const Xapian::Database &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Brass_Open__SWIG_1(char * jarg1, int jarg2, int jarg3) {
  void * jresult ;
  std::string *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  Xapian::WritableDatabase result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  {
    try {
      result = Xapian::Brass::open((std::string const &)*arg1,arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::WritableDatabase((const Xapian::WritableDatabase &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Brass_Open__SWIG_2(char * jarg1, int jarg2) {
  void * jresult ;
  std::string *arg1 = 0 ;
  int arg2 ;
  Xapian::WritableDatabase result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  arg2 = (int)jarg2; 
  {
    try {
      result = Xapian::Brass::open((std::string const &)*arg1,arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::WritableDatabase((const Xapian::WritableDatabase &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Chert_Open__SWIG_0(char * jarg1) {
  void * jresult ;
  std::string *arg1 = 0 ;
  Xapian::Database result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  {
    try {
      result = Xapian::Chert::open((std::string const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Database((const Xapian::Database &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Chert_Open__SWIG_1(char * jarg1, int jarg2, int jarg3) {
  void * jresult ;
  std::string *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  Xapian::WritableDatabase result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  {
    try {
      result = Xapian::Chert::open((std::string const &)*arg1,arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::WritableDatabase((const Xapian::WritableDatabase &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Chert_Open__SWIG_2(char * jarg1, int jarg2) {
  void * jresult ;
  std::string *arg1 = 0 ;
  int arg2 ;
  Xapian::WritableDatabase result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  arg2 = (int)jarg2; 
  {
    try {
      result = Xapian::Chert::open((std::string const &)*arg1,arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::WritableDatabase((const Xapian::WritableDatabase &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Flint_Open__SWIG_0(char * jarg1) {
  void * jresult ;
  std::string *arg1 = 0 ;
  Xapian::Database result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  {
    try {
      result = Xapian::Flint::open((std::string const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Database((const Xapian::Database &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Flint_Open__SWIG_1(char * jarg1, int jarg2, int jarg3) {
  void * jresult ;
  std::string *arg1 = 0 ;
  int arg2 ;
  int arg3 ;
  Xapian::WritableDatabase result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  arg2 = (int)jarg2; 
  arg3 = (int)jarg3; 
  {
    try {
      result = Xapian::Flint::open((std::string const &)*arg1,arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::WritableDatabase((const Xapian::WritableDatabase &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Flint_Open__SWIG_2(char * jarg1, int jarg2) {
  void * jresult ;
  std::string *arg1 = 0 ;
  int arg2 ;
  Xapian::WritableDatabase result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  arg2 = (int)jarg2; 
  {
    try {
      result = Xapian::Flint::open((std::string const &)*arg1,arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::WritableDatabase((const Xapian::WritableDatabase &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_InMemory_Open() {
  void * jresult ;
  Xapian::WritableDatabase result;
  
  {
    try {
      result = Xapian::InMemory::open();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::WritableDatabase((const Xapian::WritableDatabase &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Remote_Open__SWIG_0(char * jarg1, unsigned int jarg2, unsigned int jarg3, unsigned int jarg4) {
  void * jresult ;
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  Xapian::timeout arg3 ;
  Xapian::timeout arg4 ;
  Xapian::Database result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  arg2 = (unsigned int)jarg2; 
  arg3 = (Xapian::timeout)jarg3; 
  arg4 = (Xapian::timeout)jarg4; 
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,arg2,arg3,arg4);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Database((const Xapian::Database &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Remote_Open__SWIG_1(char * jarg1, unsigned int jarg2, unsigned int jarg3) {
  void * jresult ;
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  Xapian::timeout arg3 ;
  Xapian::Database result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  arg2 = (unsigned int)jarg2; 
  arg3 = (Xapian::timeout)jarg3; 
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Database((const Xapian::Database &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Remote_Open__SWIG_2(char * jarg1, unsigned int jarg2) {
  void * jresult ;
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  Xapian::Database result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  arg2 = (unsigned int)jarg2; 
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Database((const Xapian::Database &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Remote_OpenWritable__SWIG_0(char * jarg1, unsigned int jarg2, unsigned int jarg3, unsigned int jarg4) {
  void * jresult ;
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  Xapian::timeout arg3 ;
  Xapian::timeout arg4 ;
  Xapian::WritableDatabase result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  arg2 = (unsigned int)jarg2; 
  arg3 = (Xapian::timeout)jarg3; 
  arg4 = (Xapian::timeout)jarg4; 
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,arg3,arg4);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::WritableDatabase((const Xapian::WritableDatabase &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Remote_OpenWritable__SWIG_1(char * jarg1, unsigned int jarg2, unsigned int jarg3) {
  void * jresult ;
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  Xapian::timeout arg3 ;
  Xapian::WritableDatabase result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  arg2 = (unsigned int)jarg2; 
  arg3 = (Xapian::timeout)jarg3; 
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::WritableDatabase((const Xapian::WritableDatabase &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Remote_OpenWritable__SWIG_2(char * jarg1, unsigned int jarg2) {
  void * jresult ;
  std::string *arg1 = 0 ;
  unsigned int arg2 ;
  Xapian::WritableDatabase result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  arg2 = (unsigned int)jarg2; 
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::WritableDatabase((const Xapian::WritableDatabase &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Remote_Open__SWIG_3(char * jarg1, char * jarg2, unsigned int jarg3) {
  void * jresult ;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  Xapian::timeout arg3 ;
  Xapian::Database result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (Xapian::timeout)jarg3; 
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Database((const Xapian::Database &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Remote_Open__SWIG_4(char * jarg1, char * jarg2) {
  void * jresult ;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  Xapian::Database result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = Xapian::Remote::open((std::string const &)*arg1,(std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Database((const Xapian::Database &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Remote_OpenWritable__SWIG_3(char * jarg1, char * jarg2, unsigned int jarg3) {
  void * jresult ;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  Xapian::timeout arg3 ;
  Xapian::WritableDatabase result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (Xapian::timeout)jarg3; 
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::WritableDatabase((const Xapian::WritableDatabase &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Remote_OpenWritable__SWIG_4(char * jarg1, char * jarg2) {
  void * jresult ;
  std::string *arg1 = 0 ;
  std::string *arg2 = 0 ;
  Xapian::WritableDatabase result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = Xapian::Remote::open_writable((std::string const &)*arg1,(std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::WritableDatabase((const Xapian::WritableDatabase &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Query__SWIG_0(void * jarg1) {
  void * jresult ;
  Xapian::Query *arg1 = 0 ;
  Xapian::Query *result = 0 ;
  
  arg1 = (Xapian::Query *)jarg1;
  if (!arg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Query const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::Query *)new Xapian::Query((Xapian::Query const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Query__SWIG_1() {
  void * jresult ;
  Xapian::Query *result = 0 ;
  
  {
    try {
      result = (Xapian::Query *)new Xapian::Query();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_Query(void * jarg1) {
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  
  arg1 = (Xapian::Query *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Query__SWIG_2(char * jarg1, unsigned int jarg2, unsigned int jarg3) {
  void * jresult ;
  std::string *arg1 = 0 ;
  Xapian::termcount arg2 ;
  Xapian::termpos arg3 ;
  Xapian::Query *result = 0 ;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  arg2 = (Xapian::termcount)jarg2; 
  arg3 = (Xapian::termpos)jarg3; 
  {
    try {
      result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1,arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Query__SWIG_3(char * jarg1, unsigned int jarg2) {
  void * jresult ;
  std::string *arg1 = 0 ;
  Xapian::termcount arg2 ;
  Xapian::Query *result = 0 ;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  arg2 = (Xapian::termcount)jarg2; 
  {
    try {
      result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1,arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Query__SWIG_4(char * jarg1) {
  void * jresult ;
  std::string *arg1 = 0 ;
  Xapian::Query *result = 0 ;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  {
    try {
      result = (Xapian::Query *)new Xapian::Query((std::string const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Query__SWIG_5(int jarg1, void * jarg2, void * jarg3) {
  void * jresult ;
  Xapian::Query::op arg1 ;
  Xapian::Query *arg2 = 0 ;
  Xapian::Query *arg3 = 0 ;
  Xapian::Query *result = 0 ;
  
  arg1 = (Xapian::Query::op)jarg1; 
  arg2 = (Xapian::Query *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Query const & type is null", 0);
    return 0;
  } 
  arg3 = (Xapian::Query *)jarg3;
  if (!arg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Query const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(Xapian::Query const &)*arg2,(Xapian::Query const &)*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Query__SWIG_6(int jarg1, char * jarg2, char * jarg3) {
  void * jresult ;
  Xapian::Query::op arg1 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  Xapian::Query *result = 0 ;
  
  arg1 = (Xapian::Query::op)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  if (!jarg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg3_str(jarg3);
  arg3 = &arg3_str; 
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,(std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Query__SWIG_9(int jarg1, void * jarg2, double jarg3) {
  void * jresult ;
  Xapian::Query::op arg1 ;
  Xapian::Query arg2 ;
  double arg3 ;
  Xapian::Query *argp2 ;
  Xapian::Query *result = 0 ;
  
  arg1 = (Xapian::Query::op)jarg1; 
  argp2 = (Xapian::Query *)jarg2; 
  if (!argp2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Attempt to dereference null Xapian::Query", 0);
    return 0;
  }
  arg2 = *argp2; 
  arg3 = (double)jarg3; 
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Query__SWIG_10(int jarg1, unsigned int jarg2, char * jarg3, char * jarg4) {
  void * jresult ;
  Xapian::Query::op arg1 ;
  Xapian::valueno arg2 ;
  std::string *arg3 = 0 ;
  std::string *arg4 = 0 ;
  Xapian::Query *result = 0 ;
  
  arg1 = (Xapian::Query::op)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  if (!jarg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg3_str(jarg3);
  arg3 = &arg3_str; 
  if (!jarg4) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg4_str(jarg4);
  arg4 = &arg4_str; 
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,arg2,(std::string const &)*arg3,(std::string const &)*arg4);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Query__SWIG_11(int jarg1, unsigned int jarg2, char * jarg3) {
  void * jresult ;
  Xapian::Query::op arg1 ;
  Xapian::valueno arg2 ;
  std::string *arg3 = 0 ;
  Xapian::Query *result = 0 ;
  
  arg1 = (Xapian::Query::op)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  if (!jarg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg3_str(jarg3);
  arg3 = &arg3_str; 
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1,arg2,(std::string const &)*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Query__SWIG_12(void * jarg1) {
  void * jresult ;
  Xapian::PostingSource *arg1 = (Xapian::PostingSource *) 0 ;
  Xapian::Query *result = 0 ;
  
  arg1 = (Xapian::PostingSource *)jarg1; 
  {
    try {
      result = (Xapian::Query *)new Xapian::Query(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Query_GetLength(void * jarg1) {
  unsigned int jresult ;
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::Query *)jarg1; 
  {
    try {
      result = (Xapian::termcount)((Xapian::Query const *)arg1)->get_length();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Query_GetTermsBegin(void * jarg1) {
  void * jresult ;
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Query *)jarg1; 
  {
    try {
      result = ((Xapian::Query const *)arg1)->get_terms_begin();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Query_GetTermsEnd(void * jarg1) {
  void * jresult ;
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::Query *)jarg1; 
  {
    try {
      result = ((Xapian::Query const *)arg1)->get_terms_end();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Query_Empty(void * jarg1) {
  unsigned int jresult ;
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  bool result;
  
  arg1 = (Xapian::Query *)jarg1; 
  {
    try {
      result = (bool)((Xapian::Query const *)arg1)->empty();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Query_Serialise(void * jarg1) {
  char * jresult ;
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Query *)jarg1; 
  {
    try {
      result = ((Xapian::Query const *)arg1)->serialise();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Query_Unserialise__SWIG_0(char * jarg1) {
  void * jresult ;
  std::string *arg1 = 0 ;
  Xapian::Query result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  {
    try {
      result = Xapian::Query::unserialise((std::string const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Query((const Xapian::Query &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_Query_Unserialise__SWIG_1(char * jarg1, void * jarg2) {
  void * jresult ;
  std::string *arg1 = 0 ;
  Xapian::Registry *arg2 = 0 ;
  Xapian::Query result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  arg2 = (Xapian::Registry *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Registry const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = Xapian::Query::unserialise((std::string const &)*arg1,(Xapian::Registry const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Query((const Xapian::Query &)result); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Query_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::Query *arg1 = (Xapian::Query *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Query *)jarg1; 
  {
    try {
      result = ((Xapian::Query const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Query__SWIG_13(int jarg1, void * jarg2, unsigned int jarg3) {
  void * jresult ;
  Xapian::Query::op arg1 ;
  std::vector< std::string > *arg2 = 0 ;
  Xapian::termcount arg3 ;
  Xapian::Query *result = 0 ;
  
  arg1 = (Xapian::Query::op)jarg1; 
  arg2 = (std::vector< std::string > *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "std::vector< std::string > const & type is null", 0);
    return 0;
  } 
  arg3 = (Xapian::termcount)jarg3; 
  {
    try {
      result = (Xapian::Query *)new_Xapian_Query__SWIG_13(arg1,(std::vector< std::string > const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Query__SWIG_14(int jarg1, void * jarg2) {
  void * jresult ;
  Xapian::Query::op arg1 ;
  std::vector< std::string > *arg2 = 0 ;
  Xapian::Query *result = 0 ;
  
  arg1 = (Xapian::Query::op)jarg1; 
  arg2 = (std::vector< std::string > *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "std::vector< std::string > const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::Query *)new_Xapian_Query__SWIG_13(arg1,(std::vector< std::string > const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Query__SWIG_15(int jarg1, void * jarg2, unsigned int jarg3) {
  void * jresult ;
  Xapian::Query::op arg1 ;
  std::vector< Xapian::Query > *arg2 = 0 ;
  Xapian::termcount arg3 ;
  Xapian::Query *result = 0 ;
  
  arg1 = (Xapian::Query::op)jarg1; 
  arg2 = (std::vector< Xapian::Query > *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "std::vector< Xapian::Query > const & type is null", 0);
    return 0;
  } 
  arg3 = (Xapian::termcount)jarg3; 
  {
    try {
      result = (Xapian::Query *)new_Xapian_Query__SWIG_15(arg1,(std::vector< Xapian::Query > const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Query__SWIG_16(int jarg1, void * jarg2) {
  void * jresult ;
  Xapian::Query::op arg1 ;
  std::vector< Xapian::Query > *arg2 = 0 ;
  Xapian::Query *result = 0 ;
  
  arg1 = (Xapian::Query::op)jarg1; 
  arg2 = (std::vector< Xapian::Query > *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "std::vector< Xapian::Query > const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::Query *)new_Xapian_Query__SWIG_15(arg1,(std::vector< Xapian::Query > const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_Stopper_Apply(void * jarg1, char * jarg2) {
  unsigned int jresult ;
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  std::string *arg2 = 0 ;
  bool result;
  
  arg1 = (Xapian::Stopper *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = (bool)((Xapian::Stopper const *)arg1)->operator ()((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_Stopper(void * jarg1) {
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  
  arg1 = (Xapian::Stopper *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Stopper_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Stopper *)jarg1; 
  {
    try {
      result = ((Xapian::Stopper const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Stopper_GetDescriptionSwigExplicitStopper(void * jarg1) {
  char * jresult ;
  Xapian::Stopper *arg1 = (Xapian::Stopper *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Stopper *)jarg1; 
  {
    try {
      result = ((Xapian::Stopper const *)arg1)->Xapian::Stopper::get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Stopper() {
  void * jresult ;
  Xapian::Stopper *result = 0 ;
  
  {
    try {
      result = (Xapian::Stopper *)new SwigDirector_Stopper();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Stopper_director_connect(void *objarg, SwigDirector_Stopper::SWIG_Callback0_t callback0, SwigDirector_Stopper::SWIG_Callback1_t callback1) {
  Xapian::Stopper *obj = (Xapian::Stopper *)objarg;
  SwigDirector_Stopper *director = dynamic_cast<SwigDirector_Stopper *>(obj);
  if (director) {
    director->swig_connect_director(callback0, callback1);
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_SimpleStopper() {
  void * jresult ;
  Xapian::SimpleStopper *result = 0 ;
  
  {
    try {
      result = (Xapian::SimpleStopper *)new Xapian::SimpleStopper();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_SimpleStopper_Add(void * jarg1, char * jarg2) {
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::SimpleStopper *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      (arg1)->add((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_SimpleStopper_Apply(void * jarg1, char * jarg2) {
  unsigned int jresult ;
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  std::string *arg2 = 0 ;
  bool result;
  
  arg1 = (Xapian::SimpleStopper *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = (bool)((Xapian::SimpleStopper const *)arg1)->operator ()((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_SimpleStopper_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  std::string result;
  
  arg1 = (Xapian::SimpleStopper *)jarg1; 
  {
    try {
      result = ((Xapian::SimpleStopper const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_SimpleStopper(void * jarg1) {
  Xapian::SimpleStopper *arg1 = (Xapian::SimpleStopper *) 0 ;
  
  arg1 = (Xapian::SimpleStopper *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_ValueRangeProcessor(void * jarg1) {
  Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
  
  arg1 = (Xapian::ValueRangeProcessor *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ValueRangeProcessor_Apply(void * jarg1, void * jarg2, void * jarg3) {
  unsigned int jresult ;
  Xapian::ValueRangeProcessor *arg1 = (Xapian::ValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  Xapian::valueno result;
  
  arg1 = (Xapian::ValueRangeProcessor *)jarg1; 
  arg2 = (std::string *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "std::string & type is null", 0);
    return 0;
  } 
  arg3 = (std::string *)jarg3;
  if (!arg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "std::string & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_ValueRangeProcessor() {
  void * jresult ;
  Xapian::ValueRangeProcessor *result = 0 ;
  
  {
    try {
      result = (Xapian::ValueRangeProcessor *)new SwigDirector_ValueRangeProcessor();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_ValueRangeProcessor_director_connect(void *objarg, SwigDirector_ValueRangeProcessor::SWIG_Callback0_t callback0) {
  Xapian::ValueRangeProcessor *obj = (Xapian::ValueRangeProcessor *)objarg;
  SwigDirector_ValueRangeProcessor *director = dynamic_cast<SwigDirector_ValueRangeProcessor *>(obj);
  if (director) {
    director->swig_connect_director(callback0);
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_StringValueRangeProcessor__SWIG_0(unsigned int jarg1) {
  void * jresult ;
  Xapian::valueno arg1 ;
  Xapian::StringValueRangeProcessor *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  {
    try {
      result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_StringValueRangeProcessor__SWIG_1(unsigned int jarg1, char * jarg2, unsigned int jarg3) {
  void * jresult ;
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  bool arg3 ;
  Xapian::StringValueRangeProcessor *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = jarg3 ? true : false; 
  {
    try {
      result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_StringValueRangeProcessor__SWIG_2(unsigned int jarg1, char * jarg2) {
  void * jresult ;
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  Xapian::StringValueRangeProcessor *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = (Xapian::StringValueRangeProcessor *)new Xapian::StringValueRangeProcessor(arg1,(std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_StringValueRangeProcessor_Apply(void * jarg1, void * jarg2, void * jarg3) {
  unsigned int jresult ;
  Xapian::StringValueRangeProcessor *arg1 = (Xapian::StringValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  Xapian::valueno result;
  
  arg1 = (Xapian::StringValueRangeProcessor *)jarg1; 
  arg2 = (std::string *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "std::string & type is null", 0);
    return 0;
  } 
  arg3 = (std::string *)jarg3;
  if (!arg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "std::string & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_StringValueRangeProcessor(void * jarg1) {
  Xapian::StringValueRangeProcessor *arg1 = (Xapian::StringValueRangeProcessor *) 0 ;
  
  arg1 = (Xapian::StringValueRangeProcessor *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_DateValueRangeProcessor__SWIG_0(unsigned int jarg1, unsigned int jarg2, int jarg3) {
  void * jresult ;
  Xapian::valueno arg1 ;
  bool arg2 ;
  int arg3 ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  arg2 = jarg2 ? true : false; 
  arg3 = (int)jarg3; 
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_DateValueRangeProcessor__SWIG_1(unsigned int jarg1, unsigned int jarg2) {
  void * jresult ;
  Xapian::valueno arg1 ;
  bool arg2 ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  arg2 = jarg2 ? true : false; 
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_DateValueRangeProcessor__SWIG_2(unsigned int jarg1) {
  void * jresult ;
  Xapian::valueno arg1 ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_DateValueRangeProcessor__SWIG_3(unsigned int jarg1, char * jarg2, unsigned int jarg3, unsigned int jarg4, int jarg5) {
  void * jresult ;
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  bool arg3 ;
  bool arg4 ;
  int arg5 ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = jarg3 ? true : false; 
  arg4 = jarg4 ? true : false; 
  arg5 = (int)jarg5; 
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4,arg5);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_DateValueRangeProcessor__SWIG_4(unsigned int jarg1, char * jarg2, unsigned int jarg3, unsigned int jarg4) {
  void * jresult ;
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  bool arg3 ;
  bool arg4 ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = jarg3 ? true : false; 
  arg4 = jarg4 ? true : false; 
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3,arg4);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_DateValueRangeProcessor__SWIG_5(unsigned int jarg1, char * jarg2, unsigned int jarg3) {
  void * jresult ;
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  bool arg3 ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = jarg3 ? true : false; 
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_DateValueRangeProcessor__SWIG_6(unsigned int jarg1, char * jarg2) {
  void * jresult ;
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  Xapian::DateValueRangeProcessor *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = (Xapian::DateValueRangeProcessor *)new Xapian::DateValueRangeProcessor(arg1,(std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_DateValueRangeProcessor_Apply(void * jarg1, void * jarg2, void * jarg3) {
  unsigned int jresult ;
  Xapian::DateValueRangeProcessor *arg1 = (Xapian::DateValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  Xapian::valueno result;
  
  arg1 = (Xapian::DateValueRangeProcessor *)jarg1; 
  arg2 = (std::string *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "std::string & type is null", 0);
    return 0;
  } 
  arg3 = (std::string *)jarg3;
  if (!arg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "std::string & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_DateValueRangeProcessor(void * jarg1) {
  Xapian::DateValueRangeProcessor *arg1 = (Xapian::DateValueRangeProcessor *) 0 ;
  
  arg1 = (Xapian::DateValueRangeProcessor *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_NumberValueRangeProcessor__SWIG_0(unsigned int jarg1) {
  void * jresult ;
  Xapian::valueno arg1 ;
  Xapian::NumberValueRangeProcessor *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  {
    try {
      result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_NumberValueRangeProcessor__SWIG_1(unsigned int jarg1, char * jarg2, unsigned int jarg3) {
  void * jresult ;
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  bool arg3 ;
  Xapian::NumberValueRangeProcessor *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = jarg3 ? true : false; 
  {
    try {
      result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1,(std::string const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_NumberValueRangeProcessor__SWIG_2(unsigned int jarg1, char * jarg2) {
  void * jresult ;
  Xapian::valueno arg1 ;
  std::string *arg2 = 0 ;
  Xapian::NumberValueRangeProcessor *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = (Xapian::NumberValueRangeProcessor *)new Xapian::NumberValueRangeProcessor(arg1,(std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_NumberValueRangeProcessor_Apply(void * jarg1, void * jarg2, void * jarg3) {
  unsigned int jresult ;
  Xapian::NumberValueRangeProcessor *arg1 = (Xapian::NumberValueRangeProcessor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  Xapian::valueno result;
  
  arg1 = (Xapian::NumberValueRangeProcessor *)jarg1; 
  arg2 = (std::string *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "std::string & type is null", 0);
    return 0;
  } 
  arg3 = (std::string *)jarg3;
  if (!arg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "std::string & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (Xapian::valueno)(arg1)->operator ()(*arg2,*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_NumberValueRangeProcessor(void * jarg1) {
  Xapian::NumberValueRangeProcessor *arg1 = (Xapian::NumberValueRangeProcessor *) 0 ;
  
  arg1 = (Xapian::NumberValueRangeProcessor *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_QueryParser() {
  void * jresult ;
  Xapian::QueryParser *result = 0 ;
  
  {
    try {
      result = (Xapian::QueryParser *)new Xapian::QueryParser();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_QueryParser(void * jarg1) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_QueryParser_SetStemmer(void * jarg1, void * jarg2) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Stem *arg2 = 0 ;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  arg2 = (Xapian::Stem *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Stem const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->set_stemmer((Xapian::Stem const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_QueryParser_SetStemmingStrategy(void * jarg1, int jarg2) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::QueryParser::stem_strategy arg2 ;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  arg2 = (Xapian::QueryParser::stem_strategy)jarg2; 
  {
    try {
      (arg1)->set_stemming_strategy(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_QueryParser_SetStopper__SWIG_0(void * jarg1, void * jarg2) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Stopper *arg2 = (Xapian::Stopper *) 0 ;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  arg2 = (Xapian::Stopper *)jarg2; 
  {
    try {
      (arg1)->set_stopper((Xapian::Stopper const *)arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_QueryParser_SetStopper__SWIG_1(void * jarg1) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  {
    try {
      (arg1)->set_stopper();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_QueryParser_SetDefaultOp(void * jarg1, int jarg2) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Query::op arg2 ;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  arg2 = (Xapian::Query::op)jarg2; 
  {
    try {
      (arg1)->set_default_op(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_QueryParser_GetDefaultOp(void * jarg1) {
  int jresult ;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Query::op result;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  {
    try {
      result = (Xapian::Query::op)((Xapian::QueryParser const *)arg1)->get_default_op();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_QueryParser_SetDatabase(void * jarg1, void * jarg2) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::Database *arg2 = 0 ;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  arg2 = (Xapian::Database *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Database const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->set_database((Xapian::Database const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_QueryParser_SetMaxWildcardExpansion(void * jarg1, unsigned int jarg2) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::termcount arg2 ;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  {
    try {
      (arg1)->set_max_wildcard_expansion(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_QueryParser_ParseQuery__SWIG_0(void * jarg1, char * jarg2, unsigned int jarg3, char * jarg4) {
  void * jresult ;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  unsigned int arg3 ;
  std::string *arg4 = 0 ;
  Xapian::Query result;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (unsigned int)jarg3; 
  if (!jarg4) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg4_str(jarg4);
  arg4 = &arg4_str; 
  {
    try {
      result = (arg1)->parse_query((std::string const &)*arg2,arg3,(std::string const &)*arg4);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Query((const Xapian::Query &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_QueryParser_ParseQuery__SWIG_1(void * jarg1, char * jarg2, unsigned int jarg3) {
  void * jresult ;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  unsigned int arg3 ;
  Xapian::Query result;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (unsigned int)jarg3; 
  {
    try {
      result = (arg1)->parse_query((std::string const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Query((const Xapian::Query &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_QueryParser_ParseQuery__SWIG_2(void * jarg1, char * jarg2) {
  void * jresult ;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::Query result;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = (arg1)->parse_query((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::Query((const Xapian::Query &)result); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_QueryParser_AddPrefix(void * jarg1, char * jarg2, char * jarg3) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  if (!jarg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg3_str(jarg3);
  arg3 = &arg3_str; 
  {
    try {
      (arg1)->add_prefix((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_QueryParser_AddBooleanPrefix__SWIG_0(void * jarg1, char * jarg2, char * jarg3, unsigned int jarg4) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  bool arg4 ;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  if (!jarg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg3_str(jarg3);
  arg3 = &arg3_str; 
  arg4 = jarg4 ? true : false; 
  {
    try {
      (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3,arg4);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_QueryParser_AddBooleanPrefix__SWIG_1(void * jarg1, char * jarg2, char * jarg3) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  if (!jarg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg3_str(jarg3);
  arg3 = &arg3_str; 
  {
    try {
      (arg1)->add_boolean_prefix((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_QueryParser_StopListBegin(void * jarg1) {
  void * jresult ;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->stoplist_begin();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_QueryParser_StopListEnd(void * jarg1) {
  void * jresult ;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->stoplist_end();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_QueryParser_UnstemBegin(void * jarg1, char * jarg2) {
  void * jresult ;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->unstem_begin((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_QueryParser_UnstemEnd(void * jarg1, char * jarg2) {
  void * jresult ;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::TermIterator result;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->unstem_end((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = new Xapian::TermIterator((const Xapian::TermIterator &)result); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_QueryParser_AddValuerangeprocessor(void * jarg1, void * jarg2) {
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  Xapian::ValueRangeProcessor *arg2 = (Xapian::ValueRangeProcessor *) 0 ;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  arg2 = (Xapian::ValueRangeProcessor *)jarg2; 
  {
    try {
      (arg1)->add_valuerangeprocessor(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_QueryParser_GetCorrectedQueryString(void * jarg1) {
  char * jresult ;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string result;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->get_corrected_query_string();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_QueryParser_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::QueryParser *arg1 = (Xapian::QueryParser *) 0 ;
  std::string result;
  
  arg1 = (Xapian::QueryParser *)jarg1; 
  {
    try {
      result = ((Xapian::QueryParser const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_SortableSerialise(double jarg1) {
  char * jresult ;
  double arg1 ;
  std::string result;
  
  arg1 = (double)jarg1; 
  {
    try {
      result = Xapian::sortable_serialise(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT double SWIGSTDCALL CSharp_SortableUnserialise(char * jarg1) {
  double jresult ;
  std::string *arg1 = 0 ;
  double result;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  {
    try {
      result = (double)Xapian::sortable_unserialise((std::string const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_StemImplementation(void * jarg1) {
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  
  arg1 = (Xapian::StemImplementation *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_StemImplementation_Apply(void * jarg1, char * jarg2) {
  char * jresult ;
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  std::string *arg2 = 0 ;
  std::string result;
  
  arg1 = (Xapian::StemImplementation *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = (arg1)->operator ()((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_StemImplementation_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  std::string result;
  
  arg1 = (Xapian::StemImplementation *)jarg1; 
  {
    try {
      result = ((Xapian::StemImplementation const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_StemImplementation() {
  void * jresult ;
  Xapian::StemImplementation *result = 0 ;
  
  {
    try {
      result = (Xapian::StemImplementation *)new SwigDirector_StemImplementation();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_StemImplementation_director_connect(void *objarg, SwigDirector_StemImplementation::SWIG_Callback0_t callback0, SwigDirector_StemImplementation::SWIG_Callback1_t callback1) {
  Xapian::StemImplementation *obj = (Xapian::StemImplementation *)objarg;
  SwigDirector_StemImplementation *director = dynamic_cast<SwigDirector_StemImplementation *>(obj);
  if (director) {
    director->swig_connect_director(callback0, callback1);
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Stem__SWIG_0(char * jarg1) {
  void * jresult ;
  std::string *arg1 = 0 ;
  Xapian::Stem *result = 0 ;
  
  if (!jarg1) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg1_str(jarg1);
  arg1 = &arg1_str; 
  {
    try {
      result = (Xapian::Stem *)new Xapian::Stem((std::string const &)*arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Stem__SWIG_1(void * jarg1) {
  void * jresult ;
  Xapian::StemImplementation *arg1 = (Xapian::StemImplementation *) 0 ;
  Xapian::Stem *result = 0 ;
  
  arg1 = (Xapian::StemImplementation *)jarg1; 
  {
    try {
      result = (Xapian::Stem *)new Xapian::Stem(arg1);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_Stem(void * jarg1) {
  Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
  
  arg1 = (Xapian::Stem *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Stem_Apply(void * jarg1, char * jarg2) {
  char * jresult ;
  Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
  std::string *arg2 = 0 ;
  std::string result;
  
  arg1 = (Xapian::Stem *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      result = ((Xapian::Stem const *)arg1)->operator ()((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Stem_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::Stem *arg1 = (Xapian::Stem *) 0 ;
  std::string result;
  
  arg1 = (Xapian::Stem *)jarg1; 
  {
    try {
      result = ((Xapian::Stem const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Stem_GetAvailableLanguages() {
  char * jresult ;
  std::string result;
  
  {
    try {
      result = Xapian::Stem::get_available_languages();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_TermGenerator() {
  void * jresult ;
  Xapian::TermGenerator *result = 0 ;
  
  {
    try {
      result = (Xapian::TermGenerator *)new Xapian::TermGenerator();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_TermGenerator(void * jarg1) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_TermGenerator_SetStemmer(void * jarg1, void * jarg2) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::Stem *arg2 = 0 ;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  arg2 = (Xapian::Stem *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Stem const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->set_stemmer((Xapian::Stem const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_TermGenerator_SetStopper__SWIG_0(void * jarg1, void * jarg2) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::Stopper *arg2 = (Xapian::Stopper *) 0 ;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  arg2 = (Xapian::Stopper *)jarg2; 
  {
    try {
      (arg1)->set_stopper((Xapian::Stopper const *)arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_TermGenerator_SetStopper__SWIG_1(void * jarg1) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  {
    try {
      (arg1)->set_stopper();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_TermGenerator_SetDocument(void * jarg1, void * jarg2) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::Document *arg2 = 0 ;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  arg2 = (Xapian::Document *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Document const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->set_document((Xapian::Document const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_TermGenerator_GetDocument(void * jarg1) {
  void * jresult ;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::Document *result = 0 ;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  {
    try {
      result = (Xapian::Document *) &((Xapian::TermGenerator const *)arg1)->get_document();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_TermGenerator_SetDatabase(void * jarg1, void * jarg2) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::WritableDatabase *arg2 = 0 ;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  arg2 = (Xapian::WritableDatabase *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::WritableDatabase const & type is null", 0);
    return ;
  } 
  {
    try {
      (arg1)->set_database((Xapian::WritableDatabase const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT int SWIGSTDCALL CSharp_TermGenerator_SetFlags__SWIG_0(void * jarg1, int jarg2, int jarg3) {
  int jresult ;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::TermGenerator::flags arg2 ;
  Xapian::TermGenerator::flags arg3 ;
  Xapian::TermGenerator::flags result;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  arg2 = (Xapian::TermGenerator::flags)jarg2; 
  arg3 = (Xapian::TermGenerator::flags)jarg3; 
  {
    try {
      result = (Xapian::TermGenerator::flags)(arg1)->set_flags(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT int SWIGSTDCALL CSharp_TermGenerator_SetFlags__SWIG_1(void * jarg1, int jarg2) {
  int jresult ;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::TermGenerator::flags arg2 ;
  Xapian::TermGenerator::flags result;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  arg2 = (Xapian::TermGenerator::flags)jarg2; 
  {
    try {
      result = (Xapian::TermGenerator::flags)(arg1)->set_flags(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_TermGenerator_IndexText__SWIG_0(void * jarg1, char * jarg2, unsigned int jarg3, char * jarg4) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  std::string *arg4 = 0 ;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (Xapian::termcount)jarg3; 
  if (!jarg4) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg4_str(jarg4);
  arg4 = &arg4_str; 
  {
    try {
      (arg1)->index_text((std::string const &)*arg2,arg3,(std::string const &)*arg4);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_TermGenerator_IndexText__SWIG_1(void * jarg1, char * jarg2, unsigned int jarg3) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (Xapian::termcount)jarg3; 
  {
    try {
      (arg1)->index_text((std::string const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_TermGenerator_IndexText__SWIG_2(void * jarg1, char * jarg2) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      (arg1)->index_text((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_TermGenerator_IndexTextWithoutPositions__SWIG_0(void * jarg1, char * jarg2, unsigned int jarg3, char * jarg4) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  std::string *arg4 = 0 ;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (Xapian::termcount)jarg3; 
  if (!jarg4) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg4_str(jarg4);
  arg4 = &arg4_str; 
  {
    try {
      (arg1)->index_text_without_positions((std::string const &)*arg2,arg3,(std::string const &)*arg4);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_TermGenerator_IndexTextWithoutPositions__SWIG_1(void * jarg1, char * jarg2, unsigned int jarg3) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  Xapian::termcount arg3 ;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (Xapian::termcount)jarg3; 
  {
    try {
      (arg1)->index_text_without_positions((std::string const &)*arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_TermGenerator_IndexTextWithoutPositions__SWIG_2(void * jarg1, char * jarg2) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      (arg1)->index_text_without_positions((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_TermGenerator_IncreaseTermpos__SWIG_0(void * jarg1, unsigned int jarg2) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::termcount arg2 ;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  {
    try {
      (arg1)->increase_termpos(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_TermGenerator_IncreaseTermpos__SWIG_1(void * jarg1) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  {
    try {
      (arg1)->increase_termpos();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_TermGenerator_GetTermPos(void * jarg1) {
  unsigned int jresult ;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::termcount result;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  {
    try {
      result = (Xapian::termcount)((Xapian::TermGenerator const *)arg1)->get_termpos();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_TermGenerator_SetTermpos(void * jarg1, unsigned int jarg2) {
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  Xapian::termcount arg2 ;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  arg2 = (Xapian::termcount)jarg2; 
  {
    try {
      (arg1)->set_termpos(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_TermGenerator_GetDescription(void * jarg1) {
  char * jresult ;
  Xapian::TermGenerator *arg1 = (Xapian::TermGenerator *) 0 ;
  std::string result;
  
  arg1 = (Xapian::TermGenerator *)jarg1; 
  {
    try {
      result = ((Xapian::TermGenerator const *)arg1)->get_description();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_KeyMaker_Apply(void * jarg1, void * jarg2) {
  char * jresult ;
  Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
  Xapian::Document *arg2 = 0 ;
  std::string result;
  
  arg1 = (Xapian::KeyMaker *)jarg1; 
  arg2 = (Xapian::Document *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Document const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = ((Xapian::KeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_KeyMaker(void * jarg1) {
  Xapian::KeyMaker *arg1 = (Xapian::KeyMaker *) 0 ;
  
  arg1 = (Xapian::KeyMaker *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_KeyMaker() {
  void * jresult ;
  Xapian::KeyMaker *result = 0 ;
  
  {
    try {
      result = (Xapian::KeyMaker *)new SwigDirector_KeyMaker();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_KeyMaker_director_connect(void *objarg, SwigDirector_KeyMaker::SWIG_Callback0_t callback0) {
  Xapian::KeyMaker *obj = (Xapian::KeyMaker *)objarg;
  SwigDirector_KeyMaker *director = dynamic_cast<SwigDirector_KeyMaker *>(obj);
  if (director) {
    director->swig_connect_director(callback0);
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_MultiValueKeyMaker() {
  void * jresult ;
  Xapian::MultiValueKeyMaker *result = 0 ;
  
  {
    try {
      result = (Xapian::MultiValueKeyMaker *)new Xapian::MultiValueKeyMaker();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_MultiValueKeyMaker_Apply(void * jarg1, void * jarg2) {
  char * jresult ;
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  Xapian::Document *arg2 = 0 ;
  std::string result;
  
  arg1 = (Xapian::MultiValueKeyMaker *)jarg1; 
  arg2 = (Xapian::Document *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Document const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = ((Xapian::MultiValueKeyMaker const *)arg1)->operator ()((Xapian::Document const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_MultiValueKeyMaker_AddValue__SWIG_0(void * jarg1, unsigned int jarg2, unsigned int jarg3) {
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  
  arg1 = (Xapian::MultiValueKeyMaker *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  arg3 = jarg3 ? true : false; 
  {
    try {
      (arg1)->add_value(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_MultiValueKeyMaker_AddValue__SWIG_1(void * jarg1, unsigned int jarg2) {
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  Xapian::valueno arg2 ;
  
  arg1 = (Xapian::MultiValueKeyMaker *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  {
    try {
      (arg1)->add_value(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_MultiValueKeyMaker(void * jarg1) {
  Xapian::MultiValueKeyMaker *arg1 = (Xapian::MultiValueKeyMaker *) 0 ;
  
  arg1 = (Xapian::MultiValueKeyMaker *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_Sorter(void * jarg1) {
  Xapian::Sorter *arg1 = (Xapian::Sorter *) 0 ;
  
  arg1 = (Xapian::Sorter *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_MultiValueSorter() {
  void * jresult ;
  Xapian::MultiValueSorter *result = 0 ;
  
  {
    try {
      result = (Xapian::MultiValueSorter *)new Xapian::MultiValueSorter();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_MultiValueSorter_Apply(void * jarg1, void * jarg2) {
  char * jresult ;
  Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ;
  Xapian::Document *arg2 = 0 ;
  std::string result;
  
  arg1 = (Xapian::MultiValueSorter *)jarg1; 
  arg2 = (Xapian::Document *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Document const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = ((Xapian::MultiValueSorter const *)arg1)->operator ()((Xapian::Document const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_MultiValueSorter_Add__SWIG_0(void * jarg1, unsigned int jarg2, unsigned int jarg3) {
  Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ;
  Xapian::valueno arg2 ;
  bool arg3 ;
  
  arg1 = (Xapian::MultiValueSorter *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  arg3 = jarg3 ? true : false; 
  {
    try {
      (arg1)->add(arg2,arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_MultiValueSorter_Add__SWIG_1(void * jarg1, unsigned int jarg2) {
  Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ;
  Xapian::valueno arg2 ;
  
  arg1 = (Xapian::MultiValueSorter *)jarg1; 
  arg2 = (Xapian::valueno)jarg2; 
  {
    try {
      (arg1)->add(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_MultiValueSorter(void * jarg1) {
  Xapian::MultiValueSorter *arg1 = (Xapian::MultiValueSorter *) 0 ;
  
  arg1 = (Xapian::MultiValueSorter *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_ValueSetMatchDecider(unsigned int jarg1, unsigned int jarg2) {
  void * jresult ;
  Xapian::valueno arg1 ;
  bool arg2 ;
  Xapian::ValueSetMatchDecider *result = 0 ;
  
  arg1 = (Xapian::valueno)jarg1; 
  arg2 = jarg2 ? true : false; 
  {
    try {
      result = (Xapian::ValueSetMatchDecider *)new Xapian::ValueSetMatchDecider(arg1,arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_ValueSetMatchDecider_AddValue(void * jarg1, char * jarg2) {
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::ValueSetMatchDecider *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      (arg1)->add_value((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_ValueSetMatchDecider_RemoveValue(void * jarg1, char * jarg2) {
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::ValueSetMatchDecider *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      (arg1)->remove_value((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT unsigned int SWIGSTDCALL CSharp_ValueSetMatchDecider_Apply(void * jarg1, void * jarg2) {
  unsigned int jresult ;
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  Xapian::Document *arg2 = 0 ;
  bool result;
  
  arg1 = (Xapian::ValueSetMatchDecider *)jarg1; 
  arg2 = (Xapian::Document *)jarg2;
  if (!arg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "Xapian::Document const & type is null", 0);
    return 0;
  } 
  {
    try {
      result = (bool)((Xapian::ValueSetMatchDecider const *)arg1)->operator ()((Xapian::Document const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_ValueSetMatchDecider(void * jarg1) {
  Xapian::ValueSetMatchDecider *arg1 = (Xapian::ValueSetMatchDecider *) 0 ;
  
  arg1 = (Xapian::ValueSetMatchDecider *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void * SWIGSTDCALL CSharp_new_Compactor() {
  void * jresult ;
  Xapian::Compactor *result = 0 ;
  
  {
    try {
      result = (Xapian::Compactor *)new SwigDirector_Compactor();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = (void *)result; 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_delete_Compactor(void * jarg1) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  
  arg1 = (Xapian::Compactor *)jarg1; 
  {
    try {
      delete arg1;
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Compactor_SetBlockSize(void * jarg1, unsigned long jarg2) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  size_t arg2 ;
  
  arg1 = (Xapian::Compactor *)jarg1; 
  arg2 = (size_t)jarg2; 
  {
    try {
      (arg1)->set_block_size(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Compactor_SetRenumber(void * jarg1, unsigned int jarg2) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  bool arg2 ;
  
  arg1 = (Xapian::Compactor *)jarg1; 
  arg2 = jarg2 ? true : false; 
  {
    try {
      (arg1)->set_renumber(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Compactor_SetMultipass(void * jarg1, unsigned int jarg2) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  bool arg2 ;
  
  arg1 = (Xapian::Compactor *)jarg1; 
  arg2 = jarg2 ? true : false; 
  {
    try {
      (arg1)->set_multipass(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Compactor_SetCompactionLevel(void * jarg1, int jarg2) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  Xapian::Compactor::compaction_level arg2 ;
  
  arg1 = (Xapian::Compactor *)jarg1; 
  arg2 = (Xapian::Compactor::compaction_level)jarg2; 
  {
    try {
      (arg1)->set_compaction_level(arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Compactor_SetDestdir(void * jarg1, char * jarg2) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::Compactor *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      (arg1)->set_destdir((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Compactor_AddSource(void * jarg1, char * jarg2) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  
  arg1 = (Xapian::Compactor *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  {
    try {
      (arg1)->add_source((std::string const &)*arg2);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Compactor_Compact(void * jarg1) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  
  arg1 = (Xapian::Compactor *)jarg1; 
  {
    try {
      (arg1)->compact();
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Compactor_SetStatus(void * jarg1, char * jarg2, char * jarg3) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  
  arg1 = (Xapian::Compactor *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  if (!jarg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg3_str(jarg3);
  arg3 = &arg3_str; 
  {
    try {
      (arg1)->set_status((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT void SWIGSTDCALL CSharp_Compactor_SetStatusSwigExplicitCompactor(void * jarg1, char * jarg2, char * jarg3) {
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  std::string *arg3 = 0 ;
  
  arg1 = (Xapian::Compactor *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  if (!jarg3) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return ;
  }
  std::string arg3_str(jarg3);
  arg3 = &arg3_str; 
  {
    try {
      (arg1)->Xapian::Compactor::set_status((std::string const &)*arg2,(std::string const &)*arg3);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Compactor_ResolveDuplicateMetadata(void * jarg1, char * jarg2, unsigned long jarg3, void * jarg4) {
  char * jresult ;
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  size_t arg3 ;
  std::string *arg4 ;
  std::string result;
  
  arg1 = (Xapian::Compactor *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (size_t)jarg3; 
  arg4 = (std::string *)jarg4; 
  {
    try {
      result = (arg1)->resolve_duplicate_metadata((std::string const &)*arg2,arg3,(std::string const (*))arg4);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT char * SWIGSTDCALL CSharp_Compactor_ResolveDuplicateMetadataSwigExplicitCompactor(void * jarg1, char * jarg2, unsigned long jarg3, void * jarg4) {
  char * jresult ;
  Xapian::Compactor *arg1 = (Xapian::Compactor *) 0 ;
  std::string *arg2 = 0 ;
  size_t arg3 ;
  std::string *arg4 ;
  std::string result;
  
  arg1 = (Xapian::Compactor *)jarg1; 
  if (!jarg2) {
    SWIG_CSharpSetPendingExceptionArgument(SWIG_CSharpArgumentNullException, "null string", 0);
    return 0;
  }
  std::string arg2_str(jarg2);
  arg2 = &arg2_str; 
  arg3 = (size_t)jarg3; 
  arg4 = (std::string *)jarg4; 
  {
    try {
      result = (arg1)->Xapian::Compactor::resolve_duplicate_metadata((std::string const &)*arg2,arg3,(std::string const (*))arg4);
    } catch (...) {
      string msg;
      int code = XapianExceptionHandler(msg);
      XapianException(code, msg);
    }
  }
  jresult = SWIG_csharp_string_callback((&result)->c_str()); 
  return jresult;
}


SWIGEXPORT void SWIGSTDCALL CSharp_Compactor_director_connect(void *objarg, SwigDirector_Compactor::SWIG_Callback0_t callback0, SwigDirector_Compactor::SWIG_Callback1_t callback1) {
  Xapian::Compactor *obj = (Xapian::Compactor *)objarg;
  SwigDirector_Compactor *director = dynamic_cast<SwigDirector_Compactor *>(obj);
  if (director) {
    director->swig_connect_director(callback0, callback1);
  }
}


SWIGEXPORT Xapian::PostingSource * SWIGSTDCALL CSharp_ValuePostingSource_SWIGUpcast(Xapian::ValuePostingSource *jarg1) {
    return (Xapian::PostingSource *)jarg1;
}

SWIGEXPORT Xapian::ValuePostingSource * SWIGSTDCALL CSharp_ValueWeightPostingSource_SWIGUpcast(Xapian::ValueWeightPostingSource *jarg1) {
    return (Xapian::ValuePostingSource *)jarg1;
}

SWIGEXPORT Xapian::ValueWeightPostingSource * SWIGSTDCALL CSharp_DecreasingValueWeightPostingSource_SWIGUpcast(Xapian::DecreasingValueWeightPostingSource *jarg1) {
    return (Xapian::ValueWeightPostingSource *)jarg1;
}

SWIGEXPORT Xapian::ValuePostingSource * SWIGSTDCALL CSharp_ValueMapPostingSource_SWIGUpcast(Xapian::ValueMapPostingSource *jarg1) {
    return (Xapian::ValuePostingSource *)jarg1;
}

SWIGEXPORT Xapian::PostingSource * SWIGSTDCALL CSharp_FixedWeightPostingSource_SWIGUpcast(Xapian::FixedWeightPostingSource *jarg1) {
    return (Xapian::PostingSource *)jarg1;
}

SWIGEXPORT Xapian::Weight * SWIGSTDCALL CSharp_BoolWeight_SWIGUpcast(Xapian::BoolWeight *jarg1) {
    return (Xapian::Weight *)jarg1;
}

SWIGEXPORT Xapian::Weight * SWIGSTDCALL CSharp_BM25Weight_SWIGUpcast(Xapian::BM25Weight *jarg1) {
    return (Xapian::Weight *)jarg1;
}

SWIGEXPORT Xapian::Weight * SWIGSTDCALL CSharp_TradWeight_SWIGUpcast(Xapian::TradWeight *jarg1) {
    return (Xapian::Weight *)jarg1;
}

SWIGEXPORT Xapian::MatchSpy * SWIGSTDCALL CSharp_ValueCountMatchSpy_SWIGUpcast(Xapian::ValueCountMatchSpy *jarg1) {
    return (Xapian::MatchSpy *)jarg1;
}

SWIGEXPORT Xapian::Database * SWIGSTDCALL CSharp_WritableDatabase_SWIGUpcast(Xapian::WritableDatabase *jarg1) {
    return (Xapian::Database *)jarg1;
}

SWIGEXPORT Xapian::Stopper * SWIGSTDCALL CSharp_SimpleStopper_SWIGUpcast(Xapian::SimpleStopper *jarg1) {
    return (Xapian::Stopper *)jarg1;
}

SWIGEXPORT Xapian::ValueRangeProcessor * SWIGSTDCALL CSharp_StringValueRangeProcessor_SWIGUpcast(Xapian::StringValueRangeProcessor *jarg1) {
    return (Xapian::ValueRangeProcessor *)jarg1;
}

SWIGEXPORT Xapian::StringValueRangeProcessor * SWIGSTDCALL CSharp_DateValueRangeProcessor_SWIGUpcast(Xapian::DateValueRangeProcessor *jarg1) {
    return (Xapian::StringValueRangeProcessor *)jarg1;
}

SWIGEXPORT Xapian::StringValueRangeProcessor * SWIGSTDCALL CSharp_NumberValueRangeProcessor_SWIGUpcast(Xapian::NumberValueRangeProcessor *jarg1) {
    return (Xapian::StringValueRangeProcessor *)jarg1;
}

SWIGEXPORT Xapian::KeyMaker * SWIGSTDCALL CSharp_MultiValueKeyMaker_SWIGUpcast(Xapian::MultiValueKeyMaker *jarg1) {
    return (Xapian::KeyMaker *)jarg1;
}

SWIGEXPORT Xapian::KeyMaker * SWIGSTDCALL CSharp_Sorter_SWIGUpcast(Xapian::Sorter *jarg1) {
    return (Xapian::KeyMaker *)jarg1;
}

SWIGEXPORT Xapian::Sorter * SWIGSTDCALL CSharp_MultiValueSorter_SWIGUpcast(Xapian::MultiValueSorter *jarg1) {
    return (Xapian::Sorter *)jarg1;
}

SWIGEXPORT Xapian::MatchDecider * SWIGSTDCALL CSharp_ValueSetMatchDecider_SWIGUpcast(Xapian::ValueSetMatchDecider *jarg1) {
    return (Xapian::MatchDecider *)jarg1;
}

#ifdef __cplusplus
}
#endif

