Users will not usually wish to use this routine. The non-member
function F_getChild, documented in Section
,
will usually be more appropriate for navigating the tree.
This member function returns a pointer to one child of the node. The type of the child returned will be typeWanted. index specifies which child of that type to return. If there is only one child, index must be 0. If there are two children, index may be 0 or 1 to select one or the other. If there is no child satisfying typeWanted and index, NULL is returned.
The return type of this function is always F_Nodestar. If you wish
to store the value in a specific kind of node pointer, say an erpNode*, you must cast the return type to the desired type. (See
Section
.)
In the following code, erpPtr is made to point at the ith erp child of the eventNode. If i is too large, erpPtr is made NULL.
eventNode *ev; erpNode *erpPtr; ... erpPtr = (erpNode*) ev->getChild(erpType,i);