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_queryParser_TokenList_ 00008 #define _lucene_queryParser_TokenList_ 00009 00010 #if defined(_LUCENE_PRAGMA_ONCE) 00011 # pragma once 00012 #endif 00013 00014 #include "CLucene/util/VoidList.h" 00015 #include "QueryToken.h" 00016 CL_NS_DEF(queryParser) 00017 00018 // Represents a list of the tokens. 00019 class TokenList:LUCENE_BASE 00020 { 00021 private: 00022 CL_NS(util)::CLVector<QueryToken*> tokens; //todo:,CL_NS(util)::Deletor::Object<QueryToken> 00023 public: 00024 TokenList(); 00025 ~TokenList(); 00026 00027 void add(QueryToken* token); 00028 00029 void push(QueryToken* token); 00030 00031 QueryToken* peek(); 00032 00033 QueryToken* extract(); 00034 00035 int32_t count() const; 00036 }; 00037 CL_NS_END 00038 #endif