代码拉取完成,页面将自动刷新
将 C/C++ 代码转换为流程图
两种样式:
折线 | 平滑 |
cargo install cxx2flow
可以到 GitHub Actions 或 Nightly.link 下载最新构建的二进制,包含 Linux 和 Windows 版本。
为了编译生成的 dot 文件,你需要安装 graphviz,并将其添加到 PATH 中。也可以将生成的结果复制进在线的 graphviz 服务中,如 http://magjac.com/graphviz-visual-editor/ 。
cxx2flow 0.1.6
mgt. <mgt@oi-wiki.org>
Convert your C/C++ code to control flow chart
USAGE:
cxx2flow [FLAGS] [OPTIONS] <INPUT> [FUNCTION]
FLAGS:
-c, --curved Sets the style of the flow chart.
If specified, output flow chart will have curved connection line.
-h, --help Prints help information
-V, --version Prints version information
OPTIONS:
-o, --output <OUTPUT> Sets the output file.
If not specified, result will be directed to stdout.
e.g. graph.dot
ARGS:
<INPUT> Sets the input file. e.g. test.cpp
<FUNCTION> The function you want to convert. e.g. main
Note that you need to manually compile the dot file using graphviz to get SVG or PNG files.
EXAMPLES:
cxx2flow test.cpp | dot -Tpng -o test.png
cxx2flow main.cpp my_custom_func | dot -Tsvg -o test.svg
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。