Returns the number of intermediate classes between a derived class and its ancestor.
function CountGenerations(Ancestor: TClass; Descendent: TClass): Integer;
int CountGenerations(TClass Ancestor, TClass Descendent);
Classes
Use CountGenerations to determine how close a derived class is to one of its ancestors. For example, if Ancestor and Descendant are the same class, CountGenerations returns 0. If Descendant is derived directly from Ancestor, CountGenerations returns 1.
Ancestor is the ancestor class.
Descendant is the descendant class. If it is not the same as Ancestor or does not derive from Ancestor, CountGenerations returns –1.
Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
|
What do you think about this topic? Send feedback!
|