libzypp: zypp::sat::Queue Class Reference

libzypp 17.25.10

Public Types | Public Member Functions | Private Attributes | Related Functions | List of all members
zypp::sat::Queue Class Reference

Libsolv Id queue wrapper. More...

`#include <Queue.h>`

Inheritance diagram for zypp::sat::Queue:
[legend]

## Public Types
typedef unsigned | size_type
typedef detail::IdType | value_type
typedef const value_type * | const_iterator

## Public Member Functions
| Queue ()
| Default ctor: empty Queue. More...
| ~Queue ()
| Dtor. More...
bool | empty () const
size_type | size () const
const_iterator | begin () const
const_iterator | end () const
const_iterator | find (value_type val_r) const
| Return iterator to the 1st occurance of val_r or end. More...
bool | contains (value_type val_r) const
| Return whether the Queue contais at lest one element with value val_r. More...
value_type | first () const
| Return the 1st Id in the queue or `0` if empty. More...
value_type | last () const
| Return the last Id in the queue or `0` if empty. More...
const value_type & | at (size_type idx_r) const
| Return the Id at idx_r in the queue. More...
value_type & | at (size_type idx_r)
| Return the Id at idx_r in the queue. More...
const value_type & | operator[] (size_type idx_r) const
| Return the Id at idx_r in the queue (no range check) More...
value_type & | operator[] (size_type idx_r)
| Return the Id at idx_r in the queue (no range check) More...
void | clear ()
| Clear the queue. More...
void | remove (value_type val_r)
| Remove all occurances of val_r from the queue. More...
void | push (value_type val_r)
| Push a value to the end off the Queue. More...
void | push_back (value_type val_r)
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
void | pushUnique (value_type val_r)
| Push a value if it's not yet in the Queue. More...
value_type | pop ()
| Pop and return the last Id from the queue or `0` if empty. More...
value_type | pop_back ()
| This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts. More...
void | push_front (value_type val_r)
| Push a value to the beginning off the Queue. More...
value_type | pop_front ()
| Pop and return the 1st Id from the queue or `0` if empty. More...
| operator detail::CQueue * ()
| libsolv backdoor More...
| operator const detail::CQueue * () const
| < libsolv backdoor More...

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

## Related Functions
(Note that these are not member functions.)
std::ostream & | operator<< (std::ostream &str, const Queue &obj)
| Stream output. More...
std::ostream & | dumpOn (std::ostream &str, const Queue &obj)
| Stream output assuming a Solvable queue. More...
bool | operator== (const Queue &lhs, const Queue &rhs)
bool | operator!= (const Queue &lhs, const Queue &rhs)

## Detailed Description

Libsolv Id queue wrapper.

Todo:
  template value_type to work with IString and other Id based types

Definition at line 34 of file Queue.h.

## Member Typedef Documentation

## ◆ size_type

typedef unsigned zypp::sat::Queue::size_type

Definition at line 37 of file Queue.h.

## ◆ value_type

typedef detail::IdType zypp::sat::Queue::value_type

Definition at line 38 of file Queue.h.

## ◆ const_iterator

typedef const value_type* zypp::sat::Queue::const_iterator

Definition at line 39 of file Queue.h.

## Constructor & Destructor Documentation

## ◆ Queue()

zypp::sat::Queue::Queue | ( |  | ) |

Default ctor: empty Queue.

Definition at line 39 of file Queue.cc.

## ◆ ~Queue()

zypp::sat::Queue::~Queue | ( |  | ) |

Dtor.

Definition at line 43 of file Queue.cc.

## Member Function Documentation

## ◆ empty()

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

Definition at line 46 of file Queue.cc.

## ◆ size()

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

Definition at line 49 of file Queue.cc.

## ◆ begin()

Queue::const_iterator zypp::sat::Queue::begin | ( |  | ) | const

Definition at line 52 of file Queue.cc.

## ◆ end()

Queue::const_iterator zypp::sat::Queue::end | ( |  | ) | const

Definition at line 55 of file Queue.cc.

## ◆ find()

Queue::const_iterator zypp::sat::Queue::find | ( | value_type | val_r | ) | const

Return iterator to the 1st occurance of val_r or end.

Definition at line 58 of file Queue.cc.

## ◆ contains()

bool zypp::sat::Queue::contains | ( | value_type | val_r | ) | const
| inline

