CLucene - a full-featured, c++ search engine
API Documentation
00001 /*------------------------------------------------------------------------------ 00002 * Copyright (C) 2003-2006 Ben van Klinken and the CLucene Team 00003 * 00004 * Distributable under the terms of either the Apache License (Version 2.0) or 00005 * the GNU Lesser General Public License, as specified in the COPYING file. 00006 ------------------------------------------------------------------------------*/ 00007 #ifndef _lucene_util_FastCharStream_ 00008 #define _lucene_util_FastCharStream_ 00009 00010 #if defined(_LUCENE_PRAGMA_ONCE) 00011 # pragma once 00012 #endif 00013 00014 #include "CLucene/util/Reader.h" 00015 00016 CL_NS_DEF(util) 00017 00018 00019 class FastCharStream:LUCENE_BASE 00020 { 00021 static const int32_t maxRewindSize; 00022 int32_t pos; 00023 int32_t rewindPos; 00024 int64_t resetPos; 00025 int32_t col; 00026 int32_t line; 00027 // read character from stream return false on error 00028 void readChar(TCHAR &); 00029 public: 00030 Reader* input; 00031 00033 FastCharStream(Reader* reader); 00034 ~FastCharStream(); 00035 00037 int GetNext(); 00038 00039 void UnGet(); 00040 00042 int Peek(); 00043 00044 00046 bool Eos() const; 00047 00049 int32_t Column() const; 00050 00052 int32_t Line() const; 00053 }; 00054 CL_NS_END 00055 #endif