Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Steps to Implement Virtual Methods

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
ahkow Posted - Aug 02 2014 : 07:49:08 AM
Is the following the only way to correctly use Implement Virtual Methods?
1. Go to header file.
2. Move cursor to class name
3. Open Refactor context menu and select Implement Virtual Methods.

I ask this because when I open Implement Virtual Methods under a class name in cpp file, for example under Tree in the following code:

void Tree::foo() {
}

Then VA merely inserts the following in the cpp file:

virtual void grow() override
{
}


Now the 1st problem. Notice the invalid virtual and override, and more importantly, the missing class. The correct code should be:

void Tree::grow()
{
}


And the 2nd problem, VA does not insert declaration of grow() to the header too.
2   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Sep 19 2014 : 12:48:27 AM
Build 2042 exposed the "override" registry setting on the Refactoring page of the VA Options dialog.

Build 2047 no longer allows Implement Virtual Methods to be executed from function implementations.
feline Posted - Aug 02 2014 : 11:47:10 AM
Interesting, it had never occured to me to try triggering Implement Virtual Methods from a function implementation like this. I am seeing the same problems, thank you for the clear description:

case=84158

In case you don't know, the override keyword is controlled by this setting:

http://docs.wholetomato.com/default.asp?W346

and should work correctly when you trigger Implement Virtual Methods from the class declaration.

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