16 #include <solv/queue.h> 32 ::queue_init_clone( ret, const_cast<sat::detail::CQueue *>(rhs) );
46 : _pimpl( new detail::
CQueue )
53 {
return(
_pimpl->count == 0 ); }
59 {
return _pimpl->elements; }
86 #define M_RANGE_CKECK(IDX,LOC) if ( IDX >= size_type(_pimpl->count) ) throw std::out_of_range( "zypp::sat::Queue::" LOC ) 95 {
return _pimpl->elements[idx_r]; }
98 {
return _pimpl->elements[idx_r]; }
101 { ::queue_empty( *
this ); }
113 { ::queue_pushunique(
_pimpl.
get(), val_r ); }
119 { ::queue_unshift(
_pimpl.
get(), val_r ); }
122 { return ::queue_shift(
_pimpl.
get() ); }
125 {
return _pimpl.get(); }
131 return( l == r || ( l->count == r->count && ::memcmp( l->elements, r->elements, l->count *
sizeof( *l->elements ) ) == 0 ) );
bool operator==(const Capability &lhs, const Capability &rhs)
relates: Capability
value_type first() const
Return the 1st Id in the queue or 0 if empty.
detail::IdType value_type
zypp::sat::detail::CQueue CQueue
Queue()
Default ctor: empty Queue.
const value_type & operator[](size_type idx_r) const
Return the Id at idx_r in the queue (no range check)
#define for_(IT, BEG, END)
Convenient for-loops using iterator.
const value_type * const_iterator
const value_type & at(size_type idx_r) const
Return the Id at idx_r in the queue.
void remove(value_type val_r)
Remove all occurances of val_r from the queue.
value_type pop()
Pop and return the last Id from the queue or 0 if empty.
void pushUnique(value_type val_r)
Push a value if it's not yet in the Queue.
void push(value_type val_r)
Push a value to the end off the Queue.
const_iterator begin() const
value_type pop_front()
Pop and return the 1st Id from the queue or 0 if empty.
#define M_RANGE_CKECK(IDX, LOC)
value_type last() const
Return the last Id in the queue or 0 if empty.
Libsolv Id queue wrapper.
void push_front(value_type val_r)
Push a value to the beginning off the Queue.
const_iterator end() const
::s_Queue CQueue
Wrapped libsolv C data type exposed as backdoor.
const_iterator find(value_type val_r) const
Return iterator to the 1st occurance of val_r or end.
void clear()
Clear the queue.
Easy-to use interface to the ZYPP dependency resolver.
zypp::RWCOW_pointer< zypp::sat::detail::CQueue > _pimpl
Pointer to implementation.