libzypp 17.37.10

zypp::sat::Map Class Reference

Libsolv (bit)Map wrapper. More...

`#include <zypp/sat/Map.h>`

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

## Public Types
using | size_type = unsigned long

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

## Static Public Attributes
static constexpr PoolSizeType | poolSize = PoolSizeType()
| An object indicating the bitmap should match the current pools capacity.

## Private Attributes
RWCOW_pointer< detail::CMap > | _pimpl
| Pointer to implementation.

## Related Symbols
(Note that these are not member symbols.)
std::ostream & | operator<< (std::ostream &str, const Map &obj)
| Stream output.
bool | operator== (const Map &lhs, const Map &rhs) ZYPP_API
bool | operator!= (const Map &lhs, const Map &rhs)

## Detailed Description

Libsolv (bit)Map wrapper.

\Note 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

## ◆ size_type

using zypp::sat::Map::size_type = unsigned long

Definition at line 36 of file Map.h.

## Constructor & Destructor Documentation

## ◆ Map() [1/3]

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

Default ctor: empty Map.

Definition at line 43 of file Map.cc.

## ◆ Map() [2/3]

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

Ctor taking the Map size.

Definition at line 47 of file Map.cc.

## ◆ Map() [3/3]

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

Ctor creating a Map matching the current pools capacity.

Definition at line 51 of file Map.cc.

## ◆ ~Map()

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

Dtor.

Definition at line 55 of file Map.cc.

## Member Function Documentation

## ◆ empty()

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

Whether Map is empty.

Definition at line 58 of file Map.cc.

## ◆ size()

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

Size of the Map.

Definition at line 61 of file Map.cc.

## ◆ grow()

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

Grow the Map if necessary.

Definition at line 64 of file Map.cc.

## ◆ setAll()

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

Set all bits.

Definition at line 67 of file Map.cc.

## ◆ clearAll()

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

Clear all bits.

Definition at line 70 of file Map.cc.

## ◆ assignAll()

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

Assign `val_r` to all bits.

Definition at line 73 of file Map.cc.

## ◆ set()

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

Set bit `idx_r`.

Exceptions

  std::out_of_range | if idx_r is out of range

Definition at line 81 of file Map.cc.

## ◆ clear()

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

Clear bit `idx_r`.

Exceptions

  std::out_of_range | if idx_r is out of range

Definition at line 87 of file Map.cc.

## ◆ assign()

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

Assign `val_r` to bit `idx_r`.

Exceptions

  std::out_of_range | if idx_r is out of range

Definition at line 93 of file Map.cc.

## ◆ test()

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

Test bit `idx_r`.

Exceptions

  std::out_of_range | if idx_r is out of range

Definition at line 102 of file Map.cc.

## ◆ operator[]()

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

Test bit `idx_r`.

Exceptions

  std::out_of_range | if idx_r is out of range

Definition at line 100 of file Map.h.

## ◆ asString()

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

String representation.

Definition at line 108 of file Map.cc.

## ◆ operator detail::CMap *()

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

libsolv backdoor

Definition at line 122 of file Map.cc.

## ◆ operator const detail::CMap *()

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

< libsolv backdoor

Definition at line 109 of file Map.h.

## Friends And Related Symbol Documentation

## ◆ operator<<()

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

Stream output.

Definition at line 116 of file Map.h.

## ◆ operator==()

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

Definition at line 125 of file Map.cc.

## ◆ operator!=()

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

Definition at line 123 of file Map.h.

## Member Data Documentation

## ◆ poolSize

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

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

Definition at line 41 of file Map.h.

## ◆ _pimpl

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:

- zypp/sat/Map.h
- zypp/sat/Map.cc