Lucene++ - a full-featured, c++ search engine
API Documentation
Toggle main menu visibility
Loading...
Searching...
No Matches
include
lucene++
CharFolder.h
Go to the documentation of this file.
1
2
// Copyright (c) 2009-2014 Alan Wright. All rights reserved.
3
// Distributable under the terms of either the Apache License (Version 2.0)
4
// or the GNU Lesser General Public License.
6
7
#ifndef CHARFOLDER_H
8
#define CHARFOLDER_H
9
10
#include "
LuceneObject.h
"
11
12
namespace
Lucene
{
13
15
class
LPPAPI
CharFolder
:
public
LuceneObject
{
16
public
:
17
virtual
~CharFolder
();
18
LUCENE_CLASS
(
CharFolder
);
19
20
protected
:
21
static
bool
lowerCache
;
22
static
bool
upperCache
;
23
static
wchar_t
lowerChars
[CHAR_MAX - CHAR_MIN + 1];
24
static
wchar_t
upperChars
[CHAR_MAX - CHAR_MIN + 1];
25
26
public
:
27
static
wchar_t
toLower
(
wchar_t
ch);
28
static
wchar_t
toUpper
(
wchar_t
ch);
29
30
template
<
class
ITER>
31
static
void
toLower
(ITER first, ITER last) {
32
for
(; first != last; ++first) {
33
*first =
toLower
(*first);
34
}
35
}
36
37
template
<
class
ITER>
38
static
void
toUpper
(ITER first, ITER last) {
39
for
(; first != last; ++first) {
40
*first =
toUpper
(*first);
41
}
42
}
43
44
protected
:
45
static
bool
fillLower
();
46
static
bool
fillUpper
();
47
};
48
49
}
50
51
#endif
LuceneObject.h
LUCENE_CLASS
#define LUCENE_CLASS(Name)
Definition
LuceneObject.h:24
Lucene::CharFolder
Utility class for folding character case.
Definition
CharFolder.h:15
Lucene::CharFolder::toLower
static void toLower(ITER first, ITER last)
Definition
CharFolder.h:31
Lucene::CharFolder::toUpper
static void toUpper(ITER first, ITER last)
Definition
CharFolder.h:38
Lucene::CharFolder::fillUpper
static bool fillUpper()
Lucene::CharFolder::lowerCache
static bool lowerCache
Definition
CharFolder.h:21
Lucene::CharFolder::upperChars
static wchar_t upperChars[CHAR_MAX - CHAR_MIN+1]
Definition
CharFolder.h:24
Lucene::CharFolder::toUpper
static wchar_t toUpper(wchar_t ch)
Lucene::CharFolder::upperCache
static bool upperCache
Definition
CharFolder.h:22
Lucene::CharFolder::~CharFolder
virtual ~CharFolder()
Lucene::CharFolder::lowerChars
static wchar_t lowerChars[CHAR_MAX - CHAR_MIN+1]
Definition
CharFolder.h:23
Lucene::CharFolder::fillLower
static bool fillLower()
Lucene::CharFolder::toLower
static wchar_t toLower(wchar_t ch)
Lucene::LuceneObject::LuceneObject
LuceneObject()
Lucene
Definition
AbstractAllTermDocs.h:12
clucene.sourceforge.net