libzypp  13.10.6
zypp::sat::Map Class Reference

Libsolv (bit)Map wrapper. More...

#include <Map.h>

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 ()
 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 struct::_Map * ()
 libsolv backdoor More...
 
 operator const struct::_Map * () const
 < libsolv backdoor More...
 

Private Attributes

RWCOW_pointer< struct::_Map > _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 36 of file Map.h.

Member Typedef Documentation

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

Definition at line 39 of file Map.h.

Constructor & Destructor Documentation

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

Default ctor: empty Map.

Definition at line 40 of file Map.cc.

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

Ctor taking the Map size.

Definition at line 44 of file Map.cc.

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

Dtor.

Definition at line 48 of file Map.cc.

Member Function Documentation

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

Whether Map is empty.

Definition at line 51 of file Map.cc.

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

Size of the Map.

Definition at line 54 of file Map.cc.

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

Grow the Map if necessary.

Definition at line 57 of file Map.cc.

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

Set all bits.

Definition at line 60 of file Map.cc.

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

Clear all bits.

Definition at line 63 of file Map.cc.

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

Assign val_r to all bits.

Definition at line 66 of file Map.cc.

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

Set bit idx_r.

Definition at line 74 of file Map.cc.

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

Clear bit idx_r.

Definition at line 80 of file Map.cc.

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

Assign val_r to bit idx_r.

Definition at line 86 of file Map.cc.

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

Test bit idx_r.

Definition at line 95 of file Map.cc.

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

Test bit idx_r.

Definition at line 85 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 101 of file Map.cc.

zypp::sat::Map::operator struct::_Map * ( )

libsolv backdoor

Definition at line 115 of file Map.cc.

zypp::sat::Map::operator const struct::_Map * ( ) const
inline

< libsolv backdoor

Definition at line 94 of file Map.h.

Friends And Related Function Documentation

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

Stream output

Definition at line 101 of file Map.h.

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

Definition at line 118 of file Map.cc.

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

Definition at line 108 of file Map.h.

Member Data Documentation

RWCOW_pointer<struct ::_Map> zypp::sat::Map::_pimpl
private

Pointer to implementation.

Definition at line 97 of file Map.h.


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