The Unknown
The Unknown

Reputation: 19734

Automatically generate C++ Source and Header (and update vice versa on changes) files

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?

Am I just dreaming too much?

Upvotes: 11

Views: 4258

Answers (3)

Dolphin
Dolphin

Reputation: 4772

Xrefactory (fairly expensive tool) might be able to do what you are looking for. I haven't used it (I use Visual Studio + Visual Assist myself) but it shows up on a google search for 'emacs refactoring tools'.

Upvotes: 0

Richard Corden
Richard Corden

Reputation: 21731

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.

Upvotes: 7

Klaim
Klaim

Reputation: 69802

Visual Studio + Visual Assist X does it (see Refactoring features).

But indeed, it's not emacs based :/

Upvotes: 2

Related Questions