00001 /*========================================================================== 00002 * Copyright (c) 2002-2005 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 // 00014 // CombinedVocabularyIterator 00015 // 00016 // 20 January 2005 -- tds 00017 // 00018 00019 #ifndef INDRI_COMBINEDVOCABULARYITERATOR_HPP 00020 #define INDRI_COMBINEDVOCABULARYITERATOR_HPP 00021 00022 #include "indri/VocabularyIterator.hpp" 00023 #include "indri/DiskTermData.hpp" 00025 namespace indri { 00027 namespace index { 00028 class CombinedVocabularyIterator : public VocabularyIterator { 00029 private: 00030 VocabularyIterator* _first; 00031 VocabularyIterator* _second; 00032 int _secondBase; 00033 bool _finished; 00034 bool _usingSecond; 00035 00036 public: 00037 CombinedVocabularyIterator( VocabularyIterator* first, VocabularyIterator* second, int secondBase ); 00038 ~CombinedVocabularyIterator(); 00039 00040 void startIteration(); 00041 bool nextEntry(); 00042 bool nextEntry(const char *skipTo); 00043 DiskTermData* currentEntry(); 00044 bool finished(); 00045 }; 00046 } 00047 } 00048 00049 #endif // INDRI_COMBINEDVOCABULARYITERATOR_HPP 00050