FirteX-高性能全文索引和检索平台API Documentation |
00001 // 00002 // Copyright(C) 2005--2006 Institute of Computing Tech, Chinese Academy of Sciences. 00003 // All rights reserved. 00004 // This file is part of FirteX (www.firtex.org) 00005 // 00006 // Use of the FirteX is subject to the terms of the software license set forth in 00007 // the LICENSE file included with this software, and also available at 00008 // http://www.firtex.org/license.html 00009 // 00010 // Author : 郭瑞杰(GuoRuijie) 00011 // Email : ruijieguo@software.ict.ac.cn 00012 // Created : 2005/12/23 00013 // 00014 #ifndef _TERMINFO_H 00015 #define _TERMINFO_H 00016 00017 #include "../utility/StdHeader.h" 00018 00019 namespace firtex 00020 { 00021 namespace index 00022 { 00023 class CTermInfo 00024 { 00025 public: 00026 00027 CTermInfo(void) 00028 { 00029 m_docFreq = 0; 00030 m_docFreqPointer = 0; 00031 m_posPointer = 0; 00032 } 00033 CTermInfo(const CTermInfo& ti) 00034 { 00035 m_docFreq = ti.m_docFreq; 00036 m_docFreqPointer = ti.m_docFreqPointer; 00037 m_posPointer = ti.m_posPointer; 00038 } 00039 CTermInfo(count_t df,fileoffset_t dp,fileoffset_t pp) 00040 { 00041 m_docFreq = df; 00042 m_docFreqPointer = dp; 00043 m_posPointer = pp; 00044 } 00045 00046 ~CTermInfo(void) 00047 { 00048 } 00049 public: 00050 count_t docFreq()const{return m_docFreq;} 00051 fileoffset_t docPointer(){return m_docFreqPointer;} 00052 fileoffset_t posPointer(){return m_posPointer;} 00053 00054 void set(count_t df,fileoffset_t dp,fileoffset_t pp) 00055 { 00056 m_docFreq = df; 00057 m_docFreqPointer = dp; 00058 m_posPointer = pp; 00059 } 00060 protected: 00061 count_t m_docFreq; 00062 fileoffset_t m_docFreqPointer; 00063 fileoffset_t m_posPointer; 00064 }; 00065 00066 } 00067 } 00068 00069 00070 00071 #endif
http://www.firtex.org http://www.sourceforge.net/projects/firtex