Logo Search packages:      
Sourcecode: xapian-bindings version File versions  Download package

xapian_wrap.h

/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 1.3.30
 * 
 * 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. 
 * ----------------------------------------------------------------------------- */

#ifndef SWIG_xapian_WRAP_H_
#define SWIG_xapian_WRAP_H_

#include <map>
#include <string>


class SwigDirector_MatchDecider : public Xapian::MatchDecider, public Swig::Director {

public:
    SwigDirector_MatchDecider(PyObject *self);
    virtual int operator ()(Xapian::Document const &doc) const;
    virtual ~SwigDirector_MatchDecider();


/* Internal Director utilities */
public:
    bool swig_get_inner(const char* name) const {
      std::map<std::string, bool>::const_iterator iv = inner.find(name);
      return (iv != inner.end() ? iv->second : false);
    }

    void swig_set_inner(const char* name, bool val) const
    { inner[name] = val;}

private:
    mutable std::map<std::string, bool> inner;


#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
/* VTable implementation */
    PyObject *swig_get_method(size_t method_index, const char *method_name) const {
      PyObject *method = vtable[method_index];
      if (!method) {
        swig::PyObject_var name = PyString_FromString(method_name);
        method = PyObject_GetAttr(swig_get_self(), name);
        if (method == NULL) {
          std::string msg = "Method in class MatchDecider doesn't exist, undefined ";
          msg += method_name;
          Swig::DirectorMethodException::raise(msg.c_str());
        }
        vtable[method_index] = method;
      };
      return method;
    }
private:
    mutable swig::PyObject_var vtable[1];
#endif

};


class SwigDirector_Stopper : public Xapian::Stopper, public Swig::Director {

public:
    SwigDirector_Stopper(PyObject *self);
    virtual bool operator ()(std::string const &term) const;
    virtual ~SwigDirector_Stopper();
    virtual std::string get_description() const;


/* Internal Director utilities */
public:
    bool swig_get_inner(const char* name) const {
      std::map<std::string, bool>::const_iterator iv = inner.find(name);
      return (iv != inner.end() ? iv->second : false);
    }

    void swig_set_inner(const char* name, bool val) const
    { inner[name] = val;}

private:
    mutable std::map<std::string, bool> inner;


#if defined(SWIG_PYTHON_DIRECTOR_VTABLE)
/* VTable implementation */
    PyObject *swig_get_method(size_t method_index, const char *method_name) const {
      PyObject *method = vtable[method_index];
      if (!method) {
        swig::PyObject_var name = PyString_FromString(method_name);
        method = PyObject_GetAttr(swig_get_self(), name);
        if (method == NULL) {
          std::string msg = "Method in class Stopper doesn't exist, undefined ";
          msg += method_name;
          Swig::DirectorMethodException::raise(msg.c_str());
        }
        vtable[method_index] = method;
      };
      return method;
    }
private:
    mutable swig::PyObject_var vtable[2];
#endif

};


#endif

Generated by  Doxygen 1.6.0   Back to index