20#ifndef RIPPLE_BASICS_RANGESET_H_INCLUDED 
   21#define RIPPLE_BASICS_RANGESET_H_INCLUDED 
   23#include <xrpl/beast/core/LexicalCast.h> 
   25#include <boost/algorithm/string.hpp> 
   26#include <boost/icl/closed_interval.hpp> 
   27#include <boost/icl/interval_set.hpp> 
   70using RangeSet = boost::icl::interval_set<T, std::less, ClosedInterval<T>>;
 
   85    if (ci.first() == ci.last())
 
 
  106    for (
auto const& interval : rs)
 
 
  131    boost::split(tokens, s, boost::algorithm::is_any_of(
","));
 
  132    for (
auto const& t : tokens)
 
  134        boost::split(intervals, t, boost::algorithm::is_any_of(
"-"));
 
  135        switch (intervals.
size())
 
  155                        rs.insert(
range(front, back));
 
 
  185    if (rs.empty() || t == minVal)
 
  191    return boost::icl::last(tgt);
 
 
bool lexicalCastChecked(Out &out, In in)
Intelligently convert from one type to another.
 
Use hash_* containers for keys that do not need a cryptographically secure hashing algorithm.
 
std::optional< T > prevMissing(RangeSet< T > const &rs, T t, T minVal=0)
Find the largest value not in the set that is less than a given value.
 
boost::icl::closed_interval< T > ClosedInterval
A closed interval over the domain T.
 
bool from_string(RangeSet< T > &rs, std::string const &s)
Convert the given styled string to a RangeSet.
 
boost::icl::interval_set< T, std::less, ClosedInterval< T > > RangeSet
A set of closed intervals over the domain T.
 
std::string to_string(base_uint< Bits, Tag > const &a)
 
ClosedInterval< T > range(T low, T high)
Create a closed range interval.