Home modules.gotpike.org
Username: Password: [Create Account]
[Forgot Password?]
Return to module

File Contents

Contents of /Public_Xapian-1.5/PikeExpandDeciderProxy.cc:

class PikeExpandDeciderProxy: public Xapian::ExpandDecider
{
  struct svalue * fx;

  public:
  PikeExpandDeciderProxy(struct svalue * func)
  {
    fx = func;
  }

  virtual bool operator()(const std::string & term) const 
  {
    int i;
    bool b;

    push_text(term.c_str());

    apply_svalue(fx, 1);
    i = Pike_sp[-1].u.integer;
    pop_stack();
    if(i == 0) b = false;
    else b = true;

    return b;
  }
};

gotpike.org | Copyright © 2004 - 2011 | Pike is a trademark of Department of Computer and Information Science, Linköping University