x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
config_file_iterator.hpp - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\test\utils\runtime\file\config_file_iterator.hpp
旋转
特效
属性
历史版本
// (C) Copyright Gennadiy Rozental 2005-2007. // 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) // See http://www.boost.org/libs/test for the library home page. // // File : $RCSfile$ // // Version : $Revision: 43798 $ // // Description : flexible configuration file iterator definition // *************************************************************************** #ifndef BOOST_RT_FILE_CONFIG_FILE_ITERATOR_HPP_062604GER #define BOOST_RT_FILE_CONFIG_FILE_ITERATOR_HPP_062604GER // Boost.Runtime.Parameter #include
#include
// Boost.Test #include
#include
#include
// Boost #include
namespace boost { namespace BOOST_RT_PARAM_NAMESPACE { namespace file { // Public typedef typedef std::pair
location; // ************************************************************************** // // ************** modifiers ************** // // ************************************************************************** // namespace cfg_detail { struct path_separators_t; struct line_delimeter_t; struct sl_comment_delimeter_t; struct command_delimeter_t; struct line_beak_t; struct macro_ref_begin_t; struct macro_ref_end_t; struct include_kw_t; struct define_kw_t; struct undef_kw_t; struct ifdef_kw_t; struct ifndef_kw_t; struct else_kw_t; struct endif_kw_t; struct buffer_size_t; struct trim_leading_spaces_t; struct trim_trailing_spaces_t; struct skip_empty_lines_t; struct detect_missing_macro_t; } // namespace cfg_detail namespace { nfp::typed_keyword
path_separators; nfp::typed_keyword
line_delimeter; nfp::typed_keyword
single_line_comment_delimeter; nfp::typed_keyword
command_delimeter; nfp::typed_keyword
line_beak; nfp::typed_keyword
macro_ref_begin; nfp::typed_keyword
macro_ref_end; nfp::typed_keyword
include_kw; nfp::typed_keyword
define_kw; nfp::typed_keyword
undef_kw; nfp::typed_keyword
ifdef_kw; nfp::typed_keyword
ifndef_kw; nfp::typed_keyword
else_kw; nfp::typed_keyword
endif_kw; nfp::typed_keyword
buffer_size; nfp::typed_keyword
trim_leading_spaces; nfp::typed_keyword
trim_trailing_spaces; nfp::typed_keyword
skip_empty_lines; nfp::typed_keyword
detect_missing_macro; } // local namespace // ************************************************************************** // // ************** runtime::file::config_file_iterator ************** // // ************************************************************************** // class config_file_iterator : public unit_test::input_iterator_facade
{ typedef unit_test::input_iterator_facade
base; public: // Public typedefs typedef unit_test::callback1
command_handler; // Constructors config_file_iterator() {} explicit config_file_iterator( cstring file_name ) { construct(); load( file_name ); } template
config_file_iterator( cstring file_name, Modifiers const& m ) { construct(); m.apply_to( *this ); load( file_name ); } config_file_iterator( config_file_iterator const& rhs ) : base( rhs ) , m_pimpl( rhs.m_pimpl ) { rhs.m_valid = false; } void operator=( config_file_iterator const& rhs ) { if( this == &rhs ) return; (base&)(*this) = rhs; m_pimpl = rhs.m_pimpl; rhs.m_valid = false; } // Assignment // Access methods location const& curr_location(); void register_command_handler( cstring command_kw, command_handler const& ); // Parameters setters void set_parameter( rtti::id_t, cstring ); void set_parameter( rtti::id_t, bool ); void set_parameter( rtti::id_t, char_type ); void set_parameter( rtti::id_t, std::size_t ); private: friend class unit_test::input_iterator_core_access; void construct(); void load( cstring file_name ); // increment implementation bool get(); // Data members struct Impl; shared_ptr
m_pimpl; }; } // namespace file } // namespace BOOST_RT_PARAM_NAMESPACE } // namespace boost #endif // BOOST_RT_FILE_CONFIG_FILE_ITERATOR_HPP_062604GER
config_file_iterator.hpp
网页地址
文件地址
上一页
4/4 下一页
下载
( 5 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.