Mantid
|
provides a function that expands pairs of integers separated with a hyphen into a list of all the integers between those values More...
Static Public Member Functions | |
static void | getList (const std::string &line, std::vector< size_t > &outList) |
Expands any ranges in the input string of non-negative integers, eg. More... | |
Private Types | |
enum | { IGNORE_SPACES } |
give an enum from poco a better name here More... | |
Private Member Functions | |
RangeHelper ()=default | |
this class can't be constructed it is just a holder for some static things More... | |
provides a function that expands pairs of integers separated with a hyphen into a list of all the integers between those values
Definition at line 118 of file GroupDetectors2.h.
|
private |
give an enum from poco a better name here
Enumerator | |
---|---|
IGNORE_SPACES | equal to |
Definition at line 127 of file GroupDetectors2.h.
|
privatedefault |
this class can't be constructed it is just a holder for some static things
References Mantid::Kernel::StringTokenizer::TOK_IGNORE_EMPTY, and Mantid::Kernel::StringTokenizer::TOK_TRIM.
|
static |
Expands any ranges in the input string of non-negative integers, eg.
"1 3-5 4" -> "1 3 4 5 4"
line | :: a line of input that is interpreted and expanded |
outList | :: all integers specified both as ranges and individually in order |
invalid_argument | if a character is found that is not an integer or hypehn and when a hyphen occurs at the start or the end of the line |
Definition at line 1070 of file GroupDetectors2.cpp.
References Mantid::Kernel::StringTokenizer::begin(), Mantid::Kernel::StringTokenizer::count(), Mantid::Kernel::StringTokenizer::end(), and IGNORE_SPACES.
Referenced by Mantid::DataHandling::GroupDetectors2::readSpectraIndexes().