Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Classes | Public Types | Public Member Functions | Friends
qpid::RangeSet< T > Class Template Reference

A set implemented as a list of [begin, end) ranges. More...

#include <qpid/RangeSet.h>

List of all members.

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)
front () const
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)

Detailed Description

template<class T>
class qpid::RangeSet< T >

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.


Member Typedef Documentation

template<class T>
typedef iterator qpid::RangeSet< T >::const_iterator

Definition at line 130 of file RangeSet.h.

template<class T>
typedef Ranges::const_iterator qpid::RangeSet< T >::RangeIterator

Definition at line 168 of file RangeSet.h.


Constructor & Destructor Documentation

template<class T>
qpid::RangeSet< T >::RangeSet ( ) [inline]

Definition at line 132 of file RangeSet.h.

template<class T>
qpid::RangeSet< T >::RangeSet ( const Range< T > &  r) [inline, explicit]

Definition at line 133 of file RangeSet.h.

template<class T>
qpid::RangeSet< T >::RangeSet ( const T &  a,
const T &  b 
) [inline]

Definition at line 134 of file RangeSet.h.


Member Function Documentation

template<class T>
void qpid::RangeSet< T >::addRange ( const Range< T > &  r)

Definition at line 225 of file RangeSet.h.

References qpid::Range< T >::empty().

Referenced by qpid::RangeSet< SequenceNumber >::operator+=().

template<class T>
void qpid::RangeSet< T >::addSet ( const RangeSet< T > &  s)

Definition at line 242 of file RangeSet.h.

Referenced by qpid::RangeSet< SequenceNumber >::operator+=().

template<class T>
T qpid::RangeSet< T >::back ( ) const [inline]

Definition at line 161 of file RangeSet.h.

template<class T >
RangeSet< T >::iterator qpid::RangeSet< T >::begin ( ) const
template<class T>
void qpid::RangeSet< T >::clear ( ) [inline]

Definition at line 178 of file RangeSet.h.

template<class T>
bool qpid::RangeSet< T >::contains ( const Range< T > &  r) const

Definition at line 219 of file RangeSet.h.

template<class T>
bool qpid::RangeSet< T >::contains ( const T &  t) const

Definition at line 212 of file RangeSet.h.

template<class T>
bool qpid::RangeSet< T >::contiguous ( ) const [inline]

Definition at line 136 of file RangeSet.h.

template<class T>
template<class S >
void qpid::RangeSet< T >::decode ( S &  s) [inline]

Definition at line 187 of file RangeSet.h.

template<class T>
bool qpid::RangeSet< T >::empty ( ) const [inline]

Definition at line 177 of file RangeSet.h.

Referenced by qpid::RangeSet< T >::begin().

template<class T>
template<class S >
void qpid::RangeSet< T >::encode ( S &  s) const [inline]

Definition at line 186 of file RangeSet.h.

template<class T >
RangeSet< T >::iterator qpid::RangeSet< T >::end ( ) const

Definition at line 304 of file RangeSet.h.

References qpid::RangeSet< T >::iterator.

Referenced by qpid::RangeSet< T >::begin().

template<class T>
T qpid::RangeSet< T >::front ( ) const [inline]

Definition at line 160 of file RangeSet.h.

Referenced by qpid::RangeSet< T >::begin().

template<class T>
RangeSet<T>& qpid::RangeSet< T >::operator+= ( const T &  t) [inline]

Definition at line 149 of file RangeSet.h.

template<class T>
RangeSet<T>& qpid::RangeSet< T >::operator+= ( const Range< T > &  r) [inline]

Definition at line 150 of file RangeSet.h.

template<class T>
RangeSet<T>& qpid::RangeSet< T >::operator+= ( const RangeSet< T > &  s) [inline]

Definition at line 151 of file RangeSet.h.

template<class T>
RangeSet<T>& qpid::RangeSet< T >::operator-= ( const Range< T > &  r) [inline]

Definition at line 157 of file RangeSet.h.

template<class T>
RangeSet<T>& qpid::RangeSet< T >::operator-= ( const RangeSet< T > &  s) [inline]

Definition at line 158 of file RangeSet.h.

template<class T>
RangeSet<T>& qpid::RangeSet< T >::operator-= ( const T &  t) [inline]

Definition at line 156 of file RangeSet.h.

template<class T>
bool qpid::RangeSet< T >::operator== ( const RangeSet< T > &  r) const

Definition at line 296 of file RangeSet.h.

template<class T>
Range< T > qpid::RangeSet< T >::rangeContaining ( const T &  t) const

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.

template<class T>
RangeIterator qpid::RangeSet< T >::rangesBegin ( ) const [inline]

Definition at line 169 of file RangeSet.h.

Referenced by qpid::RangeSet< T >::size().

template<class T>
RangeIterator qpid::RangeSet< T >::rangesEnd ( ) const [inline]

Definition at line 170 of file RangeSet.h.

Referenced by qpid::RangeSet< T >::size().

template<class T>
size_t qpid::RangeSet< T >::rangesSize ( ) const [inline]

Definition at line 171 of file RangeSet.h.

template<class T>
void qpid::RangeSet< T >::removeRange ( const Range< T > &  r)
template<class T>
void qpid::RangeSet< T >::removeSet ( const RangeSet< T > &  r)

Definition at line 274 of file RangeSet.h.

Referenced by qpid::RangeSet< SequenceNumber >::operator-=().

template<class T>
template<class S >
void qpid::RangeSet< T >::serialize ( S &  s) [inline]

Definition at line 185 of file RangeSet.h.

template<class T >
size_t qpid::RangeSet< T >::size ( ) const
template<class T >
uint32_t qpid::RangeSet< T >::span ( ) const

Definition at line 318 of file RangeSet.h.

template<class T >
Range< T > qpid::RangeSet< T >::toRange ( ) const
Precondition:
contiguous()

Definition at line 280 of file RangeSet.h.


Friends And Related Function Documentation

template<class T>
template<class U >
std::ostream& operator<< ( std::ostream &  o,
const RangeSet< U > &  r 
) [friend]

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

Qpid C++ API Reference
Generated on Mon Aug 22 2011 for Qpid C++ Client API by doxygen 1.7.4