1 /** @file termgenerator_internal.h
2 * @brief TermGenerator class internals
4 /* Copyright (C) 2007,2012,2016 Olly Betts
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 2 of the License, or
9 * (at your option) any later version.
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.
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
21 #ifndef XAPIAN_INCLUDED_TERMGENERATOR_INTERNAL_H
22 #define XAPIAN_INCLUDED_TERMGENERATOR_INTERNAL_H
24 #include "xapian/intrusive_ptr.h"
25 #include <xapian/database.h>
26 #include <xapian/document.h>
27 #include <xapian/termgenerator.h>
28 #include <xapian/queryparser.h> // For Xapian::Stopper
29 #include <xapian/stem.h>
35 class TermGenerator::Internal
: public Xapian::Internal::intrusive_base
{
36 friend class TermGenerator
;
38 stem_strategy strategy
;
39 Xapian::Internal::opt_intrusive_ptr
<const Stopper
> stopper
;
40 stop_strategy stop_mode
;
43 TermGenerator::flags flags
;
44 unsigned max_word_length
;
48 Internal() : strategy(STEM_SOME
), stopper(NULL
), stop_mode(STOP_STEMMED
),
49 termpos(0), flags(TermGenerator::flags(0)), max_word_length(64) { }
50 void index_text(Utf8Iterator itor
,
52 const std::string
& prefix
,
58 #endif // XAPIAN_INCLUDED_TERMGENERATOR_INTERNAL_H