Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET | Apache Qpid Documentation |
A set implemented as a list of [begin, end) ranges. More...
#include <qpid/RangeSet.h>
Classes | |
class | iterator |
Public Types | |
typedef iterator | const_iterator |
typedef Ranges::const_iterator | RangeIterator |
Public Member Functions | |
RangeSet () | |
RangeSet (const Range< T > &r) | |
RangeSet (const T &a, const T &b) | |
bool | contiguous () const |
bool | contains (const T &t) const |
bool | contains (const Range< T > &) const |
Range< T > | toRange () const |
bool | operator== (const RangeSet< T > &) const |
void | addRange (const Range< T > &) |
void | addSet (const RangeSet< T > &) |
RangeSet< T > & | operator+= (const T &t) |
RangeSet< T > & | operator+= (const Range< T > &r) |
RangeSet< T > & | operator+= (const RangeSet< T > &s) |
void | removeRange (const Range< T > &) |
void | removeSet (const RangeSet< T > &) |
RangeSet< T > & | operator-= (const T &t) |
RangeSet< T > & | operator-= (const Range< T > &r) |
RangeSet< T > & | operator-= (const RangeSet< T > &s) |
T | front () const |
T | back () const |
iterator | begin () const |
iterator | end () const |
RangeIterator | rangesBegin () const |
RangeIterator | rangesEnd () const |
size_t | rangesSize () const |
uint32_t | span () const |
size_t | size () const |
bool | empty () const |
void | clear () |
Range< T > | rangeContaining (const T &) const |
Return the largest contiguous range containing x. | |
template<class S > | |
void | serialize (S &s) |
template<class S > | |
void | encode (S &s) const |
template<class S > | |
void | decode (S &s) |
Friends | |
template<class U > | |
std::ostream & | operator<< (std::ostream &o, const RangeSet< U > &r) |
A set implemented as a list of [begin, end) ranges.
T must be LessThanComparable and Incrementable. RangeSet only provides const iterators.
Definition at line 96 of file RangeSet.h.
typedef iterator qpid::RangeSet< T >::const_iterator |
Definition at line 130 of file RangeSet.h.
typedef Ranges::const_iterator qpid::RangeSet< T >::RangeIterator |
Definition at line 168 of file RangeSet.h.
qpid::RangeSet< T >::RangeSet | ( | ) | [inline] |
Definition at line 132 of file RangeSet.h.
qpid::RangeSet< T >::RangeSet | ( | const Range< T > & | r | ) | [inline, explicit] |
Definition at line 133 of file RangeSet.h.
qpid::RangeSet< T >::RangeSet | ( | const T & | a, | |
const T & | b | |||
) | [inline] |
Definition at line 134 of file RangeSet.h.
void qpid::RangeSet< T >::addRange | ( | const Range< T > & | r | ) | [inline] |
Definition at line 225 of file RangeSet.h.
References qpid::Range< T >::empty().
Referenced by qpid::RangeSet< SequenceNumber >::operator+=().
void qpid::RangeSet< T >::addSet | ( | const RangeSet< T > & | s | ) | [inline] |
Definition at line 242 of file RangeSet.h.
Referenced by qpid::RangeSet< SequenceNumber >::operator+=().
T qpid::RangeSet< T >::back | ( | ) | const [inline] |
Definition at line 161 of file RangeSet.h.
RangeSet< T >::iterator qpid::RangeSet< T >::begin | ( | ) | const [inline] |
Definition at line 300 of file RangeSet.h.
References qpid::RangeSet< T >::empty(), qpid::RangeSet< T >::end(), qpid::RangeSet< T >::front(), and qpid::RangeSet< T >::iterator.
void qpid::RangeSet< T >::clear | ( | ) | [inline] |
Definition at line 178 of file RangeSet.h.
bool qpid::RangeSet< T >::contains | ( | const Range< T > & | r | ) | const [inline] |
Definition at line 219 of file RangeSet.h.
bool qpid::RangeSet< T >::contains | ( | const T & | t | ) | const [inline] |
Definition at line 212 of file RangeSet.h.
bool qpid::RangeSet< T >::contiguous | ( | ) | const [inline] |
Definition at line 136 of file RangeSet.h.
Referenced by qpid::RangeSet< T >::toRange().
Definition at line 187 of file RangeSet.h.
bool qpid::RangeSet< T >::empty | ( | ) | const [inline] |
Definition at line 177 of file RangeSet.h.
Referenced by qpid::RangeSet< T >::begin(), and qpid::RangeSet< T >::toRange().
Definition at line 186 of file RangeSet.h.
RangeSet< T >::iterator qpid::RangeSet< T >::end | ( | ) | const [inline] |
Definition at line 304 of file RangeSet.h.
References qpid::RangeSet< T >::iterator.
Referenced by qpid::RangeSet< T >::begin().
T qpid::RangeSet< T >::front | ( | ) | const [inline] |
Definition at line 160 of file RangeSet.h.
Referenced by qpid::RangeSet< T >::begin().
RangeSet<T>& qpid::RangeSet< T >::operator+= | ( | const RangeSet< T > & | s | ) | [inline] |
Definition at line 151 of file RangeSet.h.
RangeSet<T>& qpid::RangeSet< T >::operator+= | ( | const Range< T > & | r | ) | [inline] |
Definition at line 150 of file RangeSet.h.
RangeSet<T>& qpid::RangeSet< T >::operator+= | ( | const T & | t | ) | [inline] |
Definition at line 149 of file RangeSet.h.
RangeSet<T>& qpid::RangeSet< T >::operator-= | ( | const RangeSet< T > & | s | ) | [inline] |
Definition at line 158 of file RangeSet.h.
RangeSet<T>& qpid::RangeSet< T >::operator-= | ( | const Range< T > & | r | ) | [inline] |
Definition at line 157 of file RangeSet.h.
RangeSet<T>& qpid::RangeSet< T >::operator-= | ( | const T & | t | ) | [inline] |
Definition at line 156 of file RangeSet.h.
bool qpid::RangeSet< T >::operator== | ( | const RangeSet< T > & | r | ) | const [inline] |
Definition at line 296 of file RangeSet.h.
Range< T > qpid::RangeSet< T >::rangeContaining | ( | const T & | t | ) | const [inline] |
Return the largest contiguous range containing x.
Returns the empty range [x,x) if x is not in the set.
Definition at line 312 of file RangeSet.h.
RangeIterator qpid::RangeSet< T >::rangesBegin | ( | ) | const [inline] |
Definition at line 169 of file RangeSet.h.
Referenced by qpid::RangeSet< T >::size().
RangeIterator qpid::RangeSet< T >::rangesEnd | ( | ) | const [inline] |
Definition at line 170 of file RangeSet.h.
Referenced by qpid::RangeSet< T >::size().
size_t qpid::RangeSet< T >::rangesSize | ( | ) | const [inline] |
Definition at line 171 of file RangeSet.h.
void qpid::RangeSet< T >::removeRange | ( | const Range< T > & | r | ) | [inline] |
Definition at line 248 of file RangeSet.h.
References qpid::Range< T >::begin(), qpid::Range< T >::contains(), qpid::Range< T >::empty(), and qpid::Range< T >::end().
Referenced by qpid::RangeSet< SequenceNumber >::operator-=().
void qpid::RangeSet< T >::removeSet | ( | const RangeSet< T > & | r | ) | [inline] |
Definition at line 274 of file RangeSet.h.
Referenced by qpid::RangeSet< SequenceNumber >::operator-=().
Definition at line 185 of file RangeSet.h.
size_t qpid::RangeSet< T >::size | ( | ) | const [inline] |
Definition at line 323 of file RangeSet.h.
References qpid::RangeSet< T >::rangesBegin(), and qpid::RangeSet< T >::rangesEnd().
uint32_t qpid::RangeSet< T >::span | ( | ) | const [inline] |
Definition at line 318 of file RangeSet.h.
Range< T > qpid::RangeSet< T >::toRange | ( | ) | const [inline] |
Definition at line 280 of file RangeSet.h.
References qpid::RangeSet< T >::contiguous(), and qpid::RangeSet< T >::empty().
std::ostream& operator<< | ( | std::ostream & | o, | |
const RangeSet< U > & | r | |||
) | [friend] |