xapian-core
2.0.0
include
xapian
registry.h
Go to the documentation of this file.
1
4
/* Copyright 2009 Lemur Consulting Ltd
5
* Copyright 2009,2011,2013,2014,2019,2024 Olly Betts
6
*
7
* This program is free software; you can redistribute it and/or
8
* modify it under the terms of the GNU General Public License as
9
* published by the Free Software Foundation; either version 2 of the
10
* License, or (at your option) any later version.
11
*
12
* This program is distributed in the hope that it will be useful,
13
* but WITHOUT ANY WARRANTY; without even the implied warranty of
14
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
* GNU General Public License for more details.
16
*
17
* You should have received a copy of the GNU General Public License
18
* along with this program; if not, see
19
* <https://www.gnu.org/licenses/>.
20
*/
21
22
#ifndef XAPIAN_INCLUDED_REGISTRY_H
23
#define XAPIAN_INCLUDED_REGISTRY_H
24
25
#if !defined XAPIAN_IN_XAPIAN_H && !defined XAPIAN_LIB_BUILD
26
# error Never use <xapian/registry.h> directly; include <xapian.h> instead.
27
#endif
28
29
#include <
xapian/intrusive_ptr.h
>
30
#include <
xapian/visibility.h
>
31
#include <string>
32
33
namespace
Xapian
{
34
35
// Forward declarations.
36
class
KeyMaker;
37
class
LatLongMetric;
38
class
MatchSpy;
39
class
PostingSource;
40
class
Weight;
41
47
class
XAPIAN_VISIBILITY_DEFAULT
Registry
{
48
public
:
50
class
Internal
;
51
52
private
:
54
Xapian::Internal::intrusive_ptr_nonnull<Internal>
internal
;
55
56
public
:
63
Registry
(
const
Registry
& other);
64
71
Registry
& operator=(
const
Registry
& other);
72
77
Registry
(
Registry
&& other);
78
83
Registry
&
operator=
(
Registry
&& other);
84
90
Registry
();
91
92
~
Registry
();
93
98
void
register_weighting_scheme(
const
Xapian::Weight
&wt);
99
108
const
Xapian::Weight
* get_weighting_scheme(std::string_view
name
)
const
;
109
114
void
register_posting_source(
const
Xapian::PostingSource
&source);
115
124
const
Xapian::PostingSource
*
125
get_posting_source(std::string_view
name
)
const
;
126
131
void
register_match_spy(
const
Xapian::MatchSpy
&spy);
132
141
const
Xapian::MatchSpy
* get_match_spy(std::string_view
name
)
const
;
142
144
void
register_lat_long_metric(
const
Xapian::LatLongMetric
&metric);
145
152
const
Xapian::LatLongMetric
*
153
get_lat_long_metric(std::string_view
name
)
const
;
154
168
void
register_key_maker(
Xapian::KeyMaker
* keymaker);
169
179
const
Xapian::KeyMaker
* get_key_maker(std::string_view
name
)
const
;
180
};
181
182
}
183
184
#endif
/* XAPIAN_INCLUDED_REGISTRY_H */
Xapian::Internal::intrusive_ptr_nonnull< Internal >
Xapian::KeyMaker
Virtual base class for key making functors.
Definition:
keymaker.h:44
Xapian::LatLongMetric
Base class for calculating distances between two lat/long coordinates.
Definition:
geospatial.h:302
Xapian::MatchSpy
Abstract base class for match spies.
Definition:
matchspy.h:50
Xapian::PostingSource
Base class which provides an "external" source of postings.
Definition:
postingsource.h:47
Xapian::Registry::Internal
Definition:
registry.cc:44
Xapian::Registry
Registry for user subclasses.
Definition:
registry.h:47
Xapian::Registry::operator=
Registry & operator=(Registry &&other)
Move assignment operator.
Xapian::Registry::Registry
Registry(Registry &&other)
Move constructor.
Xapian::Weight
Abstract base class for weighting schemes.
Definition:
weight.h:38
intrusive_ptr.h
Xapian
The Xapian namespace contains public interfaces for the Xapian library.
Definition:
compactor.cc:82
name
Definition:
header.h:215
visibility.h
Define XAPIAN_VISIBILITY_* macros.
XAPIAN_VISIBILITY_DEFAULT
#define XAPIAN_VISIBILITY_DEFAULT
Definition:
visibility.h:28
Generated by
Doxygen 1.9.1