xapian-core  1.4.26
types.h
Go to the documentation of this file.
1 
4 /* Copyright (C) 2007,2010,2011,2013,2014,2017,2018 Olly Betts
5  *
6  * This program is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU General Public License as
8  * published by the Free Software Foundation; either version 2 of the
9  * License, or (at your option) any later version.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, write to the Free Software
18  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
19  */
20 
21 #ifndef XAPIAN_INCLUDED_TYPES_H
22 #define XAPIAN_INCLUDED_TYPES_H
23 
24 #if !defined XAPIAN_IN_XAPIAN_H && !defined XAPIAN_LIB_BUILD
25 # error Never use <xapian/types.h> directly; include <xapian.h> instead.
26 #endif
27 
28 #include <xapian/deprecated.h>
29 #include <xapian/version.h>
30 
31 namespace Xapian {
32 
39 
46 
52 typedef unsigned XAPIAN_DOCID_BASE_TYPE docid;
53 
59 typedef double doclength;
60 
67 
73 
80 
84 
90 typedef XAPIAN_TERMPOS_BASE_TYPE termpos_diff; /* FIXME: can overflow. */
91 
100 XAPIAN_DEPRECATED(typedef unsigned timeout);
101 
108 typedef unsigned valueno;
109 
115 typedef int valueno_diff; /* FIXME: can overflow. */
116 
122 XAPIAN_DEPRECATED(typedef double weight);
123 
125 const valueno BAD_VALUENO = 0xffffffff;
126 
134 
140 
141 }
142 
143 #endif /* XAPIAN_INCLUDED_TYPES_H */
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:80
XAPIAN_REVISION_TYPE rev
Revision number of a database.
Definition: types.h:133
unsigned timeout
A timeout value in milliseconds.
Definition: types.h:100
#define XAPIAN_TERMPOS_BASE_TYPE
Base (signed) type for Xapian::termpos.
Definition: version.h:63
double weight
The weight of a document or term.
Definition: types.h:122
XAPIAN_TOTALLENGTH_TYPE totallength
The total length of all documents in a database.
Definition: types.h:139
Define XAPIAN_DEPRECATED() and related macros.
#define XAPIAN_DEPRECATED(X)
int valueno_diff
A signed difference between two value slot numbers.
Definition: types.h:115
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:72
XAPIAN_TERMPOS_BASE_TYPE termpos_diff
A signed difference between two term positions.
Definition: types.h:90
XAPIAN_DOCID_BASE_TYPE doccount_diff
A signed difference between two counts of documents.
Definition: types.h:45
double doclength
A normalised document length.
Definition: types.h:59
#define XAPIAN_REVISION_TYPE
Underlying type for Xapian::rev.
Definition: version.h:69
int percent
The percentage score for a document in an MSet.
Definition: types.h:66
Define preprocessor symbols for the library version.
XAPIAN_TERMCOUNT_BASE_TYPE termcount_diff
A signed difference between two counts of terms.
Definition: types.h:79
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Definition: types.h:38
unsigned valueno
The number for a value slot in a document.
Definition: types.h:108
unsigned XAPIAN_TERMPOS_BASE_TYPE termpos
A term position within a document or query.
Definition: types.h:83
#define XAPIAN_DOCID_BASE_TYPE
Base (signed) type for Xapian::docid and related types.
Definition: version.h:57
#define XAPIAN_TOTALLENGTH_TYPE
Type for returning total document length.
Definition: version.h:66
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Definition: types.h:52
const valueno BAD_VALUENO
Reserved value to indicate "no valueno".
Definition: types.h:125
#define XAPIAN_TERMCOUNT_BASE_TYPE
Base (signed) type for Xapian::termcount and related types.
Definition: version.h:60