ByLineSource

ByLineSource is a class of objects produced by iterating over an ByLineSourceRange.

A ByLineSource instance provides a bufferedByLine range for the current the front element of a ByLineSourceRange. The main methods application code is likely to need are:

  • byLine() - Returns the bufferedByLine range accessing the open file. The file will be open for reading (using the bufferedByLine range) as long as the ByLineSource instance is the front element of the ByLineSourceRange it came from.
  • name() - The name of the input source. The name returned is intended for user error messages. For files, this is the filepath that was passed to ByLineSourceRange. For standard input, it is "Standard Input".

A ByLineSource is a reference object, so the copies have the same state as the ByLineSourceRange front element. In particular, all copies will have the open state of the front element of the ByLineSourceRange.

This class is not intended for use outside the context of an ByLineSourceRange.

Members

Aliases

ByLineType
alias ByLineType = ReturnType!newByLineFn
Undocumented in source.
newByLineFn
alias newByLineFn = bufferedByLine!(keepTerminator, char, terminator)
Undocumented in source.

Functions

byLine
ByLineType byLine()

byLine returns the bufferedByLine object held by the ByLineSource instance.

isOpen
bool isOpen()

isOpen returns true if the ByLineSource instance is open for reading, false otherwise.

isStdin
bool isStdin()

isStdin returns true if the underlying input source is Standard Input, false otherwise.

name
string name()

name returns a user friendly name representing the underlying input source.

Meta