FirteX-高性能全文索引和检索平台

API Documentation


首页 | 名字空间列表 | 类继承关系 | 组合类型列表 | $(BL\录(B | 文件列表 | 名字空间成员 | 组合类型成员 | 文件成员

TokenFilter.h

浏览该文件的文档。
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,ruijieguo@gmail.com
00012 // Created      : 2005/11/24
00013 //
00014 #ifndef __TOKENFILTER_H
00015 #define __TOKENFILTER_H
00016 #include "Tokens.h"
00017 
00018 namespace firtex
00019 {
00020         namespace analyzer
00021         {
00022                 class CTokenFilter
00023                 {
00024                 public:
00025 
00026                         CTokenFilter(void):m_pInputFilter(NULL)
00027                         {
00028                         }
00029                         CTokenFilter(CTokenFilter* pInputFilter):m_pInputFilter(pInputFilter)
00030                         {
00031                         }
00032                         virtual ~CTokenFilter(void)
00033                         {
00034                                 if(m_pInputFilter)
00035                                 {
00036                                         delete m_pInputFilter;
00037                                         m_pInputFilter = NULL;
00038                                 }
00039                         }
00040                 public:
00041                         CTokens* filter(CTokens* pInputTokens)
00042                         {
00043                                 CTokens* pTokens = pInputTokens;
00044                                 if(m_pInputFilter)
00045                                         pTokens = m_pInputFilter->filter(pInputTokens);
00046                                 return filterInternal(pTokens);
00047                         }
00048                 protected:
00049                         virtual CTokens* filterInternal(CTokens* pInputTokens) = 0;
00050                 protected:
00051                         CTokenFilter*   m_pInputFilter;
00052                 };
00053         }
00054 }
00055 
00056 
00057 #endif

http://www.firtex.org http://www.sourceforge.net/projects/firtex