Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Feature Requests
 Refactoring: Move To Base Class

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
peterchen 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




1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 21 2009 : 7:08:53 PM
We are considering adding a refactoring to do this. Thank you for the clear description of how you would like it to work.

case=1121

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000