Feature #2383 2006-07-14 08:39

kidmosey

Method Extraction Plugin

This is a bit like the suggested feature #2366.

Essentially, method extraction takes all of the methods of the current header file and extracts the implementations to it's respective cpp file.

For instance, given a single header file 'foo.h': #ifndef __FOO_H__ #define __FOO_H__

class foo { public: foo(int defValue = 0) { // foo content } ~foo() { // foo destructor } };

#endif // __FOO_H__

The plugin will create two files: file 'foo.h': #ifndef __FOO_H__ #define __FOO_H__

class foo { public: foo(int defValue = 0); ~foo(); };

#endif // __FOO_H__

file 'foo.cpp': #include "foo.h"

foo::foo(int defValue) { // foo constructor }

foo::~foo() { // foo destructor }

Additionally, you could include an option to specify which methods to extract, or add extract to the context menu of the methods. Also, it should ask to overwrite any existing methods in the cpp file, if they already exist.

Seems relatively easy to implement, so if it isn't done by the time my current project is completed, I may try my hand at it to get a feel for the CB API.

Category
Editing
Status
Open
Close date
 
Assigned to