qpid::RangeSet< T > Class Template Reference

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

#include <RangeSet.h>

Inheritance diagram for qpid::RangeSet< T >:

Inheritance graph
[legend]

List of all members.

Public Types

typedef qpid::Range< T > Range
typedef iterator const_iterator
typedef Ranges::const_iterator RangeIterator

Public Member Functions

 RangeSet (const Range &r)
 RangeSet (const T &a, const T &b)
bool contiguous () const
bool contains (const T &t) const
bool contains (const Range &) const
Range toRange () const
bool operator== (const RangeSet< T > &) const
void addRange (const Range &)
void addSet (const RangeSet &)
RangeSetoperator+= (const T &t)
RangeSetoperator+= (const Range &r)
RangeSetoperator+= (const RangeSet &s)
void removeRange (const Range &)
void removeSet (const RangeSet &)
RangeSetoperator-= (const T &t)
RangeSetoperator-= (const Range &r)
RangeSetoperator-= (const RangeSet &s)
front () const
back () const
iterator begin () const
iterator end () const
RangeIterator rangesBegin () const
RangeIterator rangesEnd () const
size_t rangesSize () const
bool empty () const
void clear ()
Range 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.


Member Function Documentation

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

Precondition:
contiguous()

template<class T>
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.


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

Generated on Thu May 15 22:22:24 2008 for Qpid by  doxygen 1.5.5