[英]How can I create several butterfly diagrams at once in Understand?
In the "Show Graphic Views" menu of Understand , there is the option to create a butterfly graph , for one specific entity as seen below:在“了解”的“显示图形视图”菜单中,可以选择为一个特定实体创建蝴蝶图,如下所示:
In addition, there is the und command as well.此外,还有und 命令。 This command has the capability of running commands in a batch in the following way:
该命令具有以下方式批量运行命令的能力:
Once you have identified the commands you want to run using interactive mode, place those exact commands in a text file.
确定要使用交互模式运行的命令后,将这些确切的命令放在文本文件中。 No need to include the first und command or the quit command, those are handled automatically.
无需包含第一个 und 命令或 quit 命令,它们会自动处理。
Then all you have to do is run
然后你所要做的就是运行
und myCommands.txt
和 myCommands.txt
I have over 1000 c++ classes that I want to create butterfly diagrams for.我有超过 1000 个 c++ 类,我想为其创建蝴蝶图。 Given the automation capability of the und command, and the ability for understand to create butterfly diagrams for various entities I wanted to know....
鉴于 und 命令的自动化能力,以及理解为我想知道的各种实体创建蝴蝶图的能力......
Is there a way for Understand to automate the creation of butterfly diagrams?有没有办法让理解自动创建蝴蝶图?
Yes, you can script this using perl or Python... Open the tool, and check out the top menu, Help >> Perl API or Help >> Python API... There is a help on the API They show an example like this (create the "callby" graph for all the funcions...), just change it to butterfly. Yes, you can script this using perl or Python... Open the tool, and check out the top menu, Help >> Perl API or Help >> Python API... There is a help on the API They show an example like这个(为所有函数创建“callby”图......),只需将其更改为蝴蝶。
import understand
db = understand.open("test.udb")
for func in db.ents("function,method,procedure"):
file = "callby_" + func.name() + ".png"
print (func.longname(),"->",file)
func.draw("Called By",file)
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.