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

« back to all changes in this revision

Viewing changes to src/core/CLucene/util/_FastCharStream.h

  • 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
#ifndef _lucene_util_FastCharStream_
 
8
#define _lucene_util_FastCharStream_
 
9
 
 
10
 
 
11
CL_CLASS_DEF(util,BufferedReader)
 
12
 
 
13
CL_NS_DEF(util)
 
14
 
 
15
        /** Ported implementation of the FastCharStream class. */
 
16
        class FastCharStream
 
17
        {
 
18
                static const int32_t maxRewindSize;
 
19
                int32_t pos;
 
20
                int32_t rewindPos;
 
21
                int64_t resetPos;
 
22
                int32_t col;
 
23
                int32_t line;
 
24
                // read character from stream throws an exception on error
 
25
                void readChar(TCHAR &); 
 
26
        public:
 
27
                BufferedReader* input;
 
28
 
 
29
                /// Initializes a new instance of the FastCharStream class LUCENE_EXPORT.
 
30
                FastCharStream(BufferedReader* reader);
 
31
                virtual ~FastCharStream();
 
32
 
 
33
        void reset();
 
34
                
 
35
                /// Returns the next TCHAR from the stream.
 
36
                int GetNext();
 
37
 
 
38
                void UnGet();
 
39
                
 
40
                /// Returns the current top TCHAR from the input stream without removing it.
 
41
                int Peek();
 
42
                
 
43
                
 
44
                /// Returns <b>True</b> if the end of stream was reached.
 
45
                bool Eos() const;
 
46
 
 
47
                /// Gets the current column.
 
48
                int32_t Column() const;
 
49
 
 
50
                /// Gets the current line.
 
51
                int32_t Line() const;
 
52
        };
 
53
CL_NS_END
 
54
#endif