- empty
bool empty()
Undocumented in source. Be warned that the author may not have intended to support it.
- front
InputSource front()
Undocumented in source. Be warned that the author may not have intended to support it.
- length
size_t length()
Undocumented in source. Be warned that the author may not have intended to support it.
- popFront
void popFront()
Undocumented in source. Be warned that the author may not have intended to support it.
InputSourceRange is an input range that iterates over a set of input files.
InputSourceRange is used to iterate over a set of files passed on the command line. Files are automatically opened and closed during iteration. The caller can choose to have header lines read automatically.
The range is created from a set of filepaths. These filepaths are mapped to InputSource objects during the iteration. This is what enables automatically opening and closing files and reading the header line.
The motivation for an InputSourceRange is to provide a standard way to look at the header line of the first input file during command line argument processing, and then pass the open input file and the header line along to the main processing functions. This enables a features like named fields to be implemented in a standard way.
Both InputSourceRange and InputSource are reference objects. This keeps their use limited to a single iteration over the set of files. The files can be iterated again by creating a new InputSourceRange against the same filepaths.
Currently, InputSourceRange supports files and standard input. It is possible other types of input sources will be added in the future.