Functions.ClassTreeClass 方法 |
命名空间: XSharp.RT
FUNCTION ClassTreeClass( symClass AS STRING ) AS ARRAY
public static __Array ClassTreeClass( string symClass )
1CLASS Person 2 EXPORT name, sign 3CONSTRUCTOR(tName, tSign) 4 name := tName 5 sign := tSign 6END CLASS 7 8CLASS Male INHERIT Person 9 EXPORT prefers 10END CLASS 11CLASS OldMale INHERIT Male 12 EXPORT age 13END CLASS 14FUNCTION InheritanceTree() 15 LOCAL a AS ARRAY
1a := ClassTreeClass(#OldMale) 2? ArrayGet(a, 1) // OLDMALE 3? ArrayGet(a, 2) // MALE 4? ArrayGet(a, 3) // PERSON