Data type AjPTree

Tree data object. Trees are simple linked nodes with back pointers.

Trees can hold any data type. Special functions are available for trees of AjPStr values. In general, these functions are the same. Many are provided for ease of use to save remembering which calls need special cases.

At the top level, a tree has a list of named nodes and a pointer to the top node in the tree.


ajTreeNewCreates a new general tree.
ajTreestrNewCreates a new AjPStr tree.


Rightstruct AjSTree*Next tree node
Leftstruct AjSTree*Previous tree node
Upstruct AjSTree*Parent tree node
Downstruct AjSTree*First child tree node
NameAjPStrName string
Datavoid*Data value
Freedata(AjBool*)Complex data free function
TypeAjEnumTree type (any, string, etc.)
Paddingchar[4]Padding to alignment boundary