首页 开发技术 其它     /    fire-hpp:针对C++的Fire:使用函数签名创建功能齐全的CLI-源码

fire-hpp:针对C++的Fire:使用函数签名创建功能齐全的CLI-源码

上传者: weixin_42168902 | 上传时间:2017/5/8 18:04:54 | 文件大小:39KB | 文件类型:ZIP
fire-hpp:针对C++的Fire:使用函数签名创建功能齐全的CLI-源码
为C++开火受启发的FireforC++是一个单个标头库,可从函数签名创建命令行界面。
这是使用命令即将两个数字相加的整个程序:#include#includeintfired_main(intx=fire::arg("-x"),inty=fire::arg("-y")){std::cout<<x+y<<std::endl;return0;}FIRE(fired_main)就这样。
用法:$./add-x=1-y=23如您所料,--help显示带有必需参数及其类型的有意义的消息。
将显示一条错误消息,说明使用不正确。
该程序可在Linux,Windows和MacOS上运行。
有关其他类型的参数,请参见。
为什么还有另一个CLI库?对于大多数库,创建CLI大致遵循以下模式:定义参数调用parse(argc,argv);检查parse()是否检测到错误,将其打印并返回(可选)检查-h和--help,打印帮助消息

文件下载

资源详情

[{"title":"(25个子文件39KB)fire-hpp:针对C++的Fire:使用函数签名创建功能齐全的CLI-源码","children":[{"title":"fire-hpp-master","children":[{"title":"CMakeLists.txt <span style='color:#111;'>1.84KB</span>","children":null,"spread":false},{"title":"examples","children":[{"title":"all_combinations.cpp <span style='color:#111;'>1.25KB</span>","children":null,"spread":false},{"title":"basic.cpp <span style='color:#111;'>919B</span>","children":null,"spread":false},{"title":"no_exceptions.cpp <span style='color:#111;'>1.13KB</span>","children":null,"spread":false},{"title":"CMakeLists.txt <span style='color:#111;'>1.04KB</span>","children":null,"spread":false},{"title":"variadic.cpp <span style='color:#111;'>1.48KB</span>","children":null,"spread":false},{"title":"positional.cpp <span style='color:#111;'>1020B</span>","children":null,"spread":false},{"title":"LICENCE <span style='color:#111;'>643B</span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'>144B</span>","children":null,"spread":false},{"title":"raw_args.cpp <span style='color:#111;'>1.25KB</span>","children":null,"spread":false},{"title":"optional_and_default.cpp <span style='color:#111;'>1.06KB</span>","children":null,"spread":false},{"title":"flag.cpp <span style='color:#111;'>1015B</span>","children":null,"spread":false}],"spread":false},{"title":"LICENCE <span style='color:#111;'>1.34KB</span>","children":null,"spread":false},{"title":"README.md <span style='color:#111;'>13.33KB</span>","children":null,"spread":false},{"title":"tests","children":[{"title":"tests.cpp <span style='color:#111;'>22.18KB</span>","children":null,"spread":false},{"title":"create_build_dirs_txt.cmake <span style='color:#111;'>198B</span>","children":null,"spread":false},{"title":"CMakeLists.txt <span style='color:#111;'>1.35KB</span>","children":null,"spread":false},{"title":"link_main.cpp <span style='color:#111;'>1.51KB</span>","children":null,"spread":false},{"title":"run_release_tests.py <span style='color:#111;'>5.06KB</span>","children":null,"spread":false},{"title":"run_standard_tests.py <span style='color:#111;'>2.32KB</span>","children":null,"spread":false},{"title":"run_examples.py <span style='color:#111;'>6.40KB</span>","children":null,"spread":false},{"title":"link_func.cpp <span style='color:#111;'>1.46KB</span>","children":null,"spread":false}],"spread":true},{"title":"conanfile.py <span style='color:#111;'>1.18KB</span>","children":null,"spread":false},{"title":".gitignore <span style='color:#111;'>88B</span>","children":null,"spread":false},{"title":"include","children":[{"title":"fire-hpp","children":[{"title":"fire.hpp <span style='color:#111;'>42.54KB</span>","children":null,"spread":false}],"spread":true}],"spread":true}],"spread":true}],"spread":true}]

评论信息

免责申明

【好快吧下载】的资源来自网友分享,仅供学习研究,请务必在下载后24小时内给予删除,不得用于其他任何用途,否则后果自负。基于互联网的特殊性,【好快吧下载】 无法对用户传输的作品、信息、内容的权属或合法性、合规性、真实性、科学性、完整权、有效性等进行实质审查;无论 【好快吧下载】 经营者是否已进行审查,用户均应自行承担因其传输的作品、信息、内容而可能或已经产生的侵权或权属纠纷等法律责任。
本站所有资源不代表本站的观点或立场,基于网友分享,根据中国法律《信息网络传播权保护条例》第二十二条之规定,若资源存在侵权或相关问题请联系本站客服人员,8686821#qq.com,请把#换成@,本站将给予最大的支持与配合,做到及时反馈和处理。关于更多版权及免责申明参见 版权及免责申明