Just how much do I want to make virtual?

Posted by Alex on Stack Overflow See other posts from Stack Overflow or by Alex
Published on 2010-06-17T16:34:03Z Indexed on 2010/06/17 17:03 UTC
Read the original article Hit count: 150

Filed under:
|

I am writing an abstract superclass where literally every method is going to be overridden. There is some default functionality I could implement, but most of the time it's enough to leave the implementation to the subclass writer.

Since just about every method is going to be overwritten, how much should I make virtual and how much should I just leave as regular methods? In the current incarnation, everything is virtual, but I still haven't let this loose to anyone to use, so the design is flexible.

What advantages/disadvantages are there to virtual functions? Links to good reading material about this would be appreciated.

© Stack Overflow or respective owner

Related posts about c++

Related posts about virtual