Last change
on this file since 353 was 2, checked in by Dmitry A. Kuminov, 16 years ago |
Initially imported qt-all-opensource-src-4.5.1 from Trolltech.
|
File size:
1.3 KB
|
Line | |
---|
1 | /****************************************************************************
|
---|
2 | **
|
---|
3 | ** Copyright (C) 2009 Nokia Corporation and/or its subsidiary(-ies).
|
---|
4 | ** Contact: Qt Software Information ([email protected])
|
---|
5 | **
|
---|
6 | ** This file is part of the QCLucene library and is distributable under
|
---|
7 | ** the terms of the LGPL license as specified in the license.txt file.
|
---|
8 | **
|
---|
9 | ****************************************************************************/
|
---|
10 |
|
---|
11 | #include "qtokenstream_p.h"
|
---|
12 |
|
---|
13 | #include <CLucene.h>
|
---|
14 | #include <CLucene/analysis/AnalysisHeader.h>
|
---|
15 |
|
---|
16 | QT_BEGIN_NAMESPACE
|
---|
17 |
|
---|
18 | QCLuceneTokenStreamPrivate::QCLuceneTokenStreamPrivate()
|
---|
19 | : QSharedData()
|
---|
20 | {
|
---|
21 | tokenStream = 0;
|
---|
22 | deleteCLuceneTokenStream = true;
|
---|
23 | }
|
---|
24 |
|
---|
25 | QCLuceneTokenStreamPrivate::QCLuceneTokenStreamPrivate(const QCLuceneTokenStreamPrivate &other)
|
---|
26 | : QSharedData()
|
---|
27 | {
|
---|
28 | tokenStream = _CL_POINTER(other.tokenStream);
|
---|
29 | }
|
---|
30 |
|
---|
31 | QCLuceneTokenStreamPrivate::~QCLuceneTokenStreamPrivate()
|
---|
32 | {
|
---|
33 | if (deleteCLuceneTokenStream)
|
---|
34 | _CLDECDELETE(tokenStream);
|
---|
35 | }
|
---|
36 |
|
---|
37 |
|
---|
38 | QCLuceneTokenStream::QCLuceneTokenStream()
|
---|
39 | : d(new QCLuceneTokenStreamPrivate())
|
---|
40 | {
|
---|
41 | // nothing todo
|
---|
42 | }
|
---|
43 |
|
---|
44 | QCLuceneTokenStream::~QCLuceneTokenStream()
|
---|
45 | {
|
---|
46 | // nothing todo
|
---|
47 | }
|
---|
48 |
|
---|
49 | void QCLuceneTokenStream::close()
|
---|
50 | {
|
---|
51 | d->tokenStream->close();
|
---|
52 | }
|
---|
53 |
|
---|
54 | bool QCLuceneTokenStream::next(QCLuceneToken &token)
|
---|
55 | {
|
---|
56 | return d->tokenStream->next(token.d->token);
|
---|
57 | }
|
---|
58 |
|
---|
59 | QT_END_NAMESPACE
|
---|
Note:
See
TracBrowser
for help on using the repository browser.