libzypp 17.37.17
ztui::out Namespace Reference

Namespaces

namespace  detail

Classes

class  ListFormater
 Default representation of types in Lists [asListElement]. More...
class  ListLayout
 Basic list layout. More...
class  TableFormater
 Special list formater writing a Table [asTableHeader|asTableRow]. More...
class  TableLayout
 Basic table layout. More...
class  XmlFormater
 XML representation of types in container [asXmlListElement]. More...
class  XmlFormaterAdaptor
 Adaptor. More...

Typedefs

using XmlListLayout = detail::ListLayoutInit<true, false, false, 0U>
using DefaultListLayout = detail::ListLayoutInit<true, true, false, 0U>
 one element per line, no indent
using DefaultGapedListLayout = detail::ListLayoutInit<true, true, true, 0U>
 one element per line, no indent, gaped
using IndentedListLayout = detail::ListLayoutInit<true, true, false, 2U>
 one element per line, indented
using IndentedGapedListLayout = detail::ListLayoutInit<true, true, true, 2U>
 one element per line, indented, gaped
using CompressedListLayout = detail::ListLayoutInit<false, true, false, 2U>
 multiple elements per line, indented
using DefaultTableLayout = TableLayout
 Simple Table.

Functions

unsigned defaultTermwidth ()
std::string asXmlListElement (const std::string &val_r)
std::string asXmlListElement (const char *val_r)
std::string asListElement (const std::string &val_r)
std::string asListElement (const char *val_r)
template<>
TableHeader asTableHeader< void > ()
template<class TContainer, class TFormater, class TLayout = typename TFormater::NormalLayout>
void writeContainer (std::ostream &str_r, const TContainer &container_r, const TFormater &formater_r, const TLayout &layout_r=TLayout())
 Write formatted container to stream.
template<class TContainer, class TFormater>
void xmlWriteContainer (std::ostream &str_r, const TContainer &container_r, const TFormater &formater_r)
 Write XML formatted container to stream.
template<class Tp>
std::string asXmlListElement (const Tp &val_r)
 XML representation of types [no default].
template<class Tp>
std::string asListElement (const Tp &val_r)
 NORMAL representation of types in lists [no default].
template<class Tp = void>
TableHeader asTableHeader ()
 NORMAL representation of types as TableHeader [no default].
template<class Tp>
TableRow asTableRow (const Tp &val_r)
 NORMAL representation of types as TableRow [no default].

Variables

static constexpr unsigned termwidthUnlimited = 0u

Typedef Documentation

◆ XmlListLayout

using ztui::out::XmlListLayout = detail::ListLayoutInit<true, false, false, 0U>

Definition at line 107 of file Out.h.

◆ DefaultListLayout

using ztui::out::DefaultListLayout = detail::ListLayoutInit<true, true, false, 0U>

one element per line, no indent

Definition at line 108 of file Out.h.

◆ DefaultGapedListLayout

one element per line, no indent, gaped

Definition at line 109 of file Out.h.

◆ IndentedListLayout

using ztui::out::IndentedListLayout = detail::ListLayoutInit<true, true, false, 2U>

one element per line, indented

Definition at line 110 of file Out.h.

◆ IndentedGapedListLayout

one element per line, indented, gaped

Definition at line 111 of file Out.h.

◆ CompressedListLayout

multiple elements per line, indented

Definition at line 112 of file Out.h.

◆ DefaultTableLayout

Simple Table.

Definition at line 123 of file Out.h.

Function Documentation

◆ defaultTermwidth()

unsigned ztui::out::defaultTermwidth ( )

Definition at line 38 of file Out.cc.

◆ asXmlListElement() [1/3]

std::string ztui::out::asXmlListElement ( const std::string & val_r)
inline

Definition at line 130 of file Out.h.

◆ asXmlListElement() [2/3]

std::string ztui::out::asXmlListElement ( const char * val_r)
inline

Definition at line 131 of file Out.h.

◆ asListElement() [1/3]

std::string ztui::out::asListElement ( const std::string & val_r)
inline

Definition at line 136 of file Out.h.

◆ asListElement() [2/3]

std::string ztui::out::asListElement ( const char * val_r)
inline

Definition at line 137 of file Out.h.

◆ asTableHeader< void >()

template<>
TableHeader ztui::out::asTableHeader< void > ( )
inline

Definition at line 144 of file Out.h.

◆ writeContainer()

template<class TContainer, class TFormater, class TLayout = typename TFormater::NormalLayout>
void ztui::out::writeContainer ( std::ostream & str_r,
const TContainer & container_r,
const TFormater & formater_r,
const TLayout & layout_r = TLayout() )

Write formatted container to stream.

Definition at line 324 of file Out.h.

◆ xmlWriteContainer()

template<class TContainer, class TFormater>
void ztui::out::xmlWriteContainer ( std::ostream & str_r,
const TContainer & container_r,
const TFormater & formater_r )

Write XML formatted container to stream.

Definition at line 334 of file Out.h.

Variable Documentation

◆ termwidthUnlimited

unsigned ztui::out::termwidthUnlimited = 0u
staticconstexpr

Definition at line 74 of file Out.h.