00001 /*========================================================================== 00002 * Copyright (c) 2003 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 // KeyfileDocListSegmentReader 00015 // 00016 // tds - 13 November 2003 00017 // 00018 00019 #ifndef LEMUR_KEYFILEDOCLISTSEGMENTREADER_HPP 00020 #define LEMUR_KEYFILEDOCLISTSEGMENTREADER_HPP 00021 00022 #include "InvFPDocList.hpp" 00023 #include "ReadBuffer.hpp" 00024 #include "File.hpp" 00025 00029 class KeyfileDocListSegmentReader { 00030 private: 00031 File* _stream; 00032 ReadBuffer* _file; 00033 InvFPDocList* _top; 00034 int _segment; 00035 std::string _name; 00036 00037 public: 00039 KeyfileDocListSegmentReader( File* stream, std::string& baseName, 00040 int segment, int readBufferSize ); 00041 ~KeyfileDocListSegmentReader(); 00043 File* file(); 00045 InvFPDocList* next(); 00047 bool operator<( const KeyfileDocListSegmentReader& other ) const; 00048 00050 const InvFPDocList* top() const; 00052 InvFPDocList* top(); 00053 00055 void pop(); 00057 int segment() const; 00059 const std::string& name() const; 00060 }; 00061 00062 #endif // LEMUR_KEYFILEDOCLISTSEGMENTREADER_HPP