peterchen
Tomato Guru
126 Posts |
Posted - Aug 21 2009 : 05:04:52 AM
|
That's a refactoring *I* would like to see:
For a given symbol that is a class member, offer an option "Move to base class". If the class employs multiple inheritance, a selection of which base class is needed.
This is a common operation when refactoring, an one of the more painful ones as up to four files are involved.
When moving, all modifiers (private/public/protected, virtual, static etc.) are preserved.
Ideally, "distribution over files" would is preserved, too:
- if the declaration is in derived.h and implementation in derived.cpp, the elements are moved to base.h and base.cpp respectively
- if the definition is in-class, it is moved to base.h and remains in-class
- if the definition is out-of-class in derived.h, it is moved to an out-of-class inline function in base.h
- should work for attributes, methods and static data members
|
|