[IGSTK-Developers] virtual classes

Ziv Yaniv zivy at isis.imac.georgetown.edu
Tue Jan 22 14:37:04 EST 2008


Hi all,

I have a question about the design of the igstk base classes. Let us 
take for example the Tracker (doing the code review for it now).

There are many virtual methods InternalXYZ() that need to be overridden 
by the decedents (micron, aurora,...). For some reason these methods are 
implemented as short stubs instead of being pure virtual. As far as I 
can see no one should be able to instantiate a generic tracker, only its 
decedents. It makes sense that the generic tracker should thus be an 
abstract class with pure virtual methods.

To summarize:
Should all the virtual methods in the base classes be pure virtual or is 
there a logical reason for the stubs?

If there is a reason for the stubs it should be clearly documented so 
that no one tries to instantiate them even if they can.

                       Ziv



-- 
Ziv Yaniv, PhD., Research Assistant Professor
Imaging Science and Information Systems (ISIS) Center
Department of Radiology
Georgetown University Medical Center
2115 Wisconsin Avenue, Suite 603
Washington, DC, 20007,

Phone: +1-202-687-7286
Fax: +1-202-784-3479
email: zivy at isis.imac.georgetown.edu
web: http://isiswiki.georgetown.edu/zivy/




More information about the IGSTK-Developers mailing list