mirror of
https://github.com/Laupetin/OpenAssetTools.git
synced 2025-04-21 08:35:43 +00:00
28 lines
441 B
C++
28 lines
441 B
C++
#include "AbstractTextDumper.h"
|
|
|
|
#include <cassert>
|
|
|
|
AbstractTextDumper::AbstractTextDumper(std::ostream& stream)
|
|
: m_stream(stream),
|
|
m_indent(0u)
|
|
{
|
|
}
|
|
|
|
void AbstractTextDumper::Indent() const
|
|
{
|
|
for (auto i = 0u; i < m_indent; i++)
|
|
m_stream << " ";
|
|
}
|
|
|
|
void AbstractTextDumper::IncIndent()
|
|
{
|
|
++m_indent;
|
|
}
|
|
|
|
void AbstractTextDumper::DecIndent()
|
|
{
|
|
assert(m_indent > 0);
|
|
if (m_indent > 0)
|
|
m_indent--;
|
|
}
|