Apache Qpid - AMQP Messaging for Java JMS, C++, Python, Ruby, and .NET Apache Qpid Documentation
Classes | Public Types | Public Member Functions | Friends
qpid::RangeSet Class 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::ostreamoperator<< (std::ostream &o, const RangeSet< U > &r)

Detailed Description

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

T must be LessThanComparable and Incrementable. RangeSet only provides const iterators.


Member Typedef Documentation

Definition at line 130 of file RangeSet.h.

typedef Ranges::const_iterator qpid::RangeSet::RangeIterator

Definition at line 168 of file RangeSet.h.


Constructor & Destructor Documentation

qpid::RangeSet::RangeSet ( ) [inline]

Definition at line 132 of file RangeSet.h.

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

Definition at line 133 of file RangeSet.h.

qpid::RangeSet::RangeSet ( const T &  a,
const T &  b 
) [inline]

Definition at line 134 of file RangeSet.h.


Member Function Documentation

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

Definition at line 225 of file RangeSet.h.

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

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

Definition at line 240 of file RangeSet.h.

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

T qpid::RangeSet::back ( ) const [inline]

Definition at line 161 of file RangeSet.h.

RangeSet< T >::iterator qpid::RangeSet::begin ( ) const

Definition at line 298 of file RangeSet.h.

References empty(), end(), iterator, and front().

void qpid::RangeSet::clear ( ) [inline]

Definition at line 178 of file RangeSet.h.

bool qpid::RangeSet::contains ( const T &  t) const

Definition at line 212 of file RangeSet.h.

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

Definition at line 219 of file RangeSet.h.

bool qpid::RangeSet::contiguous ( ) const [inline]

Definition at line 136 of file RangeSet.h.

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

Definition at line 187 of file RangeSet.h.

bool qpid::RangeSet::empty ( ) const [inline]

Definition at line 177 of file RangeSet.h.

Referenced by begin().

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

Definition at line 186 of file RangeSet.h.

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

Definition at line 302 of file RangeSet.h.

References iterator.

Referenced by begin().

T qpid::RangeSet::front ( ) const [inline]

Definition at line 160 of file RangeSet.h.

Referenced by begin().

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

Definition at line 149 of file RangeSet.h.

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

Definition at line 150 of file RangeSet.h.

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

Definition at line 151 of file RangeSet.h.

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

Definition at line 156 of file RangeSet.h.

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

Definition at line 157 of file RangeSet.h.

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

Definition at line 158 of file RangeSet.h.

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

Definition at line 294 of file RangeSet.h.

Range< T > qpid::RangeSet::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 310 of file RangeSet.h.

RangeIterator qpid::RangeSet::rangesBegin ( ) const [inline]

Definition at line 169 of file RangeSet.h.

Referenced by size().

RangeIterator qpid::RangeSet::rangesEnd ( ) const [inline]

Definition at line 170 of file RangeSet.h.

Referenced by size().

size_t qpid::RangeSet::rangesSize ( ) const [inline]

Definition at line 171 of file RangeSet.h.

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

Definition at line 246 of file RangeSet.h.

References qpid::Range::end().

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

void qpid::RangeSet::removeSet ( const RangeSet< T > &  r)

Definition at line 272 of file RangeSet.h.

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

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

Definition at line 185 of file RangeSet.h.

size_t qpid::RangeSet::size ( ) const

Definition at line 321 of file RangeSet.h.

References rangesBegin(), and rangesEnd().

uint32_t qpid::RangeSet::span ( ) const

Definition at line 316 of file RangeSet.h.

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

Definition at line 278 of file RangeSet.h.


Friends And Related Function Documentation

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 Thu Aug 23 2012 for Qpid C++ Client API by doxygen 1.7.5