自动生成C ++源代码和头文件(更改反之亦然)文件 [英] Automatically generate C++ Source and Header (and update vice versa on changes) files

查看:232
本文介绍了自动生成C ++源代码和头文件(更改反之亦然)文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

是否有一些工具(希望emacs)可以更新和添加正确的函数定义和其他东西来保持源(.cpp)和头(.h)文件同步。

Is there some tool (hopefully emacs) that can update and add the correct function definitions and other things to keep the source (.cpp) and the header (.h) files synchronized.

例如,如果我开始这样做:

For example if I start doing this:

file: aaa.h

Class AAA {
   int b;
public:
   void func();
};

将自动创建和添加的东西:

something that will automatically create and add:

file: aaa.cpp

void AAA:func() {

}

任何更改都会出现在这两个?

And any changes will appear on both?

我只是在做梦吗? / p>

Am I just dreaming too much?

推荐答案

几乎重复的问题被问到 here 和我的 answer 描述了我们用于从单个文件转到单独的标头和源文件的工具: lzz

An almost duplicate question was asked here and my answer describes the tool that we use to go from a single file to separate header and source files: lzz.

我不知道可以做反向翻译的任何工具。

I don't know of any tool that can do the reverse translation.

这篇关于自动生成C ++源代码和头文件(更改反之亦然)文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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