Click or drag to resize

OOPTreeClass Function

Return a multidimensional array of all object-oriented programming symbols that constitute the class of an object.

Namespace:  XSharp.RT
Assembly:  XSharp.RT (in XSharp.RT.dll) Version: 2.4a
Syntax
 FUNCTION OOPTreeClass(
	symClass AS STRING
) AS ARRAY
View Source

Parameters

symClass
Type: String
The class name whose class symbols you want to retrieve.

Return Value

Type: Array
Each class occupies an array consisting of the class name, a subarray of instance variables, and a subarray of methods.
Remarks
OOPTreeClass() retrieves the names of ancestors (super classes), instance data, and methods in the class definition tree.
Examples
This example uses OOPTreeClass():
X#
 1CLASS Thing_1
 2    EXPORT x1
 3CONSTRUCTOR() CLASS Thing_1
 4    x1 := 1
 5METHOD Meth_1() CLASS Thing_1
 6METHOD Meth_1x() CLASS Thing_1
 7CLASS Thing_2 INHERIT Thing_1
 8    EXPORT x2
 9METHOD Meth_2 CLASS Thing_2
10METHOD Meth_2x CLASS Thing_2
11CLASS Thing_3 INHERIT Thing_2
12    EXPORT x3
13METHOD Meth_3 CLASS Thing_3
14METHOD Meth_3x CLASS Thing_3
15Function Start()
16    LOCAL aTree AS ARRAY
17    aTree := OOPTreeClass(#Thing_3)
The array, aTree, contains the following information:
X#
 1/***************************
 2Thing-1
 3            x1
 4            Meth_1x
 5            Meth_1
 6            Init
 7Thing-2
 8            x2
 9            x1
10            Meth_2x
11            Meth_2
12            Meth_1x
13            Meth_1
14            Init
15Thing-3
16            x2
17            x1
18            x3
19            Meth_3x
20            Meth_3
21            Meth_2x
22            Meth_2
23            Meth_1x
24            Meth_1
25            Init
26***************************/
See Also