Menu

#5 Make it possible to derive from key classes

open
nobody
None
5
2012-10-04
2010-11-22
No

I notice that your key classes do not have got a virtual destructor.

Examples:
https://github.com/mregmi/ext2read/blob/master/ext2read.h#L173
https://github.com/mregmi/ext2read/blob/master/lvm.h#L69

This might indicate that the intended use is only for value objects.
http://en.wikipedia.org/wiki/Data_transfer_object

I imagine that they are also good candidates as base classes to improve their reuse. The addition of the key word "virtual" to these destructors will be required in this case.
http://dietmar-kuehl.de/mirror/c++-faq/virtual-functions.html#faq-20.7

Discussion


Log in to post a comment.