libzypp: zypp-core/base/LogTools.h File Reference

libzypp 17.38.14

LogTools.h File Reference
`#include <iostream>`
`#include <optional>`
`#include <string>`
`#include <vector>`
`#include <list>`
`#include <set>`
`#include <map>`
`#include <zypp-core/base/Hash.h>`
`#include <zypp-core/base/Logger.h>`
`#include <zypp-core/base/String.h>`
`#include <zypp-core/base/Iterator.h>`
`#include <zypp-core/Globals.h>`

Go to the source code of this file.

## Classes
struct | zypp::str::detail::RefStore< T >
| Helper to store a reference or move rvalues inside. More...
struct | zypp::str::detail::RefStore< T & >
| Store reference. More...
struct | zypp::str::detail::NoPrint
| Store nothing print nothing. More...
struct | zypp::str::detail::RefStore< NoPrint >
struct | zypp::str::detail::RefStore< NoPrint & >
struct | zypp::str::detail::JoinFormat< Intro, Pfx, Sep, Sfx, Extro, Pel, Sel >
| A basic format description to print a collection. More...
struct | zypp::str::detail::PrintFmt< Ostream, Format >
| Log helper wrapping the Ostream and Format. More...
struct | zypp::MLSep
| Helper to produce not-NL-terminated multi line output. More...
struct | zypp::iomanip::RangeLine< TIterator >
class | zypp::_logtoolsdetail::MapEntry< TPair >
| std::pair wrapper for std::map output. More...
class | zypp::_logtoolsdetail::DumpMap< TMap >
| std::map wrapper for stream output. More...
struct | zypp::_logtoolsdetail::DumpMap< TMap >::Transformer
class | zypp::_logtoolsdetail::DumpKeys< TMap >
| std::map wrapper for stream output of keys. More...
class | zypp::_logtoolsdetail::DumpValues< TMap >
| std::map wrapper for stream output of values. More...
struct | zypp::detail::Dump< Tp >

## Namespaces
namespace | zypp
| Easy-to use interface to the ZYPP dependency resolver.
namespace | zypp::str
| Provide print[f] and sprint[f] functions based on JoinFormat.
namespace | zypp::str::detail
namespace | zypp::iomanip
namespace | std
namespace | zypp::_logtoolsdetail
namespace | zypp::detail

## Macros
#define | pXXX zypp::str::detail::PrintFmt(XXX,zypp::str::FormatLine)
#define | pDBG zypp::str::detail::PrintFmt(DBG,zypp::str::FormatLine)
#define | pMIL zypp::str::detail::PrintFmt(MIL,zypp::str::FormatLine)
#define | pWAR zypp::str::detail::PrintFmt(WAR,zypp::str::FormatLine)
#define | pERR zypp::str::detail::PrintFmt(ERR,zypp::str::FormatLine)
#define | pSEC zypp::str::detail::PrintFmt(SEC,zypp::str::FormatLine)
#define | pINT zypp::str::detail::PrintFmt(INT,zypp::str::FormatLine)
#define | pUSR zypp::str::detail::PrintFmt(USR,zypp::str::FormatLine)
#define | wXXX zypp::str::detail::PrintFmt(XXX,zypp::str::FormatWords)
#define | wDBG zypp::str::detail::PrintFmt(DBG,zypp::str::FormatWords)
#define | wMIL zypp::str::detail::PrintFmt(MIL,zypp::str::FormatWords)
#define | wWAR zypp::str::detail::PrintFmt(WAR,zypp::str::FormatWords)
#define | wERR zypp::str::detail::PrintFmt(ERR,zypp::str::FormatWords)
#define | wSEC zypp::str::detail::PrintFmt(SEC,zypp::str::FormatWords)
#define | wINT zypp::str::detail::PrintFmt(INT,zypp::str::FormatWords)
#define | wUSR zypp::str::detail::PrintFmt(USR,zypp::str::FormatWords)
#define | pOSD zypp::str::detail::PrintFmt(OSD,zypp::str::FormatLine)

## Typedefs
using | zypp::str::NoPrint = detail::NoPrint

