libzypp 17.35.19
ztui::out::ListLayout::Writer< TFormater > Class Template Reference

Write out a List according to the layout. More...

#include <zypp-tui/output/Out.h>

Public Member Functions

 NON_COPYABLE (Writer)
 
 Writer (std::ostream &str_r, const ListLayout &layout_r, const TFormater &formater_r)
 
 ~Writer ()
 
template<class Tp >
void operator<< (Tp &&val_r) const
 

Private Member Functions

bool fitsOnLine (unsigned size_r) const
 
void printAndCount (const std::string &element_r) const
 
void endLine () const
 

Private Attributes

std::ostream & _str
 
const ListLayout_layout
 
const TFormater_formater
 
const unsigned _linewidth
 desired line width
 
const std::string _indent
 
unsigned _cpos = 0U
 

Detailed Description

template<class TFormater>
class ztui::out::ListLayout::Writer< TFormater >

Write out a List according to the layout.

Definition at line 224 of file Out.h.

Constructor & Destructor Documentation

◆ Writer()

template<class TFormater >
ztui::out::ListLayout::Writer< TFormater >::Writer ( std::ostream & str_r,
const ListLayout & layout_r,
const TFormater & formater_r )
inline

Definition at line 228 of file Out.h.

◆ ~Writer()

Definition at line 236 of file Out.h.

Member Function Documentation

◆ NON_COPYABLE()

◆ operator<<()

template<class TFormater >
template<class Tp >
void ztui::out::ListLayout::Writer< TFormater >::operator<< ( Tp && val_r) const
inline

Definition at line 240 of file Out.h.

◆ fitsOnLine()

template<class TFormater >
bool ztui::out::ListLayout::Writer< TFormater >::fitsOnLine ( unsigned size_r) const
inlineprivate

Definition at line 268 of file Out.h.

◆ printAndCount()

template<class TFormater >
void ztui::out::ListLayout::Writer< TFormater >::printAndCount ( const std::string & element_r) const
inlineprivate

Definition at line 271 of file Out.h.

◆ endLine()

template<class TFormater >
void ztui::out::ListLayout::Writer< TFormater >::endLine ( ) const
inlineprivate

Definition at line 274 of file Out.h.

Member Data Documentation

◆ _str

template<class TFormater >
std::ostream& ztui::out::ListLayout::Writer< TFormater >::_str
private

Definition at line 278 of file Out.h.

◆ _layout

template<class TFormater >
const ListLayout& ztui::out::ListLayout::Writer< TFormater >::_layout
private

Definition at line 279 of file Out.h.

◆ _formater

template<class TFormater >
const TFormater& ztui::out::ListLayout::Writer< TFormater >::_formater
private

Definition at line 280 of file Out.h.

◆ _linewidth

template<class TFormater >
const unsigned ztui::out::ListLayout::Writer< TFormater >::_linewidth
private

desired line width

Definition at line 281 of file Out.h.

◆ _indent

template<class TFormater >
const std::string ztui::out::ListLayout::Writer< TFormater >::_indent
private

Definition at line 282 of file Out.h.

◆ _cpos

template<class TFormater >
unsigned ztui::out::ListLayout::Writer< TFormater >::_cpos = 0U
mutableprivate

Definition at line 283 of file Out.h.


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