Write a description of the structure of the specified subtree to the specified output file in a human‐readable format, using the specified printValueCallback to render the value of each node. Optionally specify an initial indentation level, whose absolute value is incremented recursively for nested objects. If level is specified, optionally specify spacesPerLevel, whose absolute value indicates the number of spaces per indentation level for this and all of its nested objects. If level is negative, suppress indentation of the first line. If spacesPerLevel is negative, format the entire output on one line, suppressing all but the initial indentation (as governed by level). The behavior is undefined unless node is 0, or the root of a valid binary tree. Note that the implementation of this function is recursive and expensive to perform, it is intended for debugging purposes only. Also note that the format is not fully specified, and can change without notice.

Synopsis

Declared in <bslalg_rbtreeutil.h>

static
void
printTreeStructure(
    FILE* file,
    RbTreeNode const* subtree,
    void(* printNodeValueCallback)(FILE*, RbTreeNode const*),
    int level = 0,
    int spacesPerLevel = 4);

Created with MrDocs