13 #include <solv/queue.h>
31 ::queue_init_clone( ret, const_cast<sat::detail::CQueue *>(rhs) );
40 : _pimpl( new detail::
CQueue )
47 {
return(
_pimpl->count == 0 ); }
53 {
return _pimpl->elements; }
80 #define M_RANGE_CKECK(IDX,LOC) if ( IDX >= size_type(_pimpl->count) ) throw std::out_of_range( "zypp::sat::Queue::" LOC )
89 {
return _pimpl->elements[idx_r]; }
92 {
return _pimpl->elements[idx_r]; }
95 { ::queue_empty( *
this ); }
107 { ::queue_pushunique(
_pimpl.
get(), val_r ); }
113 { ::queue_unshift(
_pimpl.
get(), val_r ); }
116 { return ::queue_shift(
_pimpl.
get() ); }
119 {
return _pimpl.get(); }
131 str <<
" " <<
Solvable(*it) << endl;
140 return( l == r || ( l->count == r->count && ::memcmp( l->elements, r->elements, l->count ) == 0 ) );
void remove(value_type val_r)
Remove all occurances of val_r from the queue.
A Solvable object within the sat Pool.
detail::IdType value_type
bool operator==(const Map &lhs, const Map &rhs)
std::ostream & operator<<(std::ostream &str, const FileConflicts &obj)
value_type last() const
Return the last Id in the queue or 0 if empty.
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
const_iterator find(value_type val_r) const
Return iterator to the 1st occurance of val_r or end.
const_iterator end() const
void push(value_type val_r)
Push a value to the end off the Queue.
void pushUnique(value_type val_r)
Push a value if it's not yet in the Queue.
const_iterator begin() const
value_type pop_front()
Pop and return the 1st Id from the queue or 0 if empty.
void push_front(value_type val_r)
Push a value to the beginning off the Queue.
const value_type * const_iterator
RWCOW_pointer< detail::CQueue > _pimpl
Pointer to implementation.
std::ostream & dumpOn(std::ostream &str, const LocaleSupport &obj)
const value_type & at(size_type idx_r) const
Return the Id at idx_r in the queue.
Libsolv Id queue wrapper.
void clear()
Clear the queue.
const value_type & operator[](size_type idx_r) const
Return the Id at idx_r in the queue (no range check)
std::ostream & dumpRangeLine(std::ostream &str, TIterator begin, TIterator end)
Print range defined by iterators (single line style).
#define M_RANGE_CKECK(IDX, LOC)
Queue()
Default ctor: empty Queue.
::_Queue CQueue
Wrapped libsolv C data type exposed as backdoor.
value_type first() const
Return the 1st Id in the queue or 0 if empty.
value_type pop()
Pop and return the last Id from the queue or 0 if empty.