rustyx
rustyx

Reputation: 85471

C++ source code text editor with .h .cpp sync support

Is there a (free) text editor that automatically synchronizes method declarations so that if I update method definition in a .CPP then its declaration in the .H gets updated automatically (and vice versa)?

Better yet, present the class' source code in a single editor view and generate .H and .CPP from it automatically.

MS Visual Studio has some support for that, but its not free.

Upvotes: 3

Views: 1200

Answers (3)

Bob
Bob

Reputation: 598

KDevelop has some support for it. Not flawless, but it is pretty good. One of my projects is cross platform, and whenever I need to expand my code, I prefer KDevelop over Visual Studio.

Upvotes: 2

RedX
RedX

Reputation: 15175

Take a look at makeheaders. It does not provide parallel editing features, but instead generates headers from your source files.

Upvotes: 2

James
James

Reputation: 25543

If you're editing a stable library then you do not want this, because you really care about when you change an interface -- since it probably means you're breaking compatibility with something else.

If you're in the rapid-prototyping stage, then why not put all your definitions in the header file, and worry about separating them into the implementation file later.

That said, I know of nothing that actually does what you want, so:

If you want to implement this, I'd suggest writing a third header&implementation file (that the compiler never sees), which you actually edit, and then adding a pre-compilation stage that automatically splits it into header and source. You'll probably want to annotate include directives to show where they need to be.

Upvotes: 2

Related Questions