37 #ifndef TF_RANGELIST_H_VERSION 39 #define TF_RANGELIST_H_VERSION \ 42 #include<tfxx/range.h> 52 typedef std::list<Trange>
Tlist;
55 {
Mlist.push_back(r);
return *
this; }
58 typename Tlist::size_type
size()
const {
return Mlist.size(); }
62 typename Tlist::const_iterator i=
Mlist.begin();
63 while ((i!=
Mlist.end()) && (!retval))
64 { retval = i->contains(v); ++i; }
101 bool retval=this->
valid();
104 typename Tlist::const_iterator I=
Miterator;
106 if (!(I!=
Mlist.end())) { retval=
false; }
138 #endif // TF_RANGELIST_H_VERSION (includeguard)
Tlist::size_type size() const
Tvalue current() const
return current value in range list
bool more() const
true if stepper is still in range after next step forward
Tvalue next()
step forward and return current value
bool valid() const
true if stepper is still in range and can return a current value
Tvalue next()
advance to next value and return current value
RangeList & append(const Trange &r)
RangeStepper< Tvalue > Trangestepper
Trangestepper Mrangestepper
Tvalue operator++()
step forward and return current value
Tlist::const_iterator Miterator
Tvalue current() const
return current value
bool contains(const Tvalue &v) const
bool more() const
true if stepper will still be in range after next advance
RangeList< T > Trangelist
tfxx::Range< Tvalue > Trange
tfxx::RangeList< T > rangelist(const std::string &s)
Trangelist::Tvalue Tvalue
bool valid() const
true if stepper is still in range and can return a current value
std::list< Trange > Tlist
RangeListStepper(const Trangelist &rangelist, const Tvalue &stepsize=1)
Namespace containing all code of library libtfxx.