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 #ifndef _DOCPOSITIONINFOLIST_HPP 00013 #define _DOCPOSITIONINFOLIST_HPP 00014 00015 #include "DocInfoList.hpp" 00016 class DocPositionInfoList : public DocInfoList { 00017 public: 00019 virtual DocInfo* nextEntry( DOCID_T documentID ) = 0; 00020 // why is this required? 00021 virtual DocInfo* nextEntry() const = 0; 00022 virtual DocInfo* currentEntry() = 0; 00023 protected: 00024 // Helper functions for iterator, subclasses should override 00026 virtual DocInfo* newElement() const = 0; 00028 virtual void assignElement(DocInfo* to, DocInfo* from) const = 0; 00030 virtual DocInfo* getElement(DocInfo* elem, POS_T position) const = 0; 00032 virtual POS_T beginPosition() const = 0; 00034 virtual POS_T endPosition() const = 0; 00036 virtual POS_T nextPosition(POS_T position) const = 0; 00037 }; 00038 #endif 00039