Virtual class

A virtual class is an inner class that can be overridden by subclasses of the outer class.[1]

Virtual Classes are inner classes of another outer class, which behave like virtual functions. This means they can be overridden in a subclass of the outer class, and the run time type of a virtual class depends on the run time type of an object of the outer class. (Just like the run time type of an object decides which virtual function should be used.)

Like this a run time instance type of the outer class object not only decides on the polymorphic type of his own type object, but also on a whole family tree of virtual class members.

References

  1. ^ "Virtual Classes". CaesarJ Programming Guide. Technische Universität Darmstadt. 2006-02-10. http://caesarj.org/index.php/ProgrammingGuide/VirtualClasses. Retrieved 2007-07-30. 

External links