13#include <solv/bitmap.h>
17#include <zypp/base/LogTools.h>
18#include <zypp/base/String.h>
44 : _pimpl( new detail::CMap )
48 : _pimpl( new detail::CMap )
52 : _pimpl( new detail::CMap )
59 {
return(
_pimpl->size == 0 ); }
62 {
return _pimpl->size << 3; }
79#define M_RANGE_CKECK(IDX,LOC) if ( ((IDX) >> 3) >= size_type(_pimpl->size) ) throw std::out_of_range( "zypp::sat::Map::" LOC )
97 { MAPSET(
_pimpl, idx_r ); }
99 { MAPCLR(
_pimpl, idx_r ); }
105 return MAPTST(
_pimpl, idx_r );
111 return std::string();
113 std::string ret(
size(), off_r );
123 {
return _pimpl.get(); }
129 return( l == r || ( l->size == r->size && ::memcmp( l->map, r->map, l->size ) == 0 ) );
#define M_RANGE_CKECK(IDX, LOC)
Libsolv (bit)Map wrapper.
std::string asString(const char on_r='1', const char off_r='0') const
String representation.
void clear(size_type idx_r)
Clear bit idx_r.
size_type size() const
Size of the Map.
void grow(size_type size_r)
Grow the Map if necessary.
void assign(size_type idx_r, bool val_r)
Assign val_r to bit idx_r.
void clearAll()
Clear all bits.
static constexpr PoolSizeType poolSize
An object indicating the bitmap should match the current pools capacity.
Map()
Default ctor: empty Map.
bool test(size_type idx_r) const
Test bit idx_r.
void set(size_type idx_r)
Set bit idx_r.
RWCOW_pointer< detail::CMap > _pimpl
Pointer to implementation.
void assignAll(bool val_r)
Assign val_r to all bits.
bool empty() const
Whether Map is empty.
void setAll()
Set all bits.
size_type capacity() const
Internal array size for stats only.
static Pool instance()
Singleton ctor.
::s_Map CMap
Wrapped libsolv C data type exposed as backdoor.
bool operator==(const Map &lhs, const Map &rhs)
Easy-to use interface to the ZYPP dependency resolver.
sat::detail::CMap * rwcowClone< sat::detail::CMap >(const sat::detail::CMap *rhs)
Type to indicate the bitmap should match the current pools capacity.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.