$darkmode
Writer class for fixed-length line string data. More...
Public Member Functions | |
| constructor (hash< auto > specs, *hash< auto > opts) | |
| Instantiates the FixedLengthDataWriter object. More... | |
| string | write (hash< auto > line) |
| Return a single line for a single input record hash. More... | |
| string | write (list< auto > lines) |
| iterates the input records and returns a string corresponding to the rendered versions of all input records More... | |
| string | write (Qore::AbstractIterator lines) |
| iterates the input records and returns a string corresponding to the rendered versions of all input records More... | |
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. More... | |
| constructor (hash< auto > specs, *hash< auto > opts) | |
| creates the FixedLengthAbstractWriter object More... | |
| string | formatLine (hash< auto > line) |
| Formats a single line from a hash describing the record type and its contents. More... | |
| int | linesCount () |
| get processed lines count | |
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. | |
Additional Inherited Members | |
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 class for fixed-length line string data.
Instantiates the FixedLengthDataWriter object.
| specs | Fixed-length line specification; see Specification Hash for more information |
| opts | Global formatting options; see Global Options for valid values |
Return a single line for a single input record hash.
| line | A hash representing input data to be rendered as a string; 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 |
Implements FixedLengthUtil::FixedLengthAbstractWriter.
iterates the input records and returns a string corresponding to the rendered versions of all input records
| 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 |
Implements FixedLengthUtil::FixedLengthAbstractWriter.
|
virtual |
iterates the input records and returns a string corresponding to the rendered versions of all input records
| 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 |
Implements FixedLengthUtil::FixedLengthAbstractWriter.