00001 /*========================================================================== 00002 * Copyright (c) 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 // DiskDocumentDataIterator 00014 // 00015 // 21 January 2005 -- tds 00016 // 00017 00018 #ifndef INDRI_DISKDOCUMENTDATAITERATOR_HPP 00019 #define INDRI_DISKDOCUMENTDATAITERATOR_HPP 00020 00021 #include "indri/File.hpp" 00022 #include "indri/SequentialReadBuffer.hpp" 00023 #include "indri/DocumentDataIterator.hpp" 00024 #include "indri/DocumentData.hpp" 00025 00026 namespace indri { 00027 namespace index { 00028 class DiskDocumentDataIterator : public DocumentDataIterator { 00029 private: 00030 indri::file::SequentialReadBuffer* _readBuffer; 00031 UINT64 _fileSize; 00032 00033 DocumentData _documentData; 00034 indri::file::File& _documentDataFile; 00035 bool _finished; 00036 00037 public: 00038 DiskDocumentDataIterator( indri::file::File& documentDataFile ); 00039 ~DiskDocumentDataIterator(); 00040 00041 void startIteration(); 00042 bool nextEntry(); 00043 const DocumentData* currentEntry(); 00044 bool finished(); 00045 }; 00046 } 00047 } 00048 00049 #endif // INDRI_DISKDOCUMENTDATAITERATOR_HPP 00050