12 #ifndef ZYPP_BASE_UNIT_H 13 #define ZYPP_BASE_UNIT_H 59 , _symbol(
std::move( symbol_r ))
74 unsigned field_width_r = 0,
75 unsigned unit_width_r = 1 )
const 76 {
return form( val_r, field_width_r, unit_width_r, _prec ); }
79 unsigned field_width_r,
80 unsigned unit_width_r,
81 unsigned prec_r )
const 82 {
return form(
double(val_r)/_factor, _symbol,
83 field_width_r, unit_width_r, prec_r ); }
86 static std::string
form(
double val_r,
87 const std::string & symbol_r,
88 unsigned field_width_r,
89 unsigned unit_width_r,
106 #endif // ZYPP_BASE_UNIT_H
std::string form(ValueType val_r, unsigned field_width_r=0, unsigned unit_width_r=1) const
Build string representation of val_r.
std::string form(const char *format,...) __attribute__((format(printf
Printf style construction of std::string.
const Arch Arch_armv7hnl Arch_armv7nhl ZYPP_API
Simple handling of Units.
const std::string & symbol() const
Easy-to use interface to the ZYPP dependency resolver.
Unit(ValueType factor_r, std::string symbol_r, unsigned prec_r)
ctor
std::string form(ValueType val_r, unsigned field_width_r, unsigned unit_width_r, unsigned prec_r) const