NCBI C++ ToolKit
|
Search Toolkit Book for CRanges
Class representing (non overlapping) integer ranges. More...
Public Member Functions | |
CRanges (istream &is) | |
Reads integer ranges from an input stream. More... | |
bool | Contain (int n) const |
Checks whether provided number belongs to one of the ranges. More... | |
Private Attributes | |
vector< int > | m_Ranges |
Class representing (non overlapping) integer ranges.
Definition at line 320 of file exec_helpers.cpp.
CRanges::CRanges | ( | istream & | is | ) |
Reads integer ranges from an input stream.
The data must be in the following format (in ascending order): [!] R1, N2, ..., Rn
Where: ! - negation, makes all provided ranges be excluded (not included). R1 ... Rn - integer closed ranges specified either as FROM - TO (corresponds to [FROM, TO] range) or as NUMBER (corresponds to [NUMBER, NUMBER] range). Example: 4, 6 - 9, 16 - 40, 64
Definition at line 347 of file exec_helpers.cpp.
Checks whether provided number belongs to one of the ranges.
Definition at line 409 of file exec_helpers.cpp.
References m_Ranges, n, and compile_time_bits::range().
|
private |
Definition at line 344 of file exec_helpers.cpp.