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

API Documentation


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

Misc.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/5/20
00013 //
00014 #ifndef _MISC_H
00015 #define _MISC_H
00016 #include "typedefs.h"
00017 #include <string>
00018 #include <algorithm>
00019 
00020 
00021 namespace firtex
00022 {
00023         namespace utility
00024         {
00025                 class CMisc
00026                 {
00027                 public:
00028                         CMisc(void);
00029                         ~CMisc(void);
00030                 public:
00031 
00035                         static int64_t CMisc::currentTimeMillis();
00036 
00037                         //for std::string                       
00038                         static tchar*   getBuffer(tstring& s,size_t len);       
00039                         
00043                         static bool             dirExists(const tchar* path);
00044 
00050                         static size_t   wctoutf8(char * utf, const wchar_t wc);
00051 
00057                         static size_t   wcstoutf8(char * utf,size_t ulen, const wchar_t * wcs, size_t wlen);
00058 
00066                         static size_t   utf8towc(wchar_t *wc, const char *utf, size_t ulen);
00072                         static size_t   utf8towcs(wchar_t * wcs,size_t wlen,const char * utf, size_t ulen);
00073 
00077                         static size_t   _wcstombs(char *mbs,size_t mlen,const wchar_t *wcs, size_t wlen);
00078 
00082                         static size_t   _mbstowcs(wchar_t *wcs, size_t wlen,const char *mbs, size_t mlen);
00083                 };
00084         }
00085 }
00086 
00087 #endif

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