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

DiskDocExtentListIterator.hpp

Go to the documentation of this file.
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 // DiskDocExtentListIterator
00014 //
00015 // 13 December 2004 -- tds
00016 //
00017 
00018 #ifndef INDRI_DISKDOCEXTENTLISTITERATOR_HPP
00019 #define INDRI_DISKDOCEXTENTLISTITERATOR_HPP
00020 
00021 #include "indri/SequentialReadBuffer.hpp"
00022 #include "indri/DocExtentListIterator.hpp"
00023 
00024 namespace indri {
00025   namespace index {
00026     class DiskDocExtentListIterator : public DocExtentListIterator {
00027     private:
00028       const char* _list;
00029       const char* _listEnd;
00030       int _skipDocument;
00031 
00032       indri::file::SequentialReadBuffer* _file;
00033       UINT64 _startOffset;
00034       bool _numeric;
00035       bool _ordinal;
00036       bool _parental;
00037 
00038       DocumentExtentData _data;
00039       bool _finished;
00040 
00041       void _readEntry();
00042       void _readSkip();
00043 
00044     public:
00045       DiskDocExtentListIterator( indri::file::SequentialReadBuffer* buffer, UINT64 startOffset );
00046       ~DiskDocExtentListIterator();
00047       
00048       void setStartOffset( UINT64 startOffset );
00049 
00050       bool finished() const;
00051       void startIteration();
00052       bool nextEntry();
00053       bool nextEntry( lemur::api::DOCID_T documentID );
00054       DocumentExtentData* currentEntry();
00055     };
00056   }
00057 }
00058 
00059 #endif // INDRI_DISKDOCEXTENTLISTITERATOR_HPP
00060 

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