Lucene++ - a full-featured, c++ search engine
API Documentation
Main Page
Related Pages
Namespaces
Data Structures
Files
File List
Globals
All
Data Structures
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Macros
Pages
include
TermAttribute.h
Go to the documentation of this file.
1
// Copyright (c) 2009-2011 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 TERMATTRIBUTE_H
8
#define TERMATTRIBUTE_H
9
10
#include "
Attribute.h
"
11
12
namespace
Lucene
13
{
15
class
LPPAPI
TermAttribute
:
public
Attribute
16
{
17
public
:
18
TermAttribute
();
19
virtual
~
TermAttribute
();
20
21
LUCENE_CLASS
(
TermAttribute
);
22
23
protected
:
24
static
const
int32_t MIN_BUFFER_SIZE;
25
26
CharArray
_termBuffer
;
27
int32_t
_termLength
;
28
29
public
:
30
virtual
String toString();
31
38
virtual
String term();
39
44
virtual
void
setTermBuffer(
const
wchar_t
* buffer, int32_t offset, int32_t length);
45
48
virtual
void
setTermBuffer(
const
String& buffer);
49
54
virtual
CharArray termBuffer();
55
57
virtual
wchar_t
* termBufferArray();
58
65
virtual
CharArray resizeTermBuffer(int32_t newSize);
66
68
virtual
int32_t termLength();
69
74
virtual
void
setTermLength(int32_t length);
75
76
virtual
int32_t hashCode();
77
virtual
void
clear();
78
virtual
LuceneObjectPtr
clone(
LuceneObjectPtr
other =
LuceneObjectPtr
());
79
virtual
bool
equals(
LuceneObjectPtr
other);
80
virtual
void
copyTo(
AttributePtr
target);
81
82
protected
:
86
void
growTermBuffer(int32_t newSize);
87
88
void
initTermBuffer();
89
};
90
}
91
92
#endif
clucene.sourceforge.net