x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
mfc.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\regex\mfc.hpp
旋转
特效
属性
历史版本
/* * * Copyright (c) 2004 * John Maddock * * Use, modification and distribution are subject to the * Boost Software License, Version 1.0. (See accompanying file * LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt) * */ /* * LOCATION: see http://www.boost.org for most recent version. * FILE mfc.hpp * VERSION see
* DESCRIPTION: Overloads and helpers for using MFC/ATL string types with Boost.Regex. */ #ifndef BOOST_REGEX_MFC_HPP #define BOOST_REGEX_MFC_HPP #include
#include
namespace boost{ // // define the types used for TCHAR's: typedef basic_regex
tregex; typedef match_results
tmatch; typedef regex_iterator
tregex_iterator; typedef regex_token_iterator
tregex_token_iterator; #if _MSC_VER >= 1310 #define SIMPLE_STRING_PARAM class B, bool b #define SIMPLE_STRING_ARG_LIST B, b #else #define SIMPLE_STRING_PARAM class B #define SIMPLE_STRING_ARG_LIST B #endif // // define regex creation functions: // template
inline basic_regex
make_regex(const ATL::CSimpleStringT
& s, ::boost::regex_constants::syntax_option_type f = boost::regex_constants::normal) { basic_regex
result(s.GetString(), s.GetString() + s.GetLength(), f); return result; } // // regex_match overloads: // template
inline bool regex_match(const ATL::CSimpleStringT
& s, match_results
& what, const basic_regex
& e, boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { return ::boost::regex_match(s.GetString(), s.GetString() + s.GetLength(), what, e, f); } template
inline bool regex_match(const ATL::CSimpleStringT
& s, const basic_regex
& e, boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { return ::boost::regex_match(s.GetString(), s.GetString() + s.GetLength(), e, f); } // // regex_search overloads: // template
inline bool regex_search(const ATL::CSimpleStringT
& s, match_results
& what, const basic_regex
& e, boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { return ::boost::regex_search(s.GetString(), s.GetString() + s.GetLength(), what, e, f); } template
inline bool regex_search(const ATL::CSimpleStringT
& s, const basic_regex
& e, boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { return ::boost::regex_search(s.GetString(), s.GetString() + s.GetLength(), e, f); } // // regex_iterator creation: // template
inline regex_iterator
make_regex_iterator(const ATL::CSimpleStringT
& s, const basic_regex
& e, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { regex_iterator
result(s.GetString(), s.GetString() + s.GetLength(), e, f); return result; } template
inline regex_token_iterator
make_regex_token_iterator(const ATL::CSimpleStringT
& s, const basic_regex
& e, int sub = 0, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { regex_token_iterator
result(s.GetString(), s.GetString() + s.GetLength(), e, sub, f); return result; } template
inline regex_token_iterator
make_regex_token_iterator(const ATL::CSimpleStringT
& s, const basic_regex
& e, const std::vector
& subs, ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { regex_token_iterator
result(s.GetString(), s.GetString() + s.GetLength(), e, subs, f); return result; } template
inline regex_token_iterator
make_regex_token_iterator(const ATL::CSimpleStringT
& s, const basic_regex
& e, const int (& subs)[N], ::boost::regex_constants::match_flag_type f = boost::regex_constants::match_default) { regex_token_iterator
result(s.GetString(), s.GetString() + s.GetLength(), e, subs, f); return result; } template
OutputIterator regex_replace(OutputIterator out, BidirectionalIterator first, BidirectionalIterator last, const basic_regex
& e, const ATL::CSimpleStringT
& fmt, match_flag_type flags = match_default) { return ::boost::regex_replace(out, first, last, e, fmt.GetString(), flags); } namespace re_detail{ template
class mfc_string_out_iterator { ATL::CSimpleStringT
* out; public: mfc_string_out_iterator(ATL::CSimpleStringT
& s) : out(&s) {} mfc_string_out_iterator& operator++() { return *this; } mfc_string_out_iterator& operator++(int) { return *this; } mfc_string_out_iterator& operator*() { return *this; } mfc_string_out_iterator& operator=(B v) { out->AppendChar(v); return *this; } typedef std::ptrdiff_t difference_type; typedef B value_type; typedef value_type* pointer; typedef value_type& reference; typedef std::output_iterator_tag iterator_category; }; } template
ATL::CSimpleStringT
regex_replace(const ATL::CSimpleStringT
& s, const basic_regex
& e, const ATL::CSimpleStringT
& fmt, match_flag_type flags = match_default) { ATL::CSimpleStringT
result(s.GetManager()); re_detail::mfc_string_out_iterator
i(result); regex_replace(i, s.GetString(), s.GetString() + s.GetLength(), e, fmt.GetString(), flags); return result; } } // namespace boost. #endif
mfc.hpp
网页地址
文件地址
上一页
4/7
下一页
下载
( 6 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.