Main Page | Namespace List | Class Hierarchy | Class List | File List | Namespace Members | Class Members | File Members | Related Pages

KeyfileDocListSegmentReader.hpp

Go to the documentation of this file.
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 namespace lemur 
00026 {
00027   namespace file 
00028   {
00029     
00031     class KeyfileDocListSegmentReader {
00032     private:
00033       File* _stream;
00034       ReadBuffer* _file;
00035       lemur::index::InvFPDocList* _top;
00036       int _segment;
00037       std::string _name;
00038 
00039     public:
00041       KeyfileDocListSegmentReader( File* stream, std::string& baseName, 
00042                                    int segment, int readBufferSize );
00043       ~KeyfileDocListSegmentReader();
00045       File* file();
00047       lemur::index::InvFPDocList* next();
00049       bool operator<( const KeyfileDocListSegmentReader& other ) const;
00050 
00052       const lemur::index::InvFPDocList* top() const;
00054       lemur::index::InvFPDocList* top();
00055 
00057       void pop();
00059       int segment() const;
00061       const std::string& name() const;
00062     };
00063   }
00064 }
00065 
00066 #endif // LEMUR_KEYFILEDOCLISTSEGMENTREADER_HPP

Generated on Tue Jun 15 11:02:54 2010 for Lemur by doxygen 1.3.4