Class Column

Nested Relationships

Nested Types

Class Documentation

class Column

Represents a column of text with specific width and indentation

When written out to a stream, it will perform linebreaking of the provided text so that the written lines fit within target width.

Public Types

using iterator = const_iterator

Public Functions

inline explicit Column(std::string const &text)
inline Column &width(size_t newWidth)
inline Column &indent(size_t newIndent)
inline Column &initialIndent(size_t newIndent)
inline size_t width() const
inline const_iterator begin() const
inline const_iterator end() const
Columns operator+(Column const &other)

Friends

friend std::ostream &operator<<(std::ostream &os, Column const &col)
class const_iterator

Iterates “lines” in Column and return sthem

Public Types

using difference_type = std::ptrdiff_t
using value_type = std::string
using pointer = value_type*
using reference = value_type&
using iterator_category = std::forward_iterator_tag

Public Functions

explicit const_iterator(Column const &column)
std::string operator*() const
const_iterator &operator++()
const_iterator operator++(int)
inline bool operator==(const_iterator const &other) const
inline bool operator!=(const_iterator const &other) const