|
Gromacs
2026.0-dev-20251109-f20ba35
|
#include <gromacs/utility/include/gromacs/utility/textwriter.h>
Helper class to increase the indentation of a TextWriter for the lifetime of this object.
Now it's easy to write code like
TextWriter writer(...); writeTitle(&writer, "some title"); { ScopedIndenter indenter = writer.addScopedIndentation(2); writer->writeString("I'm indented by 2 spaces"); writer->writeString("Me too"); } writer->writeString("I'm not indented any more");
Public Member Functions | |
| ScopedIndenter (TextWriter *writer, int extraIndentation=3) | |
Requires the caller to ensure that writer outlives this object. More... | |
| gmx::ScopedIndenter::ScopedIndenter | ( | TextWriter * | writer, |
| int | extraIndentation = 3 |
||
| ) |
Requires the caller to ensure that writer outlives this object.
The default for extra indentation matches that of the legacy txtdump implementation.
1.8.5