Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Implement Methods implements pure 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
jwiesemann Posted - Dec 29 2014 : 04:15:56 AM
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
3   L A T E S T    R E P L I E S    (Newest First)
accord Posted - Jan 05 2015 : 08:56:41 AM
It is a very sensible request, I have put in a feature request for this:

case=87177
jwiesemann Posted - Jan 03 2015 : 03:15:55 AM
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.

accord Posted - Dec 30 2014 : 10:34:18 AM
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(); }
};

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