libzypp  15.28.6
zypp::bit Namespace Reference

Namespaces

 bit_detail
 

Classes

struct  MaxBits
 Number of bits available in TInt. More...
 
struct  Mask
 A bitmaks of _size 1-bits starting at bit _begin. More...
 
struct  Range
 Range of bits starting at bit _begin with length _size. More...
 
struct  Range< TInt, _begin, 0 >
 Range specialisation for (illegal) zero _size. More...
 
struct  RangeValue
 A value with in a Range. More...
 
struct  RangeBit
 A single 1-bit within a Range. More...
 
class  BitField
 An integral type used as BitField. More...
 

Functions

template<class TInt >
std::string asString (TInt val, char zero= '0', char one= '1')
 For printing bits. More...
 

Detailed Description

Todo:
Use boost::mpl library to assert constraints at compiletime! There various like (TInt is an integral type) (begin+size < maxbits) or ( field dependent constants must be within the range defined by size ).

Function Documentation

template<class TInt >
std::string zypp::bit::asString ( TInt  val,
char  zero = '0',
char  one = '1' 
)
inline

For printing bits.

Definition at line 57 of file Bit.h.