Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Feature Requests
 Refactoring: Move To Base Class
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

peterchen
Tomato Guru

126 Posts

Posted - Aug 21 2009 :  05:04:52 AM  Show Profile  Reply with Quote
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




feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Aug 21 2009 :  7:08:53 PM  Show Profile  Reply with Quote
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

zen is the art of being at one with the two'ness
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000