In our project we use the c++ stream operator (<<) in our object model to print out an easy readible format of the data. A simplified example is this:
You can make your own stream class that has an indentation variable and override the endl for that class, inserting the indentation.