读取函数名称及其签名并以XML格式编写 [英] Reading function names and their signatures and writing them in XML format

查看:38
本文介绍了读取函数名称及其签名并以XML格式编写的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我想读取一个.h和.cpp文件,并获取函数名称及其签名
并以XML格式编写它们.能否请您告诉我它是否可能以及如何发生?所有编码都必须使用C ++进行.



谢谢.

Hi,

I want to read a .h and .cpp file and get the function names and their signatures
and write them in XML format.Can you please tell me wheter its possible or not and how?All coding has to be done in C++.



Thank You.

推荐答案

大多数类似的事情都是使用解析器完成的,或者什至是用预处理器/编译器对代码进行预处理.并且可能非常复杂.

看看doxygen,gcc-xml,cproto,....

祝你好运.
Most things like that are done with a parser, or, heck, even by pre-processing the code with a preprocessor/compiler.; and can be quite complex.

have a look at doxygen, gcc-xml, cproto, ....

Good luck.


当然可以,因为这些文件是文本,可以很容易地读取和解释.困难将在于识别功能并忽略其他所有内容.可能会有一些开源实用程序可以为您提供帮助.尝试在Google搜索中找到可以找到的内容.
Of course it is possible, since these files are text and can be read and interpreted quite easily. The difficulty will be in recognising functions and ignoring everything else. There may well be some open source utilities that can help you with this; try a Google search to see what you can find.


这篇关于读取函数名称及其签名并以XML格式编写的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