HikoGUI
A low latency retained GUI
Loading...
Searching...
No Matches
hi::v1::indent Class Reference

#include <hikogui/codec/indent.hpp>

Public Member Functions

constexpr indent (indent const &other) noexcept=default
constexpr indent (indent &&other) noexcept=default
constexpr indent & operator= (indent const &other) noexcept=default
constexpr indent & operator= (indent &&other) noexcept=default
constexpr indent (int spaces, char space=' ') noexcept
 Constructor This constructor will start indentation at depth 0.
 operator std::string () const noexcept
 String conversion operator.
constexpr indent & operator+= (int rhs) noexcept
 Increase the depth of this indentation.
constexpr indent & operator++ () noexcept
 Increment the depth of this indentation.

Friends

constexpr friend indent operator+ (indent lhs, int rhs) noexcept
 Get an indentation at increased depth.

Detailed Description

Indentation for writing out text files.

This type is used to pass indentation information recursivly to add indentation to text files, like for example json.

Constructor & Destructor Documentation

◆ indent()

hi::v1::indent::indent ( int spaces,
char space = ' ' )
inlinenodiscardconstexprnoexcept

Constructor This constructor will start indentation at depth 0.

Parameters
spacesNumber of spaces per indentation.
spaceCharacter used for indentation.

Member Function Documentation

◆ operator std::string()

hi::v1::indent::operator std::string ( ) const
inlinenodiscardnoexcept

String conversion operator.

◆ operator++()

indent & hi::v1::indent::operator++ ( )
inlineconstexprnoexcept

Increment the depth of this indentation.

◆ operator+=()

indent & hi::v1::indent::operator+= ( int rhs)
inlineconstexprnoexcept

Increase the depth of this indentation.

◆ operator+

friend indent operator+ ( indent lhs,
int rhs )
friend

Get an indentation at increased depth.


The documentation for this class was generated from the following file: