xapian-core
1.5.0
|
Registry for user subclasses. More...
Public Member Functions | |
Registry (const Registry &other) | |
Copy constructor. More... | |
Registry & | operator= (const Registry &other) |
Assignment operator. More... | |
Registry (Registry &&other) | |
Move constructor. More... | |
Registry & | operator= (Registry &&other) |
Move assignment operator. More... | |
Registry () | |
Default constructor. More... | |
void | register_weighting_scheme (const Xapian::Weight &wt) |
Register a weighting scheme. More... | |
const Xapian::Weight * | get_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::PostingSource * | get_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::MatchSpy * | get_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::LatLongMetric * | get_lat_long_metric (const std::string &name) const |
Get a lat-long metric given a name. More... | |
void | register_key_maker (Xapian::KeyMaker *keymaker) |
Register a user-defined KeyMaker subclass. More... | |
const Xapian::KeyMaker * | get_key_maker (const std::string &name) const |
Get a KeyMaker given a name. More... | |
Registry for user subclasses.
This class provides a way for the remote server to look up user subclasses when unserialising.
Xapian::Registry::Registry | ( | const Registry & | other | ) |
Copy constructor.
The internals are reference counted, so copying is cheap.
other | The object to copy. |
Xapian::Registry::Registry | ( | Registry && | other | ) |
Move constructor.
other | The object to move. |
Xapian::Registry::Registry | ( | ) |
Default constructor.
The registry will contain all standard subclasses of user-subclassable classes.
const Xapian::KeyMaker* Xapian::Registry::get_key_maker | ( | const std::string & | name | ) | const |
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.
const Xapian::MatchSpy* Xapian::Registry::get_match_spy | ( | const std::string & | name | ) | const |
Get a match spy given a name.
name | The name of the match spy to find. |
const Xapian::PostingSource* Xapian::Registry::get_posting_source | ( | const std::string & | name | ) | const |
Get a posting source given a name.
name | The name of the posting source to find. |
const Xapian::Weight* Xapian::Registry::get_weighting_scheme | ( | const std::string & | name | ) | const |
Get the weighting scheme given a name.
name | The name of the weighting scheme to find. |
Assignment operator.
The internals are reference counted, so assignment is cheap.
other | The object to copy. |
Move assignment operator.
other | The object to move. |
void Xapian::Registry::register_key_maker | ( | Xapian::KeyMaker * | keymaker | ) |
Register a user-defined KeyMaker subclass.
keymaker | The KeyMaker subclass to register. The clean up of this object is handled via Xapian's optional reference counting. The simplest way to do so is to allocate it with new and call release() on it before passing it to this method to tell Xapian to manage its lifetime. The alternative approach is for the caller to ensure the KeyMaker object remains valid for the lifetime of the Registry object. |
void Xapian::Registry::register_match_spy | ( | const Xapian::MatchSpy & | spy | ) |
Register a user-defined match spy class.
spy | The match spy to register. |
void Xapian::Registry::register_posting_source | ( | const Xapian::PostingSource & | source | ) |
Register a user-defined posting source class.
source | The posting source to register. |
void Xapian::Registry::register_weighting_scheme | ( | const Xapian::Weight & | wt | ) |
Register a weighting scheme.
wt | The weighting scheme to register. |