![]() |
Qore FixedLengthUtil Module Reference 1.6
|
Writer for fixed-length line output data. More...
#include <FixedLengthWriter.qc.dox.h>
Public Member Functions | |
| constructor (Qore::OutputStream output, hash< auto > specs, *hash< auto > opts) | |
| Instantiates the FixedLengthWriter object. | |
| write (hash< auto > line) | |
| Renders a single line for a single input record hash to the output stream. | |
| write (list< auto > lines) | |
| iterates the input records and writes rendered versions of all input records to the output stream | |
| write (Qore::AbstractIterator lines) | |
| iterates the input records and writes rendered versions of all input records to the output stream | |
Public Member Functions inherited from FixedLengthUtil::FixedLengthAbstractWriter | |
| bool | checkTransition (*string from, *string to) |
| A verification function to be called for each line. This method can be overridden to achieve a begin-to-end validation of the whole input file. | |
| constructor (hash< auto > specs, *hash< auto > opts) | |
| creates the FixedLengthAbstractWriter object | |
| string | formatLine (hash< auto > line) |
| Formats a single line from a hash describing the record type and its contents. | |
| int | linesCount () |
| get processed lines count | |
| abstract | write (hash< auto > line) |
| Renders a single line for a single input record hash to the output. | |
| abstract | write (list< auto > lines) |
| iterates the input records and writes rendered versions of all input records to the output | |
| abstract | write (Qore::AbstractIterator lines) |
| iterates the input records and writes rendered versions of all input records to the output | |
Public Member Functions inherited from FixedLengthUtil::FixedLengthBase | |
| constructor (hash< auto > m_specs, *hash< auto > m_opts) | |
| Creates the object from the record specifications. | |
| *hash< string, AbstractDataField > | getRecordType () |
| Returns the description of the record type, if any. | |
Protected Attributes | |
| StreamWriter | output |
| the output stream for the fixed-length data | |
Protected Attributes inherited from FixedLengthUtil::FixedLengthAbstractWriter | |
Protected Attributes inherited from FixedLengthUtil::FixedLengthBase | |
| const | GlobalOptionMap = ... |
| Translates from global options to data provider options. | |
| *hash< auto > | m_opts |
| Global input or output options. | |
| hash< auto > | m_specs |
| The record specifications. | |
Writer for fixed-length line output data.
| FixedLengthUtil::FixedLengthWriter::constructor | ( | Qore::OutputStream | output, |
| hash< auto > | specs, | ||
| *hash< auto > | opts ) |
Instantiates the FixedLengthWriter object.
| output | the OutputStream for the data generated |
| specs | Fixed-length line specification; see Specification Hash for more information |
| opts | Global options; see Global Options for valid values |
| FixedLengthUtil::FixedLengthWriter::write | ( | hash< auto > | line | ) |
Renders a single line for a single input record hash to the output stream.
| line | A hash representing input data to be writen to the output stream; the hash must have the following keys:
|
| INVALID-RECORD | record name (type key in the record hash) not recognized |
| FIELD-INPUT-ERROR | the input value is too large to render into the output field |
| RECORD-TRANSITION-ERROR | a record transition error occurred; an invalid record sequence was given in the input data |
| FixedLengthUtil::FixedLengthWriter::write | ( | list< auto > | lines | ) |
iterates the input records and writes rendered versions of all input records to the output stream
| lines | A list of input records; each list value must be a hash with the following keys:
|
| INVALID-RECORD | record name (type key in the record hash) not recognized |
| FIELD-INPUT-ERROR | the input value is too large to render into the output field |
| RECORD-TRANSITION-ERROR | a record transition error occurred; an invalid record sequence was given in the input data |
| FixedLengthUtil::FixedLengthWriter::write | ( | Qore::AbstractIterator | lines | ) |
iterates the input records and writes rendered versions of all input records to the output stream
| lines | An iterator to stream input records; each iterator value must be a hash with the following keys:
|
| INVALID-RECORD | record name (type key in the record hash) not recognized |
| FIELD-INPUT-ERROR | the input value is too large to render into the output field |
| RECORD-TRANSITION-ERROR | a record transition error occurred; an invalid record sequence was given in the input data |