ClassTreeClass Function | |
Get the class hierarchy of a class.
Namespace:
XSharp.RT
Assembly:
XSharp.RT (in XSharp.RT.dll) Version: 2.21
Syntax FUNCTION ClassTreeClass(
symClass AS STRING
) AS ARRAY
public static Array ClassTreeClass(
string symClass
)
Request Example
View SourceParameters
- symClass
- Type: String
A symbol representing the class name whose class hierarchy you want to get.
Return Value
Type:
Array
An array of class names from which
oObject has been derived.
The last element of the array contains the root class from which subsequent classes in the array inherit.
Remarks
ClassTreeClass() shows what other classes, if any, the specified class inherits from.
Examples
These examples illustrate ClassTreeClass() with multiple inheritances:
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)
3? ArrayGet(a, 2)
4? ArrayGet(a, 3)
See Also Reference
ClassTreeClass(String)