Glossary: Polymorphism

If sending the same message to two apparently identical objects elicits two distinct responses, then the objects are polymorphic with respect to the message. The situation arises when the object being addressed is embedded (i.e. is a base class) of another and the message is a virtual function that is overloaded by that class. For example, the ROOT class TObject has a Paint message (i.e member function) which produces a graphical representation of TObject. Classes that inherit from TObject will, in general, overload the Paint message with their own distinct interpretations of the Paint concept. So the TObject class provides an interface between application objects that can be painted and the ROOT framework that displays them.
See OO Concepts: Interfaces & Abstract Classes and Virtual Functions & Polymorphism
Go Back to the The Glossary Top Page

If you have any comments about this page please send them to Nick West