libzypp: zyppng::sat::Queue Class Reference

libzypp 17.38.14

zyppng::sat::Queue Class Reference

Libsolv Id queue wrapper. More...

`#include <zypp/ng/sat/queue.h>`

## Public Types
using | size_type = unsigned int
using | value_type = detail::IdType
using | const_iterator = const value_type *

## Public Member Functions
| Queue ()
| Default ctor: empty Queue.
| ~Queue ()
| Dtor.
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.
bool | contains (value_type val_r) const
| Return whether the Queue contais at lest one element with value val_r.
value_type | first () const
| Return the 1st Id in the queue or `0` if empty.
value_type | last () const
| Return the last Id in the queue or `0` if empty.
const value_type & | at (size_type idx_r) const
| Return the Id at idx_r in the queue.
value_type & | at (size_type idx_r)
| Return the Id at idx_r in the queue.
const value_type & | operator[] (size_type idx_r) const
| Return the Id at idx_r in the queue (no range check).
value_type & | operator[] (size_type idx_r)
| Return the Id at idx_r in the queue (no range check).
void | clear ()
| Clear the queue.
void | remove (value_type val_r)
| Remove all occurances of val_r from the queue.
void | push (value_type val_r)
| Push a value to the end off the Queue.
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.
void | pushUnique (value_type val_r)
| Push a value if it's not yet in the Queue.
value_type | pop ()
| Pop and return the last Id from the queue or `0` if empty.
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.
void | push_front (value_type val_r)
| Push a value to the beginning off the Queue.
value_type | pop_front ()
| Pop and return the 1st Id from the queue or `0` if empty.
| operator detail::CQueue * ()
| libsolv backdoor
| operator const detail::CQueue * () const
| < libsolv backdoor

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

## Detailed Description

Libsolv Id queue wrapper.

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

Definition at line 36 of file queue.h.

## Member Typedef Documentation

## ◆ size_type

using zyppng::sat::Queue::size_type = unsigned int

Definition at line 39 of file queue.h.

## ◆ value_type

using zyppng::sat::Queue::value_type = detail::IdType

Definition at line 40 of file queue.h.

## ◆ const_iterator

using zyppng::sat::Queue::const_iterator = const value_type *

Definition at line 41 of file queue.h.

## Constructor & Destructor Documentation

## ◆ Queue()

zyppng::sat::Queue::Queue | ( |  | ) |

Default ctor: empty Queue.

Definition at line 46 of file queue.cc.

## ◆ ~Queue()

zyppng::sat::Queue::~Queue | ( |  | ) |

Dtor.

Definition at line 50 of file queue.cc.

## Member Function Documentation

## ◆ empty()

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

Definition at line 53 of file queue.cc.

## ◆ size()

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

Definition at line 56 of file queue.cc.

## ◆ begin()

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

Definition at line 59 of file queue.cc.

## ◆ end()

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

Definition at line 62 of file queue.cc.

## ◆ find()

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

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

Definition at line 65 of file queue.cc.

## ◆ contains()

bool zyppng::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 59 of file queue.h.

## ◆ first()

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

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

Definition at line 71 of file queue.cc.

## ◆ last()

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

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

Definition at line 78 of file queue.cc.

## ◆ at() [1/2]

const Queue::value_type & zyppng::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 87 of file queue.cc.

## ◆ at() [2/2]

Queue::value_type & zyppng::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 90 of file queue.cc.

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

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

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

Definition at line 93 of file queue.cc.

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

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

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

Definition at line 96 of file queue.cc.

## ◆ clear()

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

Clear the queue.

Definition at line 99 of file queue.cc.

## ◆ remove()

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

Remove all occurances of val_r from the queue.

Definition at line 102 of file queue.cc.

## ◆ push()

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

Push a value to the end off the Queue.

Definition at line 108 of file queue.cc.

## ◆ push_back()

void zyppng::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 93 of file queue.h.

## ◆ pushUnique()

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

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

Definition at line 111 of file queue.cc.

## ◆ pop()

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

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

Definition at line 114 of file queue.cc.

## ◆ pop_back()

value_type zyppng::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 102 of file queue.h.

## ◆ push_front()

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

Push a value to the beginning off the Queue.

Definition at line 117 of file queue.cc.

## ◆ pop_front()

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

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

Definition at line 120 of file queue.cc.

## ◆ operator detail::CQueue *()

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

libsolv backdoor

Definition at line 123 of file queue.cc.

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

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

< libsolv backdoor

Definition at line 113 of file queue.h.

## Member Data Documentation

## ◆ _pimpl

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

Pointer to implementation.

Definition at line 116 of file queue.h.

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

- zypp/ng/sat/queue.h
- zypp/ng/sat/queue.cc