The easiest way to access this information is passing the XML
document to the process() function of the haxe.rtti.XmlParser class. The method transforms the
XML file in an array of definitions; each definition describes one type, including packages, using an
enum constructor. The enum for those definitions is TypeTree (Table 16.3) that is defined in the haxe
.rtti.Type module.
Table 16-3
Enum TypeTree Constructor Description
TPackage(name:String, full:String,
subs:Array
)
This constructor is used for a package. It contains its
name, the full path, and an array of the types defined
in the package.
TClassdecl(c:Class) This type is a class.
TEnumdecl(e:Enum) This type is an enum.
TTypedecl(t:Typedef) This type is a typedef.
When looking at the haxe.rtti API, please note that some of the type names there defined conflict
with names defined in the default package. If you have to use both of them in the same code context, you
will probably want to avoid conflicts using typedef to create proper aliases.
Pages:
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873