## Functions
template<typename T>
constexpr auto | zypp::str::detail::makeRefStore (T &&t) -> RefStore< T >
| relates: RefStore<T> Create a RefStore for the argument.
template<typename T>
std::ostream & | zypp::str::detail::operator<< (std::ostream &str, const RefStore< T > &obj)
| relates: RefStore<T> Stream output
std::ostream & | zypp::str::detail::operator<< (std::ostream &str, const NoPrint &obj)
template<>
std::ostream & | zypp::str::detail::operator<< (std::ostream &str, const RefStore< NoPrint > &obj)
template<>
std::ostream & | zypp::str::detail::operator<< (std::ostream &str, const RefStore< NoPrint & > &obj)
template<typename Intro, typename Pfx, typename Sep, typename Sfx, typename Extro, typename Pel = NoPrint, typename Sel = NoPrint>
constexpr auto | zypp::str::makeJoinFormat (Intro &&intro, Pfx &&pfx, Sep &&sep, Sfx &&sfx, Extro &&extro, Pel &&pel=Pel(), Sel &&sel=Sel()) -> detail::JoinFormat< Intro, Pfx, Sep, Sfx, Extro, Pel, Sel >
| relates: JoinFormat<> Create a basic format description to print a collection.
template<typename Ostream, typename Format>
void | zypp::str::detail::_joinSF (Ostream &str, const Format &fmt)
template<typename Ostream, typename Format, typename First>
void | zypp::str::detail::_joinSF (Ostream &str, const Format &fmt, First &&first)
template<typename Ostream, typename Format, typename First, typename... Args>
void | zypp::str::detail::_joinSF (Ostream &str, const Format &fmt, First &&first, Args &&... args)
template<typename Ostream, typename Format, typename... Args>
Ostream & | zypp::str::detail::joinSF (Ostream &str, Format &&fmt, Args &&... args)
| Print args on ostreamlike str using JoinFormat fmt.
template<typename Ostream, typename Format, typename... Args>
Ostream & | zypp::str::printf (Ostream &str, Format &&fmt, Args &&... args)
| Print Format on stream.
template<typename Format, typename... Args>
std::string | zypp::str::sprintf (Format &&fmt, Args &&... args)
| Print Format fs string.
template<typename Ostream, typename... Args>
Ostream & | zypp::str::print (Ostream &str, Args &&... args)
| Print words on stream.
template<typename... Args>
std::string | zypp::str::sprint (Args &&... args)
| Print words as string.
template<typename Ostream, typename... Args>
Ostream & | zypp::str::concat (Ostream &str, Args &&... args)
| Concat words on stream.
template<typename... Args>
std::string | zypp::str::sconcat (Args &&... args)
| Concat words as string.
template<typename Ostream, typename... Args>
Ostream & | zypp::str::println (Ostream &str, Args &&... args)
| Print line on stream.
template<typename... Args>
std::string | zypp::str::sprintln (Args &&... args)
| Print line as string.
std::ostream & | zypp::operator<< (std::ostream &str, MLSep &obj)
template<class TIterator>
std::ostream & | zypp::dumpRange (std::ostream &str, TIterator begin, TIterator end, const std::string &intro="{", const std::string &pfx="\n ", const std::string &sep="\n ", const std::string &sfx="\n", const std::string &extro="}")
| Print range defined by iterators (multiline style).
template<class TIterator>
std::ostream & | zypp::dumpRangeLine (std::ostream &str, TIterator begin, TIterator end)
| Print range defined by iterators (single line style).
template<class TContainer>
std::ostream & | zypp::dumpRangeLine (std::ostream &str, const TContainer &cont)
template<class TIterator>
std::ostream & | zypp::iomanip::operator<< (std::ostream &str, const RangeLine< TIterator > &obj)
| relates: RangeLine<TIterator>
template<class TIterator>
iomanip::RangeLine< TIterator > | zypp::rangeLine (TIterator begin, TIterator end)
| Iomanip printing dumpRangeLine style.
template<class TContainer>
auto | zypp::rangeLine (const TContainer &cont) -> decltype(rangeLine(cont.begin(), cont.end()))
template<class Tp>
std::ostream & | std::operator<< (std::ostream &str, const std::vector< Tp > &obj)
template<class Tp, class TCmp, class TAlloc>
std::ostream & | std::operator<< (std::ostream &str, const std::set< Tp, TCmp, TAlloc > &obj)
template<class Tp>
std::ostream & | std::operator<< (std::ostream &str, const std::unordered_set< Tp > &obj)
template<class Tp>
std::ostream & | std::operator<< (std::ostream &str, const std::multiset< Tp > &obj)
template<class Tp>
std::ostream & | std::operator<< (std::ostream &str, const std::list< Tp > &obj)
template<class Tp>
std::ostream & | zypp::operator<< (std::ostream &str, const Iterable< Tp > &obj)
template<class TPair>
std::ostream & | zypp::_logtoolsdetail::operator<< (std::ostream &str, const MapEntry< TPair > &obj)
| relates: MapEntry Stream output.
template<class TPair>
MapEntry< TPair > | zypp::_logtoolsdetail::mapEntry (const TPair &pair_r)
| relates: MapEntry Convenience function to create MapEntry from std::pair.
template<class TMap>
std::ostream & | zypp::_logtoolsdetail::operator<< (std::ostream &str, const DumpMap< TMap > &obj)
| relates: DumpMap Stream output.
template<class TMap>
DumpMap< TMap > | zypp::_logtoolsdetail::dumpMap (const TMap &map_r)
| relates: DumpMap Convenience function to create DumpMap from std::map.
template<class TMap>
std::ostream & | zypp::_logtoolsdetail::operator<< (std::ostream &str, const DumpKeys< TMap > &obj)
| relates: DumpKeys Stream output.
template<class TMap>
DumpKeys< TMap > | zypp::_logtoolsdetail::dumpKeys (const TMap &map_r)
| relates: DumpKeys Convenience function to create DumpKeys from std::map.
template<class TMap>
std::ostream & | zypp::_logtoolsdetail::operator<< (std::ostream &str, const DumpValues< TMap > &obj)
| relates: DumpValues Stream output.
template<class TMap>
DumpValues< TMap > | zypp::_logtoolsdetail::dumpValues (const TMap &map_r)
| relates: DumpValues Convenience function to create DumpValues from std::map.
template<class TKey, class Tp>
std::ostream & | std::operator<< (std::ostream &str, const std::map< TKey, Tp > &obj)
template<class TKey, class Tp>
std::ostream & | std::operator<< (std::ostream &str, const std::unordered_map< TKey, Tp > &obj)
template<class TKey, class Tp>
std::ostream & | std::operator<< (std::ostream &str, const std::multimap< TKey, Tp > &obj)
std::ostream & | std::operator<< (std::ostream &str, const std::basic_ios< char > &obj)
| Print stream status bits.
template<class Tp>
std::ostream & | zypp::detail::operator<< (std::ostream &str, const Dump< Tp > &obj)
template<class Tp>
detail::Dump< Tp > | zypp::dump (const Tp &obj_r)
std::ostream & | zypp::hexdumpOn (std::ostream &outs, const unsigned char *ptr, size_t size)
| hexdump data on stream
std::ostream & | zypp::hexdumpOn (std::ostream &outs, const char *ptr, size_t size)
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
template<class D>
std::ostream & | std::operator<< (std::ostream &str, const std::shared_ptr< D > &obj)
| relates: std::shared_ptr Stream output.
template<>
std::ostream & | std::operator<< (std::ostream &str, const std::shared_ptr< void > &obj)
std::ostream & | std::operator<< (std::ostream &str, const std::type_info &info)
template<class TPair>
MapEntry< TPair > | zypp::mapEntry (const TPair &pair_r)
| relates: MapEntry Convenience function to create MapEntry from std::pair.
template<class TMap>
DumpMap< TMap > | zypp::dumpMap (const TMap &map_r)
| relates: DumpMap Convenience function to create DumpMap from std::map.
template<class TMap>
DumpKeys< TMap > | zypp::dumpKeys (const TMap &map_r)
| relates: DumpKeys Convenience function to create DumpKeys from std::map.
template<class TMap>
DumpValues< TMap > | zypp::dumpValues (const TMap &map_r)
| relates: DumpValues Convenience function to create DumpValues from std::map.