Return whether the Queue contais at lest one element with value val_r.

Definition at line 57 of file Queue.h.

## ◆ first()

Queue::value_type zypp::sat::Queue::first | ( |  | ) | const

Return the 1st Id in the queue or `0` if empty.

Definition at line 66 of file Queue.cc.

## ◆ last()

Queue::value_type zypp::sat::Queue::last | ( |  | ) | const

Return the last Id in the queue or `0` if empty.

Definition at line 73 of file Queue.cc.

## ◆ at() [1/2]

const Queue::value_type & zypp::sat::Queue::at | ( | size_type | idx_r | ) | const

Return the Id at idx_r in the queue.

Exceptions

  std::out_of_range | if idx_r is out of range

Definition at line 82 of file Queue.cc.

## ◆ at() [2/2]

Queue::value_type & zypp::sat::Queue::at | ( | size_type | idx_r | ) |

Return the Id at idx_r in the queue.

Exceptions

  std::out_of_range | if idx_r is out of range

Definition at line 85 of file Queue.cc.

## ◆ operator[]() [1/2]

const Queue::value_type & zypp::sat::Queue::operator[] | ( | size_type | idx_r | ) | const

Return the Id at idx_r in the queue (no range check)

Definition at line 88 of file Queue.cc.

## ◆ operator[]() [2/2]

Queue::value_type & zypp::sat::Queue::operator[] | ( | size_type | idx_r | ) |

Return the Id at idx_r in the queue (no range check)

Definition at line 91 of file Queue.cc.

## ◆ clear()

void zypp::sat::Queue::clear | ( |  | ) |

Clear the queue.

Definition at line 94 of file Queue.cc.

## ◆ remove()

void zypp::sat::Queue::remove | ( | value_type | val_r | ) |

Remove all occurances of val_r from the queue.

Definition at line 97 of file Queue.cc.

## ◆ push()

void zypp::sat::Queue::push | ( | value_type | val_r | ) |

Push a value to the end off the Queue.

Definition at line 103 of file Queue.cc.

## ◆ push_back()

void zypp::sat::Queue::push_back | ( | value_type | val_r | ) |
| inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 91 of file Queue.h.

## ◆ pushUnique()

void zypp::sat::Queue::pushUnique | ( | value_type | val_r | ) |

Push a value if it's not yet in the Queue.

Definition at line 106 of file Queue.cc.

## ◆ pop()

Queue::value_type zypp::sat::Queue::pop | ( |  | ) |

Pop and return the last Id from the queue or `0` if empty.

Definition at line 109 of file Queue.cc.

## ◆ pop_back()

value_type zypp::sat::Queue::pop_back | ( |  | ) |
| inline

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 100 of file Queue.h.

## ◆ push_front()

void zypp::sat::Queue::push_front | ( | value_type | val_r | ) |

Push a value to the beginning off the Queue.

Definition at line 112 of file Queue.cc.

## ◆ pop_front()

Queue::value_type zypp::sat::Queue::pop_front | ( |  | ) |

Pop and return the 1st Id from the queue or `0` if empty.

Definition at line 115 of file Queue.cc.

## ◆ operator detail::CQueue *()

zypp::sat::Queue::operator detail::CQueue * | ( |  | ) |

libsolv backdoor

Definition at line 118 of file Queue.cc.

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

zypp::sat::Queue::operator const detail::CQueue * | ( |  | ) | const
| inline

< libsolv backdoor

Definition at line 111 of file Queue.h.

## Friends And Related Function Documentation

## ◆ operator<<()

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

Stream output.

Definition at line 121 of file Queue.cc.

## ◆ dumpOn()

std::ostream & dumpOn | ( | std::ostream & | str,
|  | const Queue & | obj
| ) |  |
| related

Stream output assuming a Solvable queue.

Definition at line 124 of file Queue.cc.

## ◆ operator==()

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

Definition at line 136 of file Queue.cc.

## ◆ operator!=()

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

Definition at line 127 of file Queue.h.

## Member Data Documentation

## ◆ _pimpl

RWCOW_pointer<detail::CQueue> zypp::sat::Queue::_pimpl
| private

Pointer to implementation.

Definition at line 114 of file Queue.h.

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

- zypp/sat/Queue.h
- zypp/sat/Queue.cc