00001 /*========================================================================== 00002 * Copyright (c) 2004 University of Massachusetts. All Rights Reserved. 00003 * 00004 * Use of the Lemur Toolkit for Language Modeling and Information Retrieval 00005 * is subject to the terms of the software license set forth in the LICENSE 00006 * file included with this software, and also available at 00007 * http://www.lemurproject.org/license.html 00008 * 00009 *========================================================================== 00010 */ 00011 00012 // 00013 // VocabularyIterator 00014 // 00015 // 23 November 2004 -- tds 00016 // 00017 00018 #ifndef INDRI_VOCABULARYITERATOR_HPP 00019 #define INDRI_VOCABULARYITERATOR_HPP 00020 00021 #include "indri/TermData.hpp" 00022 #include "indri/DiskTermData.hpp" 00023 00024 namespace indri { 00025 namespace index { 00026 class VocabularyIterator { 00027 public: 00028 virtual ~VocabularyIterator() {}; 00029 00030 virtual void startIteration() = 0; 00031 virtual bool finished() = 0; 00032 virtual bool nextEntry() = 0; 00033 virtual bool nextEntry(const char *skipTo) = 0; 00034 00035 virtual bool nextEntry(std::string skipTo) { 00036 return nextEntry(skipTo.c_str()); 00037 } 00038 00039 virtual DiskTermData* currentEntry() = 0; 00040 }; 00041 } 00042 } 00043 00044 #endif // INDRI_VOCABULARYITERATOR_HPP 00045 00046 00047