libzypp  15.28.6
zypp::sat::Map Class Reference

Libsolv (bit)Map wrapper. More...

#include <Map.h>

Classes

struct  PoolSizeType
 Type to indicate the bitmap should match the current pools capacity. More...
 

Public Types

typedef unsigned long size_type
 

Public Member Functions

 Map ()
 Default ctor: empty Map. More...
 
 Map (size_type size_r)
 Ctor taking the Map size. More...
 
 Map (PoolSizeType)
 Ctor creating a Map matching the current pools capacity. More...
 
 ~Map ()
 Dtor. More...
 
bool empty () const
 Whether Map is empty. More...
 
size_type size () const
 Size of the Map. More...
 
void grow (size_type size_r)
 Grow the Map if necessary. More...
 
void setAll ()
 Set all bits. More...
 
void clearAll ()
 Clear all bits. More...
 
void assignAll (bool val_r)
 Assign val_r to all bits. More...
 
void set (size_type idx_r)
 Set bit idx_r. More...
 
void clear (size_type idx_r)
 Clear bit idx_r. More...
 
void assign (size_type idx_r, bool val_r)
 Assign val_r to bit idx_r. More...
 
bool test (size_type idx_r) const
 Test bit idx_r. More...
 
bool operator[] (size_type idx_r) const
 Test bit idx_r. More...
 
std::string asString (const char on_r= '1', const char off_r= '0') const
 String representation. More...
 
 operator detail::CMap * ()
 libsolv backdoor More...
 
 operator const detail::CMap * () const
 < libsolv backdoor More...
 

Static Public Attributes

static constexpr PoolSizeType poolSize = PoolSizeType()
 An object indicating the bitmap should match the current pools capacity. More...
 

Private Attributes

RWCOW_pointer< detail::CMap_pimpl
 Pointer to implementation. More...
 

Related Functions

(Note that these are not member functions.)

std::ostream & operator<< (std::ostream &str, const Map &obj)
 
bool operator== (const Map &lhs, const Map &rhs)
 
bool operator!= (const Map &lhs, const Map &rhs)
 

Detailed Description

Libsolv (bit)Map wrapper.

Requested sizes are filled up to the next multiple of eight. Libsolv bitmaps are not shrinkable.

Definition at line 33 of file Map.h.

Member Typedef Documentation

typedef unsigned long zypp::sat::Map::size_type

Definition at line 36 of file Map.h.

Constructor & Destructor Documentation

zypp::sat::Map::Map ( )

Default ctor: empty Map.

Definition at line 41 of file Map.cc.

zypp::sat::Map::Map ( size_type  size_r)
explicit

Ctor taking the Map size.

Definition at line 45 of file Map.cc.

zypp::sat::Map::Map ( PoolSizeType  )

Ctor creating a Map matching the current pools capacity.

Definition at line 49 of file Map.cc.

zypp::sat::Map::~Map ( )

Dtor.

Definition at line 53 of file Map.cc.

Member Function Documentation

bool zypp::sat::Map::empty ( ) const

Whether Map is empty.

Definition at line 56 of file Map.cc.

Map::size_type zypp::sat::Map::size ( ) const

Size of the Map.

Definition at line 59 of file Map.cc.

void zypp::sat::Map::grow ( size_type  size_r)

Grow the Map if necessary.

Definition at line 62 of file Map.cc.

void zypp::sat::Map::setAll ( )

Set all bits.

Definition at line 65 of file Map.cc.

void zypp::sat::Map::clearAll ( )

Clear all bits.

Definition at line 68 of file Map.cc.

void zypp::sat::Map::assignAll ( bool  val_r)

Assign val_r to all bits.

Definition at line 71 of file Map.cc.

void zypp::sat::Map::set ( size_type  idx_r)

Set bit idx_r.

Exceptions
std::out_of_rangeif idx_r is out of range

Definition at line 79 of file Map.cc.

void zypp::sat::Map::clear ( size_type  idx_r)

Clear bit idx_r.

Exceptions
std::out_of_rangeif idx_r is out of range

Definition at line 85 of file Map.cc.

void zypp::sat::Map::assign ( size_type  idx_r,
bool  val_r 
)

Assign val_r to bit idx_r.

Exceptions
std::out_of_rangeif idx_r is out of range

Definition at line 91 of file Map.cc.

bool zypp::sat::Map::test ( size_type  idx_r) const

Test bit idx_r.

Exceptions
std::out_of_rangeif idx_r is out of range

Definition at line 100 of file Map.cc.

bool zypp::sat::Map::operator[] ( size_type  idx_r) const
inline

Test bit idx_r.

Exceptions
std::out_of_rangeif idx_r is out of range

Definition at line 100 of file Map.h.

std::string zypp::sat::Map::asString ( const char  on_r = '1',
const char  off_r = '0' 
) const

String representation.

Definition at line 106 of file Map.cc.

zypp::sat::Map::operator detail::CMap * ( )

libsolv backdoor

Definition at line 120 of file Map.cc.

zypp::sat::Map::operator const detail::CMap * ( ) const
inline

< libsolv backdoor

Definition at line 109 of file Map.h.

Friends And Related Function Documentation

std::ostream & operator<< ( std::ostream &  str,
const Map obj 
)
related

Stream output

Definition at line 116 of file Map.h.

bool operator== ( const Map lhs,
const Map rhs 
)
related

Definition at line 123 of file Map.cc.

bool operator!= ( const Map lhs,
const Map rhs 
)
related

Definition at line 123 of file Map.h.

Member Data Documentation

constexpr PoolSizeType zypp::sat::Map::poolSize = PoolSizeType()
static

An object indicating the bitmap should match the current pools capacity.

Definition at line 41 of file Map.h.

RWCOW_pointer<detail::CMap> zypp::sat::Map::_pimpl
private

Pointer to implementation.

Definition at line 112 of file Map.h.


The documentation for this class was generated from the following files: