|
MeteoIODoc 20260428.5e5bc68a
Environmental timeseries pre-processing
|
A class to represent and handle ranges of lines. They can be sorted, checked for uniqueness and a line number can be compared to the range (is it before or after?).
#include <IOInterface.h>
Public Member Functions | |
| LinesRange () | |
| LinesRange (const size_t &l1, const size_t &l2) | |
| bool | in (const size_t &ll) const |
| Is the provided line number within the current range? | |
| bool | operator< (const size_t &ll) const |
| Is the provided line number before the end of the range? | |
| bool | operator> (const size_t &ll) const |
| Is the provided line number after the start of the range? | |
| bool | operator< (const LinesRange &ll) const |
| bool | operator== (const LinesRange &ll) const |
| const std::string | toString () const |
Static Public Member Functions | |
| static std::vector< LinesRange > | getLinesRestrictions (const std::string &args, const std::string &where, const bool &negate) |
| built the set of line ranges to read or skip. | |
Public Attributes | |
| size_t | start |
| size_t | end |
|
inline |
|
inline |
|
static |
built the set of line ranges to read or skip.
Then each plugin is responsible to call this method if necessary and implement the lines skipping if necessary. Obviously this can not be implemented by every plugin! The line ranges are given as a comma delimited list of either single line numbers or ranges (line numbers delimited by a "-" character). Extra spaces can be given for more clarity in the input.
| [in] | args | the textual representation of the line ranges or lines to parse |
| [in] | where | informative string to describe which component it is in case of error messages (ex. "CSV plugin") |
| [in] | negate | take the negation of the provided ranges (converting a "ONLY" statement into an "EXCLUDE" statement) |
|
inline |
Is the provided line number within the current range?
| [in] | ll | line number to check |
|
inline |
|
inline |
Is the provided line number before the end of the range?
| [in] | ll | line number to check |
|
inline |
|
inline |
Is the provided line number after the start of the range?
| [in] | ll | line number to check |
|
inline |
| size_t mio::LinesRange::end |
| size_t mio::LinesRange::start |