[#BloombergLP-bslalg-RbTreeUtil-printTreeStructure] = xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bslalg.adoc[bslalg]::xref:BloombergLP/bslalg/RbTreeUtil.adoc[RbTreeUtil]::printTreeStructure :relfileprefix: ../../../ :mrdocs: 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>` [source,cpp,subs="verbatim,replacements,macros,-callouts"] ---- static void printTreeStructure( FILE* file, xref:BloombergLP/bslalg/RbTreeNode.adoc[RbTreeNode] const* subtree, void(* printNodeValueCallback)(FILE*, xref:BloombergLP/bslalg/RbTreeNode.adoc[RbTreeNode] const*), int level = 0, int spacesPerLevel = 4); ---- [.small]#Created with https://www.mrdocs.com[MrDocs]#