Click here to Skip to main content
15,900,511 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: ELF parser Pin
JudyL_MD19-Mar-08 2:45
JudyL_MD19-Mar-08 2:45 
QuestionHow do they do that? virutal lan Pin
NovaNuker18-Mar-08 19:34
NovaNuker18-Mar-08 19:34 
GeneralVirtual function design pattern Pin
George_George18-Mar-08 19:18
George_George18-Mar-08 19:18 
GeneralRe: Virtual function design pattern Pin
followait18-Mar-08 20:00
followait18-Mar-08 20:00 
GeneralRe: Virtual function design pattern Pin
George_George19-Mar-08 0:00
George_George19-Mar-08 0:00 
GeneralRe: Virtual function design pattern Pin
CPallini19-Mar-08 0:54
mveCPallini19-Mar-08 0:54 
GeneralRe: Virtual function design pattern Pin
George_George19-Mar-08 1:14
George_George19-Mar-08 1:14 
GeneralRe: Virtual function design pattern Pin
CPallini19-Mar-08 1:31
mveCPallini19-Mar-08 1:31 
George_George wrote:
What harm will be if we make the following 3 methods virtual?

Actually no harm.


George_George wrote:
I think the design architecure is still clean as your sample without code change, right?

Nope. In original design there is a (conventional) clean distinction between invariant pieces of (common used) code and methods designed to exploit polymorphism.

If you make the above methods virtual (and even if you don't change the remaining code) then you imply that polymorphism may happen on these little pieces of (common used) code. The developer examining Derived::do_things() method then should be aware that changes may are not only inside the method logic itself but also inside its 'elementary' commonly used blocks. This double-layered kind of polymorphism is not a mistake but doesn't contribute to project neatness.
Smile | :)

BTW: As usual, this is going on my arrogant assumptions Wink | ;)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke


GeneralRe: Virtual function design pattern Pin
George_George19-Mar-08 2:30
George_George19-Mar-08 2:30 
GeneralRe: Virtual function design pattern Pin
CPallini19-Mar-08 3:01
mveCPallini19-Mar-08 3:01 
GeneralRe: Virtual function design pattern Pin
George_George19-Mar-08 3:15
George_George19-Mar-08 3:15 
GeneralRe: Virtual function design pattern Pin
CPallini19-Mar-08 3:29
mveCPallini19-Mar-08 3:29 
GeneralRe: Virtual function design pattern Pin
George_George19-Mar-08 17:20
George_George19-Mar-08 17:20 
GeneralRe: Virtual function design pattern Pin
CPallini19-Mar-08 22:26
mveCPallini19-Mar-08 22:26 
GeneralRe: Virtual function design pattern Pin
George_George19-Mar-08 22:38
George_George19-Mar-08 22:38 
GeneralRe: Virtual function design pattern Pin
followait19-Mar-08 1:42
followait19-Mar-08 1:42 
GeneralRe: Virtual function design pattern Pin
George_George19-Mar-08 2:21
George_George19-Mar-08 2:21 
GeneralRe: Virtual function design pattern [modified] Pin
followait19-Mar-08 2:49
followait19-Mar-08 2:49 
GeneralRe: Virtual function design pattern Pin
George_George19-Mar-08 3:16
George_George19-Mar-08 3:16 
GeneralRe: Virtual function design pattern Pin
followait19-Mar-08 3:37
followait19-Mar-08 3:37 
GeneralRe: Virtual function design pattern Pin
George_George19-Mar-08 17:22
George_George19-Mar-08 17:22 
GeneralRe: Virtual function design pattern Pin
followait19-Mar-08 18:00
followait19-Mar-08 18:00 
GeneralRe: Virtual function design pattern Pin
George_George19-Mar-08 18:30
George_George19-Mar-08 18:30 
GeneralIs it not safe to use RectF::Equals? (float comparison problem) [modified] Pin
followait18-Mar-08 19:10
followait18-Mar-08 19:10 
GeneralRe: Is it not safe to use RectF::Equals? (float comparison problem) Pin
Mark Salsbery18-Mar-08 20:05
Mark Salsbery18-Mar-08 20:05 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.