00001 /*========================================================================== 00002 * Copyright (c) 2001 Carnegie Mellon University. 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 _INVFPTERM_HPP 00013 #define _INVFPTERM_HPP 00014 00015 #include "TermInfoList.hpp" 00016 #include "Term.hpp" 00017 #include "InvFPTypes.hpp" 00018 00020 00023 class InvFPTerm: public TermInfo, public Term { 00024 public: 00025 InvFPTerm() { tcount=1;} 00026 ~InvFPTerm() {}; 00027 00028 int strLength() const { return strlen; } 00029 void strLength(int len) { strlen = len; } 00030 LOC_T position() const { return loc; } 00031 const LOC_T* positions() const {vector<LOC_T>::const_iterator it(loclist->begin()); return &(*it); } 00032 void position(LOC_T pos) { loc = pos; } 00033 void positions(vector<LOC_T>* list) { loclist = list; } 00034 protected: 00035 int strlen; 00036 LOC_T loc; // where this term (currently) occurs in the document 00037 vector<LOC_T>* loclist; // list of all places term occurs in the document 00038 }; 00039 00040 #endif