x
Yes
No
Do you want to visit DriveHQ English website?
首页
产品服务
价格
免费试用
下载客户端
关于我们
云文件服务
|
云备份服务
|
FTP服务
|
企业邮箱服务
|
网站托管
|
客户端软件
云文件服务
云备份服务
FTP服务
企业级邮箱服务
网站托管
客户端软件
gen_signal_N.pl - Hosted on DriveHQ Cloud IT Platform
返回上层目录
上传
下载
共享
发布
新建文件夹
新建文件
复制
剪切
删除
粘贴
评论
升级服务
路径: \\game3dprogramming\materials\GameFactory\GameFactoryDemo\references\boost_1_35_0\boost\signals\detail\gen_signal_N.pl
旋转
特效
属性
历史版本
#!/usr/bin/perl -w # # Boost.Signals library # Copyright Douglas Gregor 2001-2003. Use, modification and # distribution is 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) # For more information, see http://www.boost.org use English; if ($#ARGV < 0) { print "Usage: perl gen_signal_N
\n"; exit; } $totalNumArgs = $ARGV[0]; for ($numArgs = 0; $numArgs <= $totalNumArgs; ++$numArgs) { open OUT, ">signal$numArgs.hpp"; print OUT "// Boost.Signals library\n"; print OUT "//\n"; print OUT "// Copyright (C) 2001 Doug Gregor (gregod\@cs.rpi.edu)\n"; print OUT "//\n"; print OUT "// Permission to copy, use, sell and distribute this software is granted\n"; print OUT "// provided this copyright notice appears in all copies.\n"; print OUT "// Permission to modify the code and to distribute modified code is granted\n"; print OUT "// provided this copyright notice appears in all copies, and a notice\n"; print OUT "// that the code was modified is included with the copyright notice.\n"; print OUT "//\n"; print OUT "// This software is provided \"as is\" without express or implied warranty,\n"; print OUT "// and with no claim as to its suitability for any purpose.\n"; print OUT " \n"; print OUT "// For more information, see http://www.boost.org\n"; print OUT "\n"; print OUT "#ifndef BOOST_SIGNALS_SIGNAL" . $numArgs . "_HEADER\n"; print OUT "#define BOOST_SIGNALS_SIGNAL" , $numArgs . "_HEADER\n"; print OUT "\n"; print OUT "#define BOOST_SIGNALS_NUM_ARGS $numArgs\n"; $templateParms = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $templateParms .= ", "; } $templateParms .= "typename T$i"; } print OUT "#define BOOST_SIGNALS_TEMPLATE_PARMS $templateParms\n"; $_ = $templateParms; s/typename //g; $templateArgs = $_; print OUT "#define BOOST_SIGNALS_TEMPLATE_ARGS $templateArgs\n"; $parms = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $parms .= ", "; } $parms .= "T$i a$i"; } print OUT "#define BOOST_SIGNALS_PARMS $parms\n"; $args = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $args .= ", "; } $args .= "a$i"; } print OUT "#define BOOST_SIGNALS_ARGS $args\n"; $boundArgs = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $boundArgs .= ", "; } $boundArgs .= "args->a$i"; } print OUT "#define BOOST_SIGNALS_BOUND_ARGS $boundArgs\n"; $argsAsMembers = ""; for ($i = 1; $i <= $numArgs; ++$i) { $argsAsMembers .= "T$i a$i;"; } print OUT "#define BOOST_SIGNALS_ARGS_AS_MEMBERS $argsAsMembers\n"; $copyParms = ""; for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $copyParms .= ", "; } $copyParms .= "T$i ia$i"; } print OUT "#define BOOST_SIGNALS_COPY_PARMS $copyParms\n"; $initArgs = ""; if ($numArgs > 0) { $initArgs = ":"; } for ($i = 1; $i <= $numArgs; ++$i) { if ($i > 1) { $initArgs .= ", "; } $initArgs .= "a$i(ia$i)"; } print OUT "#define BOOST_SIGNALS_INIT_ARGS $initArgs\n"; $argTypes = ""; for ($i = 1; $i <= $numArgs; ++$i) { $argTypes .= "typedef T$i arg". ($i+1) . "_type; "; } print OUT "#define BOOST_SIGNALS_ARG_TYPES $argTypes\n"; print OUT "\n"; print OUT "#include
\n"; print OUT "\n"; print OUT "#undef BOOST_SIGNALS_ARG_TYPES\n"; print OUT "#undef BOOST_SIGNALS_INIT_ARGS\n"; print OUT "#undef BOOST_SIGNALS_COPY_PARMS\n"; print OUT "#undef BOOST_SIGNALS_ARGS_AS_MEMBERS\n"; print OUT "#undef BOOST_SIGNALS_BOUND_ARGS\n"; print OUT "#undef BOOST_SIGNALS_ARGS\n"; print OUT "#undef BOOST_SIGNALS_PARMS\n"; print OUT "#undef BOOST_SIGNALS_TEMPLATE_ARGS\n"; print OUT "#undef BOOST_SIGNALS_TEMPLATE_PARMS\n"; print OUT "#undef BOOST_SIGNALS_NUM_ARGS\n"; print OUT "\n"; print OUT "#endif // BOOST_SIGNALS_SIGNAL" . $numArgs . "_HEADER\n"; close OUT; }
gen_signal_N.pl
网页地址
文件地址
上一页
2/6
下一页
下载
( 4 KB )
Comments
Total ratings:
0
Average rating:
无评论
of 10
Would you like to comment?
Join now
, or
Logon
if you are already a member.