Einzelnen Beitrag anzeigen

mkinzler
(Moderator)

Registriert seit: 9. Dez 2005
Ort: Heilbronn
39.861 Beiträge
 
Delphi 11 Alexandria
 
#6

AW: Need create and call method from many class types

  Alt 6. Jan 2011, 21:29
Because of the IS-A paradigm each Subclass "is a" Baseclass

if the wanted function/procedure is declared in a superclass ( baseclass->MiddleClass->Class1) it can be called as function/procedure of the superclass. It'S always called the "best matched" function.
if the function is implemented in the Baaseclass this function is called, if the implementation is in Class1/Class2 then the corresponding versions are used:
TBaseClass(class1).AnyFunc() calls Tclass1.AnyFunc()
Markus Kinzler
  Mit Zitat antworten Zitat