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 Methods implements pure virtual methods
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

jwiesemann
Junior Member

14 Posts

Posted - Dec 29 2014 :  04:15:56 AM  Show Profile  Reply with Quote
Hi!

When using "Implements Methods" on below sample class VA want's to implement the pure virtual method, too. That's not correct.

class test
{
test();
~test();
virtual void pure() = 0;
};

Joachim

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Dec 30 2014 :  10:34:18 AM  Show Profile  Reply with Quote
However not usually used, implementing pure virtual methods are valid. For example, the below code happily compiles:

class testclass
{
public:
testclass() {}
~testclass () {}
virtual void pure() = 0 {};
};

class superclass : public testclass
{
superclass() {}
~superclass() {}
virtual void pure() { testclass::pure(); }
};
Go to Top of Page

jwiesemann
Junior Member

14 Posts

Posted - Jan 03 2015 :  03:15:55 AM  Show Profile  Reply with Quote
Mmmhh, to my surprise you're right. I didn't encounter any occasion yet with an implemented pure virtual function. So it't correct, sorry.

Thus I think the best would be to have a check box to decide whether to implement pure virtual functions, too.

Because it takes some doing in a bigger header to uncheck all the virtual functions. (You have to find them first beacuse they are not marked in the overview.) Or at least at a "= 0" in the list.

Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Jan 05 2015 :  08:56:41 AM  Show Profile  Reply with Quote
It is a very sensible request, I have put in a feature request for this:

case=87177
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