~ubuntu-branches/ubuntu/raring/clucene-core/raring-proposed

« back to all changes in this revision

Viewing changes to src/core/CLucene/queryParser/QueryToken.cpp

  • Committer: Package Import Robot
  • Author(s): Fathi Boudra
  • Date: 2012-08-11 09:33:38 UTC
  • mfrom: (1.1.5)
  • Revision ID: package-import@ubuntu.com-20120811093338-fgrx41ftqew3qt6a
Tags: 2.3.3.4-1
* New upstream release (Closes: #661703).
* Convert package to multiarch.
* Drop obsolete patches:
  - 01_add_missing_include_bug505667.diff
  - 02_posixness_fix_bug530308.diff
* Add patches:
  - Fixing_ZLIB_configuration_in_shared_CMakeLists.patch
  - Fix-pkgconfig-file-by-adding-clucene-shared-library.patch
  - Install-contribs-lib.patch
  - multiarch.patch
* Update debian/compat: bump to 8.
* Update debian/control:
  - update build dependencies (add cmake, libboost-dev and libz-dev).
  - bump Standards-Version to 3.9.3.
  - rename packages due to ABI bump: libclucene0ldbl -> libclucene-core1.
  - add libclucene-contribs1 package.
* Update debian/rules:
  - rewrite to use CMake.
  - add multiarch support.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*------------------------------------------------------------------------------
 
2
* Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team
 
3
*
 
4
* Distributable under the terms of either the Apache License (Version 2.0) or
 
5
* the GNU Lesser General Public License, as specified in the COPYING file.
 
6
------------------------------------------------------------------------------*/
 
7
#include "CLucene/_ApiHeader.h"
 
8
#include "QueryToken.h"
 
9
 
 
10
CL_NS_DEF(queryParser)
 
11
 
 
12
 
 
13
QueryToken::QueryToken() :
 
14
    kind(0),
 
15
    beginLine(0),
 
16
    beginColumn(0),
 
17
    endLine(0),
 
18
    endColumn(0),
 
19
    image(NULL),
 
20
    next(NULL),
 
21
    specialToken(NULL)
 
22
{
 
23
}
 
24
 
 
25
QueryToken::~QueryToken()
 
26
{
 
27
#ifndef LUCENE_TOKEN_WORD_LENGTH
 
28
        _CLDELETE_LCARRAY( image );
 
29
#endif
 
30
}
 
31
 
 
32
TCHAR* QueryToken::toString() const
 
33
{
 
34
#ifndef LUCENE_TOKEN_WORD_LENGTH
 
35
        return image;
 
36
#else
 
37
        return STRDUP_TtoT(image);
 
38
#endif
 
39
}
 
40
 
 
41
/*static*/
 
42
QueryToken* QueryToken::newToken(const int32_t /*ofKind*/)
 
43
{
 
44
        //switch(ofKind)
 
45
        //{
 
46
        //default : return _CLNEW Token();
 
47
        //}
 
48
        return _CLNEW QueryToken();
 
49
}
 
50
 
 
51
CL_NS_END