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
 Technical Support
 Implement Virtual Methods...
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jleitert
New Member

5 Posts

Posted - Apr 13 2014 :  02:27:40 AM  Show Profile  Reply with Quote
Hi, I have noticed that "Implement Virtual Methods" moves the virtual functions always to the end of the file, even if you have access specifier defined. I think, the virtual functions should keep their access specifier.

Thanks


Here a short example:
class A
{
public:
    virtual void f1();
protected:
    virtual void f2();
private:
    virtual void f3();
};

class B : public A
{
public:
protected:
private:
};

Results after using Implement Virtual Methods on class B:
class B : public A
{
public:
protected:
private:

    virtual void f1(); // <- should be in public

    virtual void f2(); // <- should be in protected

    virtual void f3(); // <- ok (in this case)

};



VA_X.dll file version 10.8.2031.0 built 2014.03.31
DevEnv.exe version 9.0.30729.1 Standard
Windows 7 6.1 Build 7601 Service Pack 1
Language info: 1252, 0x407

Edited by - jleitert on Apr 13 2014 4:08:25 PM

feline
Whole Tomato Software

United Kingdom
15984 Posts

Posted - Apr 14 2014 :  10:46:06 AM  Show Profile  Reply with Quote
Thank you for the suggestion, this is something we are looking into doing:

case=55728

What would you expect to happen if class B was inherited Private or Protected? Would you still expect the virtual methods to have the same default visibility, or a different visibility?

My thought there would be to say still the same visibility, but I was wondering if you had a thought here.

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

jleitert
New Member

5 Posts

Posted - Apr 14 2014 :  3:24:15 PM  Show Profile  Reply with Quote
It is more natural to have always the same visibility, even if class B was inherited private or protected. Otherwise it can confuse people, I think.

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
15984 Posts

Posted - Apr 15 2014 :  2:01:28 PM  Show Profile  Reply with Quote
This makes sense. I have put a note onto the case about this.

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

sean
Whole Tomato Software

USA
2641 Posts

Posted - Mar 16 2016 :  12:05:13 AM  Show Profile  Reply with Quote
case=55728 is fixed in build 2093
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000