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
 Move function Class base/derivate
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

antonio tanas
New Member

France
4 Posts

Posted - Dec 26 2018 :  07:58:28 AM  Show Profile  Reply with Quote
Hi guys,
I'm coding in C ++.
I wonder if you could help move / copy the selected virtual function from a base class to an existing derived class.
Or create a derived class and move the selected virtual function leaving an empty virtual function to the base class.
Or move the selected virtual function of the derived class to replace the existing (empty?) In the base class.
Or move a class to a new set of files (h & cpp) from a file containing multiple classes.
Either move a set of definitions to a new header file and add include to the necessary file.

The typical use is:
Have a class that we have to derive to modify some members function. Some definitions will change from base to derivative or inverse, some member functions will be copied and modified in the new derivate class.
Best Regards

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Dec 28 2018 :  2:29:30 PM  Show Profile  Reply with Quote
Are you familiar with the Implement Virtual Methods command?

https://docs.wholetomato.com/default.asp?W165

This is designed to help when you want to implement virtual methods from a base class, as the name suggests.

zen is the art of being at one with the two'ness
Go to Top of Page

antonio tanas
New Member

France
4 Posts

Posted - Jan 03 2019 :  04:19:23 AM  Show Profile  Reply with Quote
Thanks a lot it's a start.
But you can do a lot more if you want.
So please consider the whole list of requirement.
Best regards.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Jan 04 2019 :  07:55:25 AM  Show Profile  Reply with Quote
We have the Move Selection to New File refactoring command:

https://docs.wholetomato.com/default.asp?W286

which is designed to let you move a selection from the file to a new file. Once the file has been created, you can select entire blocks quickly and easily in VA Outline, especially if they are grouped together, so you can select the parent node, then copy and paste these into the newly created file:

https://docs.wholetomato.com/default.asp?W187

VA Snippets can help with creating and filling in a new base class. For example a new default install of VA comes with a C++ snippet with the shortcut "bas", which when accepted inside one of the derived class function bodies will insert a call to the matching function in the parent class.

We are considering adding a refactoring command to move a function into the parent or derived class, from its current class, but we don't have any firm plans for when this will be attempted yet:

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