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

IndriFieldInfoList.hpp

Go to the documentation of this file.
00001 /*==========================================================================
00002  * Copyright (c) 2007 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  * 26 Sep 2007 - mjh - initial file start
00012  */
00013 
00014 
00015 #ifndef _INDRIFIELDINFOLIST_HPP
00016 #define _INDRIFIELDINFOLIST_HPP
00017 
00018 #include "FieldInfoList.hpp"
00019 #include "indri/FieldExtent.hpp"
00020 #include "indri/greedy_vector"
00021 #include <vector>
00022 
00023 namespace lemur
00024 {
00025   namespace api 
00026   {
00027     
00034     class IndriFieldInfoList : public FieldInfoList {
00035     protected:
00036       int _position;
00037       std::vector<lemur::api::FieldInfo> _list;
00038       lemur::api::FieldInfo _currentInfo;
00039 
00040     public:
00041       virtual ~IndriFieldInfoList();
00042 
00043     protected:
00045       virtual FieldInfo* getElement(FieldInfo* elem, POS_T position) const;
00046 
00048       virtual POS_T beginPosition() const;
00049 
00051       virtual POS_T endPosition() const;
00052 
00054       virtual POS_T nextPosition(POS_T position) const;
00055 
00056     public:
00058       IndriFieldInfoList();
00059 
00061       IndriFieldInfoList(const indri::utility::greedy_vector< indri::index::FieldExtent > &fields);
00062 
00064       void add(indri::index::FieldExtent newExtent);
00065 
00066       // Single, internal iteration
00068       virtual void startIteration();
00069 
00071       virtual bool hasMore() const;
00072 
00074       virtual FieldInfo *nextEntry() const;
00075 
00077       virtual int size();
00078 
00080       virtual FieldInfo* operator[] (int index);
00081 
00082     }; // end class IndriFieldInfoList
00083   } // end namespace api 
00084 } // end namespace lemur
00085 
00086 
00087 #endif

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