Qdx::DocumentTableInputStreamLineIterator Class Reference

a line-based input stream iterator that converts specially-formatted input line text to HTML table output More...

Inheritance diagram for Qdx::DocumentTableInputStreamLineIterator:
[legend]

## Public Member Functions

| constructor (Qore::InputStream is, *string encoding, *string eol, bool do_trim=True)
string | getLine ()
| Returns the current line in the data or throws an `ITERATOR-ERROR` exception if the iterator is invalid. More...
string | getValue ()
| Returns the current line in the data or throws an `ITERATOR-ERROR` exception if the iterator is invalid. More...

## Protected Attributes

bool | do_trim
| Trim the input text.

## Additional Inherited Members

Private Member Functions inherited from Qdx::DocumentTableHelper
string | process (string line)
| accepts an input line and returns the formatted output line More...

## Detailed Description

a line-based input stream iterator that converts specially-formatted input line text to HTML table output

## Member Function Documentation

## constructor()

Qdx::DocumentTableInputStreamLineIterator::constructor | ( | Qore::InputStream | is,
|  | *string | encoding,
|  | *string | eol,
|  | bool | do_trim = `True`
| ) |  |

Creates the DocumentTableInputStreamLineIterator for iterating over the given InputStream

Parameters

  is | the InputStream to iterate over
  encoding | character encoding of the data from input stream; if not ASCII-compatible, all data will be converted to UTF-8; if not present, the default character encoding is assumed
  eol | the optional end of line character(s) to use to detect lines in the data; if this string is not passed, then the end of line character(s) are detected automatically, and can be either `"\n"`, `"\r"`, or `"\r\n"`
  do_trim | if True the string return values for the lines iterated will be trimmed of the eol bytes

Exceptions

  ENCODING-CONVERSION-ERROR | this exception could be thrown if the eol argument has a different character encoding from the data's and an error occurs during encoding conversion

Note
  table cell docs may span multiple lines as long as the lines end in a `"\"` character

## getLine()

string Qdx::DocumentTableInputStreamLineIterator::getLine | ( |  | ) |

virtual

Returns the current line in the data or throws an `ITERATOR-ERROR` exception if the iterator is invalid.

Example:
  map printf("+ %y\n", i.getLine()), i;

Returns
  the current line in the data or throws an `ITERATOR-ERROR` exception if the iterator is invalid

Exceptions

  ITERATOR-ERROR | the iterator is not pointing at a valid element
  ITERATOR-THREAD-ERROR | this exception is thrown if this method is called from any thread other than the thread that created the object
  LINE-CONTINUATION-ERROR | thrown if the last line ends in a line continuation character (`"\"`)

See also
  getValue()

Note
  table cell docs may span multiple lines as long as the lines end in a `"\"` character

Reimplemented from Qore::InputStreamLineIterator.

## getValue()

string Qdx::DocumentTableInputStreamLineIterator::getValue | ( |  | ) |

virtual

Returns the current line in the data or throws an `ITERATOR-ERROR` exception if the iterator is invalid.

Example:
  map printf("+ %y\n", i.getValue()), i;

Returns
  the current line in the data or throws an `ITERATOR-ERROR` exception if the iterator is invalid

Exceptions

  ITERATOR-ERROR | the iterator is not pointing at a valid element
  ITERATOR-THREAD-ERROR | this exception is thrown if this method is called from any thread other than the thread that created the object
  LINE-CONTINUATION-ERROR | thrown if the last line ends in a line continuation character (`"\"`)

See also
  getLine()

Note
  table cell docs may span multiple lines as long as the lines end in a `"\"` character

Reimplemented from Qore::InputStreamLineIterator.