Public Member Functions | List of all members
Xapian::Registry Class Reference

Registry for user subclasses. More...

Public Member Functions

 Registry (const Registry &other)
 Copy constructor. More...
 
Registryoperator= (const Registry &other)
 Assignment operator. More...
 
 Registry ()
 Default constructor. More...
 
void register_weighting_scheme (const Xapian::Weight &wt)
 Register a weighting scheme. More...
 
const Xapian::Weightget_weighting_scheme (const std::string &name) const
 Get the weighting scheme given a name. More...
 
void register_posting_source (const Xapian::PostingSource &source)
 Register a user-defined posting source class. More...
 
const Xapian::PostingSourceget_posting_source (const std::string &name) const
 Get a posting source given a name. More...
 
void register_match_spy (const Xapian::MatchSpy &spy)
 Register a user-defined match spy class. More...
 
const Xapian::MatchSpyget_match_spy (const std::string &name) const
 Get a match spy given a name. More...
 
void register_lat_long_metric (const Xapian::LatLongMetric &metric)
 Register a user-defined lat-long metric class.
 
const Xapian::LatLongMetricget_lat_long_metric (const std::string &name) const
 Get a lat-long metric given a name. More...
 

Detailed Description

Registry for user subclasses.

This class provides a way for the remote server to look up user subclasses when unserialising.

Constructor & Destructor Documentation

◆ Registry() [1/2]

Xapian::Registry::Registry ( const Registry other)

Copy constructor.

The internals are reference counted, so copying is cheap.

Parameters
otherThe object to copy.

◆ Registry() [2/2]

Xapian::Registry::Registry ( )

Default constructor.

The registry will contain all standard subclasses of user-subclassable classes.

Member Function Documentation

◆ get_lat_long_metric()

const Xapian::LatLongMetric* Xapian::Registry::get_lat_long_metric ( const std::string &  name) const

Get a lat-long metric given a name.

The returned metric is owned by the registry object.

Returns NULL if the metric could not be found.

◆ get_match_spy()

const Xapian::MatchSpy* Xapian::Registry::get_match_spy ( const std::string &  name) const

Get a match spy given a name.

Parameters
nameThe name of the match spy to find.
Returns
An object with the requested name, or NULL if the match spy could not be found. The returned object is owned by the registry and so must not be deleted by the caller.

◆ get_posting_source()

const Xapian::PostingSource* Xapian::Registry::get_posting_source ( const std::string &  name) const

Get a posting source given a name.

Parameters
nameThe name of the posting source to find.
Returns
An object with the requested name, or NULL if the posting source could not be found. The returned object is owned by the registry and so must not be deleted by the caller.

◆ get_weighting_scheme()

const Xapian::Weight* Xapian::Registry::get_weighting_scheme ( const std::string &  name) const

Get the weighting scheme given a name.

Parameters
nameThe name of the weighting scheme to find.
Returns
An object with the requested name, or NULL if the weighting scheme could not be found. The returned object is owned by the registry and so must not be deleted by the caller.

◆ operator=()

Registry& Xapian::Registry::operator= ( const Registry other)

Assignment operator.

The internals are reference counted, so assignment is cheap.

Parameters
otherThe object to copy.

◆ register_match_spy()

void Xapian::Registry::register_match_spy ( const Xapian::MatchSpy spy)

Register a user-defined match spy class.

Parameters
spyThe match spy to register.

◆ register_posting_source()

void Xapian::Registry::register_posting_source ( const Xapian::PostingSource source)

Register a user-defined posting source class.

Parameters
sourceThe posting source to register.

◆ register_weighting_scheme()

void Xapian::Registry::register_weighting_scheme ( const Xapian::Weight wt)

Register a weighting scheme.

Parameters
wtThe weighting scheme to register.

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

Documentation for Xapian (version 1.4.9).
Generated on Sat Nov 3 2018 by Doxygen 1.8.13.