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

API Documentation


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

ParserPlugins.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      : 2006/7/9
00013 //
00014 #ifndef _PARSERPLUGINS_H
00015 #define _PARSERPLUGINS_H
00016 
00017 #include "FirteXCOM.h"
00018 #include "../utility/StdHeader.h"
00019 #include "../parser/Parser.h"
00020 #include <map>
00021 
00022 namespace firtex
00023 {
00024         namespace plugin
00025         {               
00026                 class CParserPlugin : public firtex::parser::CParser
00027                 {
00028                 public:
00029                         CParserPlugin(IParserPlugin* pParserInterface);
00030                         virtual ~CParserPlugin();
00031                 public:
00037                         void            setTermVector(const tchar* field,TermVector_ tv);
00038 
00044                         TermVector_     getTermVector(const tchar* field);
00045                 protected:
00051                         bool    parseInternal(CIndexParameter* pArg);
00052 
00057                         void    defineSchema(CDocumentSchema* pSchema);
00058 
00062                         tstring getFileType();          
00063                 protected:
00064                         IParserPlugin*          m_pParserInterface;
00065                         IDocument*                      m_pDocumentInterface;
00066                         IIndexParameter*        m_pParameterInterface;
00067                         CIndexParameter*        m_pOuterParameter;                      
00068                 };
00069 
00070                 class CParserPlugins
00071                 {
00072                 public:
00073                         CParserPlugins(void);
00074                         virtual~CParserPlugins(void);
00075                 public: 
00082                         CParserPlugin*  getParserByIdentifier(const tchar* identifier);
00083 
00090                         CParserPlugin*  getParser(const tchar* fileType);
00091 
00095                         void                    clear();                
00096                 protected:
00097                         map<tstring,IParserPlugin*>     m_pluginMap;
00098                         bool                            m_bCOMInit;
00099                 };
00100         }
00101 }
00102 
00103 
00104 #endif
00105 

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