libzypp 17.37.17
zypp::MLSep Struct Reference

Helper to produce not-NL-terminated multi line output. More...

#include <zypp-core/base/LogTools.h>

Public Member Functions

 MLSep ()
 MLSep (char sep_r)

Public Attributes

bool _first = true
char _sep = '\n'

Detailed Description

Helper to produce not-NL-terminated multi line output.

Used as leading separator it prints a separating NL by omitting output upon it's first invocation. A custom separator char can be passed to the ctor.

Container foo { 1,2,3 };
MLSep sep;
for ( auto && el : foo )
cout << sep << el;
# "1\n2\n3"
Helper to produce not-NL-terminated multi line output.
Definition LogTools.h:53

Definition at line 52 of file LogTools.h.

Constructor & Destructor Documentation

◆ MLSep() [1/2]

zypp::MLSep::MLSep ( )
inline

Definition at line 54 of file LogTools.h.

◆ MLSep() [2/2]

zypp::MLSep::MLSep ( char sep_r)
inline

Definition at line 55 of file LogTools.h.

Member Data Documentation

◆ _first

bool zypp::MLSep::_first = true

Definition at line 56 of file LogTools.h.

◆ _sep

char zypp::MLSep::_sep = '\n'

Definition at line 57 of file LogTools.h.


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