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.08
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#
CLASS Thing_1
        EXPORT x1
METHOD Init() CLASS Thing_1
        x1 := 1
METHOD Meth_1() CLASS Thing_1
METHOD Meth_1x() CLASS Thing_1
CLASS Thing_2 INHERIT Thing_1
        EXPORT x2
METHOD Meth_2 CLASS Thing_2
METHOD Meth_2x CLASS Thing_2
CLASS Thing_3 INHERIT Thing_2
        EXPORT x3
METHOD Meth_3 CLASS Thing_3
METHOD Meth_3x CLASS Thing_3
Function Start()
        LOCAL aTree AS ARRAY
        aTree := OOPTreeClass(#Thing_3)
The array, aTree, contains the following information:
X#
/***************************
Thing-1
                        x1
                        Meth_1x
                        Meth_1
                        Init
Thing-2
                        x2
                        x1
                        Meth_2x
                        Meth_2
                        Meth_1x
                        Meth_1
                        Init
Thing-3
                        x2
                        x1
                        x3
                        Meth_3x
                        Meth_3
                        Meth_2x
                        Meth_2
                        Meth_1x
                        Meth_1
                        Init
***************************/
See Also