Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 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
jleitert Posted - Apr 13 2014 : 02:27:40 AM
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
4   L A T E S T    R E P L I E S    (Newest First)
sean Posted - Mar 16 2016 : 12:05:13 AM
case=55728 is fixed in build 2093
feline Posted - Apr 15 2014 : 2:01:28 PM
This makes sense. I have put a note onto the case about this.
jleitert Posted - Apr 14 2014 : 3:24:15 PM
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.

feline Posted - Apr 14 2014 : 10:46:06 AM
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.

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