libzypp  17.35.12
ztui::out Namespace Reference

Namespaces

 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 More...
 
using DefaultGapedListLayout = detail::ListLayoutInit< true, true, true, 0U >
 one element per line, no indent, gaped More...
 
using IndentedListLayout = detail::ListLayoutInit< true, true, false, 2U >
 one element per line, indented More...
 
using IndentedGapedListLayout = detail::ListLayoutInit< true, true, true, 2U >
 one element per line, indented, gaped More...
 
using CompressedListLayout = detail::ListLayoutInit< false, true, false, 2U >
 multiple elements per line, indented More...
 
using DefaultTableLayout = TableLayout
 Simple Table. More...
 

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. More...
 
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. More...
 

Variables

static constexpr unsigned termwidthUnlimited = 0u
 

Typedef Documentation

◆ XmlListLayout

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

Definition at line 107 of file Out.h.

◆ DefaultListLayout

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

one element per line, no indent

Definition at line 108 of file Out.h.

◆ DefaultGapedListLayout

using ztui::out::DefaultGapedListLayout = typedef detail::ListLayoutInit<true, true, true, 0U>

one element per line, no indent, gaped

Definition at line 109 of file Out.h.

◆ IndentedListLayout

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

one element per line, indented

Definition at line 110 of file Out.h.

◆ IndentedGapedListLayout

using ztui::out::IndentedGapedListLayout = typedef detail::ListLayoutInit<true, true, true, 2U>

one element per line, indented, gaped

Definition at line 111 of file Out.h.

◆ CompressedListLayout

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

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/2]

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

Definition at line 130 of file Out.h.

◆ asXmlListElement() [2/2]

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

Definition at line 131 of file Out.h.

◆ asListElement() [1/2]

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

Definition at line 136 of file Out.h.

◆ asListElement() [2/2]

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

constexpr unsigned ztui::out::termwidthUnlimited = 0u
static

Definition at line 74 of file Out.h.