range.h
Go to the documentation of this file.
#include <iostream> // for noise
#include <iterator>
#include <vector>
#include <set>
#include <algorithm>
#include <wibble/iterator.h>
#include <wibble/exception.h>
#ifndef WIBBLE_RANGE_H
#define WIBBLE_RANGE_H
namespace wibble {
template< typename _ > struct Range;
template< typename _ > struct Consumer;
// FOO: there was no test catching that we don't implement ->
// auxilliary class, used as Range< T >::iterator
template< typename R >
struct RangeIterator : mixin::Comparable< RangeIterator< R > > {
typedef typename R::ElementType T;
struct Proxy {
Proxy( T _x ) : x( _x ) {}
T x;
const T *operator->() const { return &x; }
};
RangeIterator() {}
RangeIterator( const R &r ) : m_range( r ) {}
typedef std::forward_iterator_tag iterator_category;
typedef T value_type;
typedef ptrdiff_t difference_type;
typedef T *pointer;
typedef T &reference;
typedef const T &const_reference;
Proxy operator->() const { return Proxy( *(*this) ); }
RangeIterator next() const { RangeIterator n( *this ); ++n; return n; }
typename R::ElementType operator*() const { return m_range.head(); }
typename R::ElementType current() const { return *(*this); }
RangeIterator &operator++() { m_range.removeFirst(); return *this; }
RangeIterator operator++(int) { return m_range.removeFirst(); }
bool operator<=( const RangeIterator &r ) const {
return m_range.operator<=( r.m_range );
}
protected:
R m_range;
};
// the common functionality of all ranges
template< typename T, typename Self >
struct RangeMixin : mixin::Comparable< Self >
{
typedef Self RangeImplementation;
typedef T ElementType;
const Self &self() const { return *static_cast< const Self * >( this ); }
typedef IteratorMixin< T, Self > Base;
typedef RangeIterator< Self > iterator;
friend struct RangeIterator< Self >;
iterator begin() const { return iterator( this->self() ); } // STL-style iteration
iterator end() const { Self e( this->self() ); e.setToEmpty(); return iterator( e ); }
// range terminology
T head() { return self().head(); }
Self tail() const { Self e( this->self() ); e.removeFirst(); return e; }
// Self &tail() { return self().tail(); }
void output( Consumer< T > t ) const {
std::copy( begin(), end(), t );
}
bool empty() const {
return begin() == end();
}
~RangeMixin() {}
};
// interface to be implemented by all range implementations
// refinement of IteratorInterface (see iterator.h)
// see also amorph.h on how the Morph/Amorph classes are designed
template< typename T >
struct RangeInterface {
virtual T head() const = 0;
virtual void removeFirst() = 0;
virtual void setToEmpty() = 0;
virtual ~RangeInterface() {}
};
template< typename T, typename W >
struct RangeMorph: Morph< RangeMorph< T, W >, W, RangeInterface< T > >
{
typedef typename W::RangeImplementation Wrapped;
RangeMorph( const Wrapped &w ) : Morph< RangeMorph, Wrapped, RangeInterface< T > >( w ) {}
virtual void setToEmpty() { this->wrapped().setToEmpty(); }
virtual void removeFirst() { this->wrapped().removeFirst(); }
virtual T head() const { return this->wrapped().head(); }
};
// the Amorph of Ranges... if you still didn't check amorph.h, go and
// do it... unless you don't care in which case i am not sure why you
// are reading this anyway
/*
Range< T > (and all its Morphs (implementations) alike) work as an
iterable, immutable range of items -- in a way like STL
const_begin(), const_end() pair of iterators. However, Range packs
these two in a single object, which you can then pass as a single
argument or return as a value. There are many Range implementations,
some of them use STL containers (or just a pair of iterators) as
backing (IteratorRange, BackedRange), some use other ranges.
The latter are slightly more interesting, since they provide an
"adapted" view on the underlying range(s). See FilteredRange,
TransformedRange, UniqueRange, CastedRange , IntersectionRange.
GeneratedRange has no "real" backing at all, but use a pair of
functors and "generates" (by calling those functors) the complete
range as it is iterated.
Example usage:
// create a range from a pair of STL iterators
Range< int > i = range( myIntVector.begin(), myIntVector.end() );
// create a range that is filtered view of another range
Range< int > j = filteredRange( i, predicate );
std::vector< int > vec;
// copy out items in j into vec; see also consumer.h
j.output( consumer( vec ) );
// vec now contains all items from i (and thus myIntVector) that
// match 'predicate'
You don't have to use Range< int > all the time, since it's fairly
inefficient (adding level of indirection). However in common cases
it is ok. In the uncommon cases you can use the specific
implementation type and there you won't suffer the indirection
penalty. You can also write generic functions that have type of
range as their template parameter and these will work more
efficiently if Morph is used directly and less efficiently when the
Amorph Range is used instead.
*/
template< typename T >
struct Range : Amorph< Range< T >, RangeInterface< T > >,
RangeMixin< T, Range< T > >
{
typedef Amorph< Range< T >, RangeInterface< T > > Super;
template< typename C >
Range( const C &i, typename IsType< int, typename C::RangeImplementation >::T fake = 0 )
: Super( RangeMorph< T, C >( i ) ) { (void)fake; }
Range() {}
T head() const { return this->implementation()->head(); }
void removeFirst() { this->implementation()->removeFirst(); }
void setToEmpty() { this->implementation()->setToEmpty(); }
template< typename C > operator Range< C >();
};
/* template< typename R >
Range< typename R::ElementType > rangeMorph( R r ) {
return Range< typename R::ElementType > uRangeMorph< typename R::ElementType, R >( r );
} */
}
// ----- individual range implementations follow
#include <wibble/consumer.h>
namespace wibble {
// a simple pair of iterators -- suffers the same invalidation
// semantics as normal STL iterators and also same problems when the
// backing storage goes out of scope
// this is what you get when using range( iterator1, iterator2 )
// see also range()
template< typename It >
struct IteratorRange : public RangeMixin<
typename std::iterator_traits< It >::value_type,
IteratorRange< It > >
{
typedef typename std::iterator_traits< It >::value_type Value;
IteratorRange() {}
IteratorRange( It c, It e )
: m_current( c ), m_end( e ) {}
Value head() const { return *m_current; }
void removeFirst() { ++m_current; }
bool operator<=( const IteratorRange &r ) const {
return r.m_current == m_current && r.m_end == m_end;
}
void setToEmpty() {
m_current = m_end;
}
protected:
It m_current, m_end;
};
// first in the series of ranges that use another range as backing
// this one just does static_cast to specified type on all the
// returned elements
// this is what you get when casting Range< S > to Range< T > and S is
// static_cast-able to T
template< typename T, typename Casted >
struct CastedRange : public RangeMixin< T, CastedRange< T, Casted > >
{
CastedRange() {}
CastedRange( Range< Casted > r ) : m_casted( r ) {}
T head() const {
return static_cast< T >( m_casted.head() );
}
void removeFirst() { m_casted.removeFirst(); }
bool operator<=( const CastedRange &r ) const {
return m_casted <= r.m_casted;
}
void setToEmpty() {
m_casted.setToEmpty();
}
protected:
Range< Casted > m_casted;
};
// explicit range-cast... probably not very useful explicitly, just
// use the casting operator of Range
template< typename T, typename C >
Range< T > castedRange( C r ) {
return CastedRange< T, typename C::ElementType >( r );
}
// old-code-compat for castedRange... slightly silly
template< typename T, typename C >
Range< T > upcastRange( C r ) {
return CastedRange< T, typename C::ElementType >( r );
}
// the range-cast operator, see castedRange and CastedRange
template< typename T > template< typename C >
Range< T >::operator Range< C >() {
return castedRange< C >( *this );
}
// range( iterator1, iterator2 ) -- see IteratorRange
template< typename In >
Range< typename In::value_type > range( In b, In e ) {
return IteratorRange< In >( b, e );
}
template< typename C >
Range< typename C::iterator::value_type > range( C &c ) {
return range( c.begin(), c.end() );
}
template< typename T >
struct IntersectionRange : RangeMixin< T, IntersectionRange< T > >
{
IntersectionRange() {}
IntersectionRange( Range< T > r1, Range< T > r2 )
: m_first( r1 ), m_second( r2 ),
m_valid( false )
{
}
void find() const {
if (!m_valid) {
while ( !m_first.empty() && !m_second.empty() ) {
if ( m_first.head() < m_second.head() )
m_first.removeFirst();
else if ( m_second.head() < m_first.head() )
m_second.removeFirst();
else break; // equal
}
if ( m_second.empty() ) m_first.setToEmpty();
else if ( m_first.empty() ) m_second.setToEmpty();
}
m_valid = true;
}
void removeFirst() {
find();
m_first.removeFirst();
m_second.removeFirst();
m_valid = false;
}
T head() const {
find();
return m_first.head();
}
void setToEmpty() {
m_first.setToEmpty();
m_second.setToEmpty();
}
bool operator<=( const IntersectionRange &f ) const {
find();
f.find();
return m_first == f.m_first;
}
protected:
mutable Range< T > m_first, m_second;
mutable bool m_valid:1;
};
template< typename R >
IntersectionRange< typename R::ElementType > intersectionRange( R r1, R r2 ) {
return IntersectionRange< typename R::ElementType >( r1, r2 );
}
template< typename R, typename Pred >
struct FilteredRange : RangeMixin< typename R::ElementType,
FilteredRange< R, Pred > >
{
typedef typename R::ElementType ElementType;
// FilteredRange() {}
FilteredRange( const R &r, Pred p ) : m_range( r ), m_current( r.begin() ), m_pred( p ),
m_valid( false ) {}
void find() const {
if (!m_valid)
m_current = std::find_if( m_current, m_range.end(), pred() );
m_valid = true;
}
void removeFirst() {
find();
++m_current;
m_valid = false;
}
ElementType head() const {
find();
return *m_current;
}
void setToEmpty() {
m_current = m_range.end();
}
bool operator<=( const FilteredRange &f ) const {
find();
f.find();
return m_current == f.m_current;
// return m_pred == f.m_pred && m_range == f.m_range;
}
protected:
const Pred &pred() const { return m_pred; }
R m_range;
mutable typename R::iterator m_current;
Pred m_pred;
mutable bool m_valid:1;
};
template< typename R, typename Pred >
FilteredRange< R, Pred > filteredRange(
R r, Pred p ) {
return FilteredRange< R, Pred >( r, p );
}
template< typename T >
struct UniqueRange : RangeMixin< T, UniqueRange< T > >
{
UniqueRange() {}
UniqueRange( Range< T > r ) : m_range( r ), m_valid( false ) {}
void find() const {
if (!m_valid)
while ( !m_range.empty()
&& !m_range.tail().empty()
&& m_range.head() == m_range.tail().head() )
m_range = m_range.tail();
m_valid = true;
}
void removeFirst() {
find();
m_range.removeFirst();
m_valid = false;
}
T head() const {
find();
return m_range.head();
}
void setToEmpty() {
m_range.setToEmpty();
}
bool operator<=( const UniqueRange &r ) const {
find();
r.find();
return m_range == r.m_range;
}
protected:
mutable Range< T > m_range;
mutable bool m_valid:1;
};
template< typename R >
UniqueRange< typename R::ElementType > uniqueRange( R r1 ) {
return UniqueRange< typename R::ElementType >( r1 );
}
template< typename Transform >
struct TransformedRange : RangeMixin< typename Transform::result_type,
TransformedRange< Transform > >
{
typedef typename Transform::argument_type Source;
typedef typename Transform::result_type Result;
TransformedRange( Range< Source > r, Transform t )
: m_range( r ), m_transform( t ) {}
bool operator<=( const TransformedRange &o ) const {
return m_range <= o.m_range;
}
Result head() const { return m_transform( m_range.head() ); }
void removeFirst() { m_range.removeFirst(); }
void setToEmpty() { m_range.setToEmpty(); }
protected:
Range< Source > m_range;
Transform m_transform;
};
template< typename Trans >
TransformedRange< Trans > transformedRange(
Range< typename Trans::argument_type > r, Trans t ) {
return TransformedRange< Trans >( r, t );
}
template< typename T, typename _Advance, typename _End >
struct GeneratedRange : RangeMixin< T, GeneratedRange< T, _Advance, _End > >
{
typedef _Advance Advance;
typedef _End End;
GeneratedRange() {}
GeneratedRange( const T &t, const Advance &a, const End &e )
: m_current( t ), m_advance( a ), m_endPred( e ), m_end( false )
{
}
void removeFirst() {
m_advance( m_current );
}
void setToEmpty() {
m_end = true;
}
T head() const { return m_current; }
bool isEnd() const { return m_end || m_endPred( m_current ); }
bool operator<=( const GeneratedRange &r ) const {
if ( isEnd() == r.isEnd() && !isEnd() )
return m_current <= r.m_current;
return isEnd() <= r.isEnd();
}
protected:
T m_current;
Advance m_advance;
End m_endPred;
bool m_end;
};
template< typename T, typename A, typename E >
GeneratedRange< T, A, E > generatedRange( T t, A a, E e )
{
return GeneratedRange< T, A, E >( t, a, e );
}
}
#endif
consumer.h
-*- C++ -*-
exception.h
iterator.h
-*- C++ -*-
wibble
Definition: amorph.h:17
wibble::range
Range< typename In::value_type > range(In b, In e)
Definition: range.h:264
wibble::generatedRange
GeneratedRange< T, A, E > generatedRange(T t, A a, E e)
Definition: range.h:494
wibble::intersectionRange
IntersectionRange< typename R::ElementType > intersectionRange(R r1, R r2)
Definition: range.h:327
wibble::upcastRange
Range< T > upcastRange(C r)
Definition: range.h:252
wibble::transformedRange
TransformedRange< Trans > transformedRange(Range< typename Trans::argument_type > r, Trans t)
Definition: range.h:451
wibble::iterator
Iterator< typename I::value_type > iterator(I i)
Definition: iterator.h:123
wibble::castedRange
Range< T > castedRange(C r)
Definition: range.h:246
wibble::filteredRange
FilteredRange< R, Pred > filteredRange(R r, Pred p)
Definition: range.h:377
wibble::uniqueRange
UniqueRange< typename R::ElementType > uniqueRange(R r1)
Definition: range.h:424
wibble::Amorph
Definition: amorph.h:272
wibble::Amorph< Range< T >, RangeInterface< T > >::implementation
const Interface * implementation() const
Definition: amorph.h:361
wibble::CastedRange
Definition: range.h:223
wibble::CastedRange::setToEmpty
void setToEmpty()
Definition: range.h:235
wibble::CastedRange::removeFirst
void removeFirst()
Definition: range.h:229
wibble::CastedRange::CastedRange
CastedRange()
Definition: range.h:224
wibble::CastedRange::CastedRange
CastedRange(Range< Casted > r)
Definition: range.h:225
wibble::CastedRange::head
T head() const
Definition: range.h:226
wibble::CastedRange::m_casted
Range< Casted > m_casted
Definition: range.h:240
wibble::CastedRange::operator<=
bool operator<=(const CastedRange &r) const
Definition: range.h:231
wibble::Consumer
Definition: consumer.h:67
wibble::FilteredRange
Definition: range.h:334
wibble::FilteredRange::removeFirst
void removeFirst()
Definition: range.h:346
wibble::FilteredRange::operator<=
bool operator<=(const FilteredRange &f) const
Definition: range.h:361
wibble::FilteredRange::m_range
R m_range
Definition: range.h:370
wibble::FilteredRange::m_current
R::iterator m_current
Definition: range.h:371
wibble::FilteredRange::FilteredRange
FilteredRange(const R &r, Pred p)
Definition: range.h:337
wibble::FilteredRange::ElementType
R::ElementType ElementType
Definition: range.h:335
wibble::FilteredRange::pred
const Pred & pred() const
Definition: range.h:369
wibble::FilteredRange::m_valid
bool m_valid
Definition: range.h:373
wibble::FilteredRange::find
void find() const
Definition: range.h:340
wibble::FilteredRange::m_pred
Pred m_pred
Definition: range.h:372
wibble::FilteredRange::setToEmpty
void setToEmpty()
Definition: range.h:357
wibble::FilteredRange::head
ElementType head() const
Definition: range.h:352
wibble::GeneratedRange
Definition: range.h:458
wibble::GeneratedRange::m_current
T m_current
Definition: range.h:487
wibble::GeneratedRange::m_advance
Advance m_advance
Definition: range.h:488
wibble::GeneratedRange::isEnd
bool isEnd() const
Definition: range.h:478
wibble::GeneratedRange::m_endPred
End m_endPred
Definition: range.h:489
wibble::GeneratedRange::GeneratedRange
GeneratedRange(const T &t, const Advance &a, const End &e)
Definition: range.h:463
wibble::GeneratedRange::operator<=
bool operator<=(const GeneratedRange &r) const
Definition: range.h:480
wibble::GeneratedRange::head
T head() const
Definition: range.h:476
wibble::GeneratedRange::GeneratedRange
GeneratedRange()
Definition: range.h:462
wibble::GeneratedRange::Advance
_Advance Advance
Definition: range.h:459
wibble::GeneratedRange::m_end
bool m_end
Definition: range.h:490
wibble::GeneratedRange::removeFirst
void removeFirst()
Definition: range.h:468
wibble::GeneratedRange::End
_End End
Definition: range.h:460
wibble::GeneratedRange::setToEmpty
void setToEmpty()
Definition: range.h:472
wibble::IntersectionRange
Definition: range.h:275
wibble::IntersectionRange::m_second
Range< T > m_second
Definition: range.h:322
wibble::IntersectionRange::m_valid
bool m_valid
Definition: range.h:323
wibble::IntersectionRange::IntersectionRange
IntersectionRange(Range< T > r1, Range< T > r2)
Definition: range.h:277
wibble::IntersectionRange::m_first
Range< T > m_first
Definition: range.h:322
wibble::IntersectionRange::IntersectionRange
IntersectionRange()
Definition: range.h:276
wibble::IntersectionRange::removeFirst
void removeFirst()
Definition: range.h:298
wibble::IntersectionRange::operator<=
bool operator<=(const IntersectionRange &f) const
Definition: range.h:315
wibble::IntersectionRange::find
void find() const
Definition: range.h:283
wibble::IntersectionRange::head
T head() const
Definition: range.h:305
wibble::IntersectionRange::setToEmpty
void setToEmpty()
Definition: range.h:310
wibble::IsType::T
_T T
Definition: cast.h:26
wibble::IteratorMixin
Definition: iterator.h:58
wibble::IteratorRange
Definition: range.h:192
wibble::IteratorRange::IteratorRange
IteratorRange(It c, It e)
Definition: range.h:196
wibble::IteratorRange::setToEmpty
void setToEmpty()
Definition: range.h:206
wibble::IteratorRange::operator<=
bool operator<=(const IteratorRange &r) const
Definition: range.h:202
wibble::IteratorRange::head
Value head() const
Definition: range.h:199
wibble::IteratorRange::m_current
It m_current
Definition: range.h:211
wibble::IteratorRange::Value
std::iterator_traits< It >::value_type Value
Definition: range.h:193
wibble::IteratorRange::m_end
It m_end
Definition: range.h:211
wibble::IteratorRange::removeFirst
void removeFirst()
Definition: range.h:200
wibble::IteratorRange::IteratorRange
IteratorRange()
Definition: range.h:195
wibble::Morph
Definition: amorph.h:144
wibble::Morph< RangeMorph< T, W >, W, RangeInterface< T > >::wrapped
const Wrapped & wrapped() const
Definition: amorph.h:181
wibble::RangeInterface
Definition: range.h:93
wibble::RangeInterface::removeFirst
virtual void removeFirst()=0
wibble::RangeInterface::~RangeInterface
virtual ~RangeInterface()
Definition: range.h:97
wibble::RangeInterface::setToEmpty
virtual void setToEmpty()=0
wibble::RangeInterface::head
virtual T head() const =0
wibble::RangeIterator::Proxy
Definition: range.h:29
wibble::RangeIterator::Proxy::operator->
const T * operator->() const
Definition: range.h:32
wibble::RangeIterator::Proxy::Proxy
Proxy(T _x)
Definition: range.h:30
wibble::RangeIterator::Proxy::x
T x
Definition: range.h:31
wibble::RangeIterator
Definition: range.h:26
wibble::RangeIterator::iterator_category
std::forward_iterator_tag iterator_category
Definition: range.h:38
wibble::RangeIterator::m_range
R m_range
Definition: range.h:56
wibble::RangeIterator::value_type
T value_type
Definition: range.h:39
wibble::RangeIterator::operator++
RangeIterator operator++(int)
Definition: range.h:51
wibble::RangeIterator::pointer
T * pointer
Definition: range.h:41
wibble::RangeIterator::operator<=
bool operator<=(const RangeIterator &r) const
Definition: range.h:52
wibble::RangeIterator::operator->
Proxy operator->() const
Definition: range.h:45
wibble::RangeIterator::RangeIterator
RangeIterator(const R &r)
Definition: range.h:36
wibble::RangeIterator::current
R::ElementType current() const
Definition: range.h:49
wibble::RangeIterator::T
R::ElementType T
Definition: range.h:27
wibble::RangeIterator::RangeIterator
RangeIterator()
Definition: range.h:35
wibble::RangeIterator::operator*
R::ElementType operator*() const
Definition: range.h:48
wibble::RangeIterator::next
RangeIterator next() const
Definition: range.h:47
wibble::RangeIterator::difference_type
ptrdiff_t difference_type
Definition: range.h:40
wibble::RangeIterator::operator++
RangeIterator & operator++()
Definition: range.h:50
wibble::RangeIterator::const_reference
const T & const_reference
Definition: range.h:43
wibble::RangeIterator::reference
T & reference
Definition: range.h:42
wibble::RangeMixin
Definition: range.h:62
wibble::RangeMixin::empty
bool empty() const
Definition: range.h:82
wibble::RangeMixin::head
T head()
Definition: range.h:74
wibble::RangeMixin::output
void output(Consumer< T > t) const
Definition: range.h:78
wibble::RangeMixin::iterator
RangeIterator< Self > iterator
Definition: range.h:67
wibble::RangeMixin::ElementType
T ElementType
Definition: range.h:64
wibble::RangeMixin::Base
IteratorMixin< T, Self > Base
Definition: range.h:66
wibble::RangeMixin::begin
iterator begin() const
Definition: range.h:70
wibble::RangeMixin::RangeImplementation
Self RangeImplementation
Definition: range.h:63
wibble::RangeMixin::~RangeMixin
~RangeMixin()
Definition: range.h:86
wibble::RangeMixin::end
iterator end() const
Definition: range.h:71
wibble::RangeMixin::tail
Self tail() const
Definition: range.h:75
wibble::RangeMorph
Definition: range.h:102
wibble::RangeMorph::Wrapped
W::RangeImplementation Wrapped
Definition: range.h:103
wibble::RangeMorph::RangeMorph
RangeMorph(const Wrapped &w)
Definition: range.h:104
wibble::RangeMorph::removeFirst
virtual void removeFirst()
Definition: range.h:106
wibble::RangeMorph::setToEmpty
virtual void setToEmpty()
Definition: range.h:105
wibble::RangeMorph::head
virtual T head() const
Definition: range.h:107
wibble::Range
Definition: range.h:155
wibble::Range::removeFirst
void removeFirst()
Definition: range.h:164
wibble::Range::Range
Range()
Definition: range.h:161
wibble::Range::head
T head() const
Definition: range.h:163
wibble::Range::Super
Amorph< Range< T >, RangeInterface< T > > Super
Definition: range.h:156
wibble::Range::Range
Range(const C &i, typename IsType< int, typename C::RangeImplementation >::T fake=0)
Definition: range.h:159
wibble::Range::setToEmpty
void setToEmpty()
Definition: range.h:165
wibble::TransformedRange
Definition: range.h:431
wibble::TransformedRange::operator<=
bool operator<=(const TransformedRange &o) const
Definition: range.h:437
wibble::TransformedRange::removeFirst
void removeFirst()
Definition: range.h:442
wibble::TransformedRange::head
Result head() const
Definition: range.h:441
wibble::TransformedRange::Result
Transform::result_type Result
Definition: range.h:433
wibble::TransformedRange::TransformedRange
TransformedRange(Range< Source > r, Transform t)
Definition: range.h:434
wibble::TransformedRange::m_transform
Transform m_transform
Definition: range.h:447
wibble::TransformedRange::setToEmpty
void setToEmpty()
Definition: range.h:443
wibble::TransformedRange::m_range
Range< Source > m_range
Definition: range.h:446
wibble::TransformedRange::Source
Transform::argument_type Source
Definition: range.h:432
wibble::UniqueRange
Definition: range.h:384
wibble::UniqueRange::head
T head() const
Definition: range.h:403
wibble::UniqueRange::m_range
Range< T > m_range
Definition: range.h:419
wibble::UniqueRange::operator<=
bool operator<=(const UniqueRange &r) const
Definition: range.h:412
wibble::UniqueRange::removeFirst
void removeFirst()
Definition: range.h:397
wibble::UniqueRange::UniqueRange
UniqueRange(Range< T > r)
Definition: range.h:386
wibble::UniqueRange::m_valid
bool m_valid
Definition: range.h:420
wibble::UniqueRange::UniqueRange
UniqueRange()
Definition: range.h:385
wibble::UniqueRange::find
void find() const
Definition: range.h:388
wibble::UniqueRange::setToEmpty
void setToEmpty()
Definition: range.h:408
wibble::mixin::Comparable
Definition: mixin.h:13