

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 |
Definition at line 509 of file api_serialise.cc.
| ExceptionalMatchSpy::ExceptionalMatchSpy | ( | failmode | fail_, | |
| MatchSpy *& | allocated_ | |||
| ) | [inline] |
| ExceptionalMatchSpy::~ExceptionalMatchSpy | ( | ) | [inline] |
| 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.
| 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.
| MatchSpy* & ExceptionalMatchSpy::allocated |
Definition at line 513 of file api_serialise.cc.
Referenced by clone(), DEFINE_TESTCASE(), and ~ExceptionalMatchSpy().