Skip to content

scram::xml::detail::Indenter::Indentation

RAII class to manage the current indentation string.

#include <xml_stream.h>

Public Functions

Name
Indentation(int num_chars, Indenter * indent)
~Indentation()<br>Restores the buffer.
operator const char *()

Public Functions Documentation

function Indentation

cpp
inline Indentation(
    int num_chars,
    Indenter * indent
)

Parameters:

  • num_chars The number of indentation characters.
  • indent The provider of the indentation buffer.

Precondition:

  • There's only a single instance at a time.
  • The indent buffer is filled w/ kIndentChar up to kMaxIndent.

Postcondition: If the number of chars exceeds kMaxIndent, the indentation is kMaxIndent.

function ~Indentation

cpp
inline ~Indentation()

Restores the buffer.

function operator const char *

cpp
inline operator const char *()

Return: The indentation string.


Updated on 2025-11-11 at 16:51:08 +0000