34      template<
class TInt, 
unsigned _size>
 
 
   57      inline std::string 
asString( TInt val, 
char zero = 
'0', 
char one = 
'1' )
 
 
   71    template<
class TInt, 
unsigned _begin, 
unsigned _size>
 
   80    template<
class TInt, 
unsigned _begin, 
unsigned _size>
 
   87        static const unsigned begin  = _begin;
 
   88        static const unsigned size   = _size;
 
   89        static const unsigned end    = _begin + _size;
 
 
   95    template<
class TInt, 
unsigned _begin>
 
  109    template<
class TRange, 
typename TRange::IntT _value>
 
  113        using IntT = 
typename TRange::IntT;
 
 
  127    template<
class TRange, 
unsigned _pos>
 
  131        using IntT = 
typename TRange::IntT;
 
 
  174        { 
return _value != (TInt)0; }
 
 
  178        template<
class TRange>
 
  181            return _value & TRange::Mask::value;
 
 
  189        template<
class TRange>
 
  200        template<
class TRange>
 
  204                   | (rhs & TRange::Mask::value);
 
 
  214        template<
class TRange>
 
  217            return (
_value & TRange::Mask::value)
 
  218                == (rhs & TRange::Mask::value);
 
 
  228        template<
class TRange>
 
  230            { 
return set( (rhs & TRange::Mask::value), doset_r ); }
 
 
  233        { 
return doset_r ? 
set( rhs ) : 
unset( rhs ); }
 
 
  236        template<
class TRange>
 
  238            { 
return set( rhs & TRange::Mask::value ); }
 
 
  241        { 
_value |= rhs; 
return *
this; }
 
 
  244        template<
class TRange>
 
  246            { 
return unset( rhs & TRange::Mask::value ); }
 
 
  249        { 
_value &= ~rhs; 
return *
this; }
 
 
  252        template<
class TRange>
 
  254            { 
return test( rhs & TRange::Mask::value ); }
 
 
  257        { 
return (
_value & rhs) == rhs; }
 
 
  260        template<
class TRange>
 
  262            { 
return testAnyOf( rhs & TRange::Mask::value ); }
 
 
  265        { 
return (
_value & rhs); }
 
 
  282        { 
_value <<= num; 
return *
this; }
 
 
  285        { 
_value >>= num; 
return *
this; }
 
 
 
  310      { 
return ! (lhs == rhs); }
 
 
 
An integral type used as BitField.
BitField & operator|=(const BitField &rhs)
BitField & operator>>=(unsigned num)
bool testAnyOf(TInt rhs)
Test whether at least one bit of rhs is set.
bool test(TInt rhs)
Test whether all bits of rhs are set.
bool operator==(const BitField< TInt > &lhs, const BitField< TInt > &rhs)
BitField< TInt > operator&(const BitField< TInt > &lhs, const BitField< TInt > &rhs)
BitField & assign(TInt rhs)
BitField(const TInt &value_r)
Ctor taking an TInt.
BitField & set(TInt rhs, bool doset_r)
Set or unset bits of rhs.
BitField & assign(TInt rhs)
Assign Range in rhs to this.
BitField & operator<<=(unsigned num)
BitField operator~() const
BitField()
Default ctor: zero.
std::ostream & operator<<(std::ostream &str, const BitField< TInt > &obj)
Stream output.
bool operator!=(const BitField< TInt > &lhs, const BitField< TInt > &rhs)
BitField< TInt > operator|(const BitField< TInt > &lhs, const BitField< TInt > &rhs)
TInt value() const
Return the value.
std::string asString() const
BitField & unset(TInt rhs)
BitField & operator^=(const BitField &rhs)
BitField< TInt > operator^(const BitField< TInt > &lhs, const BitField< TInt > &rhs)
bool testAnyOf(TInt rhs) const
BitField & operator&=(const BitField &rhs)
BitField & operator=(const BitField &rhs)
BitField & set(TInt rhs)
Set bits of rhs.
BitField< TInt > operator>>(const BitField< TInt > &lhs, unsigned num)
bool isEqual(TInt rhs) const
BitField & set(TInt rhs, bool doset_r)
bool isEqual(TInt rhs) const
Test for equal value within a Range.
std::string asString() const
Value as bit string.
bool test(TInt rhs) const
BitField & unset(TInt rhs)
Unset bits of rhs.
String related utilities and Regular expression matching.
std::string asString(TInt val, char zero='0', char one='1')
For printing bits.
Easy-to use interface to the ZYPP dependency resolver.
A bitmaks of _size 1-bits starting at bit _begin.
static const IntT inverted
Number of bits available in TInt.
static const unsigned value
A single 1-bit within a Range.
typename TRange::IntT IntT
typename TRange::IntT IntT
Range of bits starting at bit _begin with length _size.
static const unsigned end
static const unsigned begin
static const unsigned size
zypp::bit::MaxBits< IntT > MaxBits
zypp::bit::Mask< IntT, _begin, _size > Mask
Generate constants with _size trailing '1'-bits.