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

API Documentation


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

DateTimeAnalyzer.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/7/24
00013 //
00014 #ifndef __DATETIMEANALYZER_H
00015 #define __DATETIMEANALYZER_H
00016 
00017 #if _MSC_VER > 1000
00018 #pragma once
00019 #endif // _MSC_VER > 1000
00020 
00021 #include "Analyzer.h"
00022 
00023 namespace firtex
00024 {
00025         namespace analyzer
00026         {
00027 
00028                 struct DateTime
00029                 {
00030                         int year, 
00031                                 month,
00032                                 day,
00033                                 hour,
00034                                 minute,
00035                                 second;
00036                 };
00037 
00038                 class CDateTimeAnalyzer :       public CAnalyzer
00039                 {
00040                 public:
00041                         static const string category;
00042                         static const string identifier;         
00043                 public:
00044                         CDateTimeAnalyzer(void);
00045                         virtual ~CDateTimeAnalyzer(void);
00046                 public:
00051                         TokenType       getTokenType(){return TOKEN_DATE;};
00052 
00059                         CTokens*        nextTokens(CReader* reader,CTokens* pInput=NULL);               
00060 
00064                         void            close();
00065                 public:
00073                         static int64_t          parse(const tchar* str);
00074                 protected:
00075                         static bool     checkDate(const char* pszDate, DateTime &dt);                                   
00076                 };
00077         }
00078 }
00079 
00080 #endif

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