xapian-core  2.0.0
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, see
18  * <https://www.gnu.org/licenses/>.
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/version.h>
29 
30 namespace Xapian {
31 
38 
45 
51 typedef unsigned XAPIAN_DOCID_BASE_TYPE docid;
52 
58 typedef double doclength;
59 
65 
72 
76 
82 typedef XAPIAN_TERMPOS_BASE_TYPE termpos_diff; /* FIXME: can overflow. */
83 
90 typedef unsigned valueno;
91 
97 typedef int valueno_diff; /* FIXME: can overflow. */
98 
100 const valueno BAD_VALUENO = 0xffffffff;
101 
109 
115 
116 }
117 
118 #endif /* XAPIAN_INCLUDED_TYPES_H */
The Xapian namespace contains public interfaces for the Xapian library.
Definition: compactor.cc:82
const valueno BAD_VALUENO
Reserved value to indicate "no valueno".
Definition: types.h:100
XAPIAN_TERMPOS_BASE_TYPE termpos_diff
A signed difference between two term positions.
Definition: types.h:82
XAPIAN_DOCID_BASE_TYPE doccount_diff
A signed difference between two counts of documents.
Definition: types.h:44
XAPIAN_TERMCOUNT_BASE_TYPE termcount_diff
A signed difference between two counts of terms.
Definition: types.h:71
unsigned XAPIAN_TERMCOUNT_BASE_TYPE termcount
A counts of terms.
Definition: types.h:64
XAPIAN_REVISION_TYPE rev
Revision number of a database.
Definition: types.h:108
double doclength
A normalised document length.
Definition: types.h:58
unsigned valueno
The number for a value slot in a document.
Definition: types.h:90
unsigned XAPIAN_DOCID_BASE_TYPE doccount
A count of documents.
Definition: types.h:37
unsigned XAPIAN_DOCID_BASE_TYPE docid
A unique identifier for a document.
Definition: types.h:51
int valueno_diff
A signed difference between two value slot numbers.
Definition: types.h:97
unsigned XAPIAN_TERMPOS_BASE_TYPE termpos
A term position within a document or query.
Definition: types.h:75
XAPIAN_TOTALLENGTH_TYPE totallength
The total length of all documents in a database.
Definition: types.h:114
Define preprocessor symbols for the library version.
#define XAPIAN_DOCID_BASE_TYPE
Base (signed) type for Xapian::docid and related types.
Definition: version.h:61
#define XAPIAN_TOTALLENGTH_TYPE
Type for returning total document length.
Definition: version.h:70
#define XAPIAN_TERMCOUNT_BASE_TYPE
Base (signed) type for Xapian::termcount and related types.
Definition: version.h:64
#define XAPIAN_REVISION_TYPE
Underlying type for Xapian::rev.
Definition: version.h:73
#define XAPIAN_TERMPOS_BASE_TYPE
Base (signed) type for Xapian::termpos.
Definition: version.h:67