ExceptionalMatchSpy Class Reference

Inheritance diagram for ExceptionalMatchSpy:

Inheritance graph
[legend]
Collaboration diagram for ExceptionalMatchSpy:

Collaboration graph
[legend]

List of all members.

Public Types

enum  failmode { NONE, CLONE, DTOR }

Public Member Functions

 ExceptionalMatchSpy (failmode fail_, MatchSpy *&allocated_)
 ~ExceptionalMatchSpy ()
string name () const
 Return the name of this match spy.
MatchSpy * clone () const
 Clone the match spy.
void operator() (const Xapian::Document &, Xapian::weight)
 Register a document with the match spy.

Public Attributes

failmode fail
MatchSpy *& allocated


Detailed Description

Definition at line 509 of file api_serialise.cc.


Member Enumeration Documentation

Enumerator:
NONE 
CLONE 
DTOR 

Definition at line 511 of file api_serialise.cc.


Constructor & Destructor Documentation

ExceptionalMatchSpy::ExceptionalMatchSpy ( failmode  fail_,
MatchSpy *&  allocated_ 
) [inline]

Definition at line 517 of file api_serialise.cc.

Referenced by clone().

ExceptionalMatchSpy::~ExceptionalMatchSpy (  )  [inline]

Definition at line 520 of file api_serialise.cc.

References DTOR, and fail.


Member Function Documentation

MatchSpy* ExceptionalMatchSpy::clone (  )  const [inline, virtual]

Clone the match spy.

The clone should inherit the configuration of the parent, but need not inherit the state. ie, the clone does not need to be passed information about the results seen by the parent.

If you don't want to support the remote backend in your match spy, you can use the default implementation which simply throws Xapian::UnimplementedError.

Note that the returned object will be deallocated by Xapian after use with "delete". If you want to handle the deletion in a special way (for example when wrapping the Xapian API for use from another language) then you can define a static operator delete method in your subclass as shown here: http://trac.xapian.org/ticket/554#comment:1

Reimplemented from Xapian::MatchSpy.

Definition at line 530 of file api_serialise.cc.

References allocated, CLONE, ExceptionalMatchSpy(), and fail.

string ExceptionalMatchSpy::name (  )  const [inline, virtual]

Return the name of this match spy.

This name is used by the remote backend. It is passed with the serialised parameters to the remote server so that it knows which class to create.

Return the full namespace-qualified name of your class here - if your class is called MyApp::FooMatchSpy, return "MyApp::FooMatchSpy" from this method.

If you don't want to support the remote backend in your match spy, you can use the default implementation which simply throws Xapian::UnimplementedError.

Reimplemented from Xapian::MatchSpy.

Definition at line 526 of file api_serialise.cc.

void ExceptionalMatchSpy::operator() ( const Xapian::Document doc,
Xapian::weight  wt 
) [inline, virtual]

Register a document with the match spy.

This is called by the matcher once with each document seen by the matcher during the match process. Note that the matcher will often not see all the documents which match the query, due to optimisations which allow low-weighted documents to be skipped, and allow the match process to be terminated early.

Parameters:
doc The document seen by the match spy.
wt The weight of the document.

Implements Xapian::MatchSpy.

Definition at line 537 of file api_serialise.cc.


Member Data Documentation

Definition at line 515 of file api_serialise.cc.

Referenced by clone().

Definition at line 513 of file api_serialise.cc.

Referenced by clone(), DEFINE_TESTCASE(), and ~ExceptionalMatchSpy().


The documentation for this class was generated from the following file:

Documentation for Xapian (version 1.2.9).
Generated on 10 May 2012 by Doxygen 1.5.9.