## Variables
constexpr NoPrint | zypp::str::noPrint
constexpr auto | zypp::str::FormatConcat = makeJoinFormat( noPrint, noPrint, noPrint, noPrint, noPrint )
| Concatenated.
constexpr auto | zypp::str::FormatWords = makeJoinFormat( noPrint, noPrint, " ", noPrint, noPrint )
| ' '-separated.
constexpr auto | zypp::str::FormatLine = makeJoinFormat( noPrint, noPrint, " ", noPrint, "\n" )
| ' '-separated and NL-terminated!
constexpr auto | zypp::str::FormatList = makeJoinFormat( noPrint, noPrint, "\n", "\n", noPrint )
| One item per line NL-terminated!
constexpr auto | zypp::str::FormatTuple = makeJoinFormat( "(", noPrint, ", ", noPrint, ")" )
| Tuple: (el, .., el).
constexpr auto | zypp::str::FormatDumpRangeDefault = makeJoinFormat( "{", "\n ", "\n ", "\n", "}" )
| dumpRange default format: {}-enclosed and indented one item per line.

## Macro Definition Documentation

## ◆ pXXX

#define pXXX zypp::str::detail::PrintFmt(XXX,zypp::str::FormatLine)

Definition at line 313 of file LogTools.h.

## ◆ pDBG

#define pDBG zypp::str::detail::PrintFmt(DBG,zypp::str::FormatLine)

Definition at line 314 of file LogTools.h.

## ◆ pMIL

#define pMIL zypp::str::detail::PrintFmt(MIL,zypp::str::FormatLine)

Definition at line 315 of file LogTools.h.

## ◆ pWAR

#define pWAR zypp::str::detail::PrintFmt(WAR,zypp::str::FormatLine)

Definition at line 316 of file LogTools.h.

## ◆ pERR

#define pERR zypp::str::detail::PrintFmt(ERR,zypp::str::FormatLine)

Definition at line 317 of file LogTools.h.

## ◆ pSEC

#define pSEC zypp::str::detail::PrintFmt(SEC,zypp::str::FormatLine)

Definition at line 318 of file LogTools.h.

## ◆ pINT

#define pINT zypp::str::detail::PrintFmt(INT,zypp::str::FormatLine)

Definition at line 319 of file LogTools.h.

## ◆ pUSR

#define pUSR zypp::str::detail::PrintFmt(USR,zypp::str::FormatLine)

Definition at line 320 of file LogTools.h.

## ◆ wXXX

#define wXXX zypp::str::detail::PrintFmt(XXX,zypp::str::FormatWords)

Definition at line 322 of file LogTools.h.

## ◆ wDBG

#define wDBG zypp::str::detail::PrintFmt(DBG,zypp::str::FormatWords)

Definition at line 323 of file LogTools.h.

## ◆ wMIL

#define wMIL zypp::str::detail::PrintFmt(MIL,zypp::str::FormatWords)

Definition at line 324 of file LogTools.h.

## ◆ wWAR

#define wWAR zypp::str::detail::PrintFmt(WAR,zypp::str::FormatWords)

Definition at line 325 of file LogTools.h.

## ◆ wERR

#define wERR zypp::str::detail::PrintFmt(ERR,zypp::str::FormatWords)

Definition at line 326 of file LogTools.h.

## ◆ wSEC

#define wSEC zypp::str::detail::PrintFmt(SEC,zypp::str::FormatWords)

Definition at line 327 of file LogTools.h.

## ◆ wINT

#define wINT zypp::str::detail::PrintFmt(INT,zypp::str::FormatWords)

Definition at line 328 of file LogTools.h.

## ◆ wUSR

#define wUSR zypp::str::detail::PrintFmt(USR,zypp::str::FormatWords)

Definition at line 329 of file LogTools.h.

## ◆ pOSD

#define pOSD zypp::str::detail::PrintFmt(OSD,zypp::str::FormatLine)

Definition at line 332 of file LogTools.h.